From 050c42c18c2c7cfc11786fafb700d7305623ca9a Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Sun, 15 Dec 2019 21:55:09 -0500 Subject: Coils (bugfix before actual release) --- plugins/MacAU/Coils/Coils.cpp | 5 ++-- .../Coils.xcodeproj/christopherjohnson.pbxuser | 30 +++++++++++----------- .../christopherjohnson.perspectivev3 | 26 +++++++++---------- 3 files changed, 30 insertions(+), 31 deletions(-) (limited to 'plugins/MacAU/Coils') diff --git a/plugins/MacAU/Coils/Coils.cpp b/plugins/MacAU/Coils/Coils.cpp index e8e222b..75cb6db 100755 --- a/plugins/MacAU/Coils/Coils.cpp +++ b/plugins/MacAU/Coils/Coils.cpp @@ -198,6 +198,7 @@ void Coils::CoilsKernel::Process( const Float32 *inSourceP, figure[0] = 600.0/GetSampleRate(); //fixed frequency, 600hz figure[1] = 0.023; //resonance Float64 offset = GetParameter( kParam_Two ); + Float64 sinOffset = sin(offset); //we can cache this, it's expensive Float64 wet = GetParameter( kParam_Three ); @@ -218,7 +219,7 @@ void Coils::CoilsKernel::Process( const Float32 *inSourceP, //figure[8] = (inputSample * figure[4]) - (tempSample * figure[6]); //inputSample = tempSample + sin(drySample-tempSample); //or - //inputSample = tempSample + ((sin(((drySample-tempSample)/boost)+offset)-offset)*boost); + //inputSample = tempSample + ((sin(((drySample-tempSample)/boost)+offset)-sinOffset)*boost); // //given a bandlimited inputSample, freq 600hz and Q of 0.023, this restores a lot of //the full frequencies but distorts like a real transformer. Purest case, and since @@ -227,7 +228,7 @@ void Coils::CoilsKernel::Process( const Float32 *inSourceP, long double tempSample = (inputSample * figure[2]) + figure[7]; figure[7] = -(tempSample * figure[5]) + figure[8]; figure[8] = (inputSample * figure[4]) - (tempSample * figure[6]); - inputSample = tempSample + ((sin(((drySample-tempSample)/boost)+offset)-offset)*boost); + inputSample = tempSample + ((sin(((drySample-tempSample)/boost)+offset)-sinOffset)*boost); //given a bandlimited inputSample, freq 600hz and Q of 0.023, this restores a lot of //the full frequencies but distorts like a real transformer. Since //we are not using a high Q we can remove the extra sin/asin on the biquad. diff --git a/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.pbxuser index ad352c5..22eaa41 100755 --- a/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 598121407; - PBXWorkspaceStateSaveDate = 598121407; + PBXPerProjectTemplateStateSaveDate = 598128541; + PBXWorkspaceStateSaveDate = 598128541; }; perUserProjectItems = { - 8BE4464723A6992B00A26556 /* PlistBookmark */ = 8BE4464723A6992B00A26556 /* PlistBookmark */; - 8BE4469323A6A0D400A26556 /* PlistBookmark */ = 8BE4469323A6A0D400A26556 /* PlistBookmark */; + 8BE446D723A6B15500A26556 /* PlistBookmark */ = 8BE446D723A6B15500A26556 /* PlistBookmark */; + 8BE4471123A6B86300A26556 /* PlistBookmark */ = 8BE4471123A6B86300A26556 /* PlistBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { @@ -62,10 +62,10 @@ }; 8BA05A660720730100365D66 /* Coils.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {770, 3367}}"; - sepNavSelRange = "{10735, 0}"; - sepNavVisRange = "{9083, 2157}"; - sepNavWindowFrame = "{{648, 60}, {817, 818}}"; + sepNavIntBoundsRect = "{{0, 0}, {770, 3419}}"; + sepNavSelRange = "{9161, 70}"; + sepNavVisRange = "{9022, 2293}"; + sepNavWindowFrame = "{{623, 60}, {817, 818}}"; }; }; 8BA05A690720730100365D66 /* CoilsVersion.h */ = { @@ -98,7 +98,7 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8BE4464723A6992B00A26556 /* PlistBookmark */ = { + 8BE446D723A6B15500A26556 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; fallbackIsa = PBXBookmark; @@ -106,11 +106,11 @@ kPath = ( CFBundleName, ); - name = /Users/christopherjohnson/Desktop/Coils/Info.plist; - rLen = 0; - rLoc = 9223372036854775808; + name = /Users/christopherjohnson/Desktop/Plugins/MacAU/Coils/Info.plist; + rLen = 26; + rLoc = 0; }; - 8BE4469323A6A0D400A26556 /* PlistBookmark */ = { + 8BE4471123A6B86300A26556 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; fallbackIsa = PBXBookmark; @@ -119,8 +119,8 @@ CFBundleName, ); name = /Users/christopherjohnson/Desktop/Plugins/MacAU/Coils/Info.plist; - rLen = 0; - rLoc = 9223372036854775807; + rLen = 26; + rLoc = 0; }; 8D01CCC60486CAD60068D4B7 /* Coils */ = { activeExec = 0; diff --git a/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.perspectivev3 index 0df6891..c6c3159 100755 --- a/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Coils/Coils.xcodeproj/christopherjohnson.perspectivev3 @@ -256,8 +256,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -354,10 +352,10 @@ _historyCapacity 0 bookmark - 8BE4469323A6A0D400A26556 + 8BE4471123A6B86300A26556 history - 8BE4464723A6992B00A26556 + 8BE446D723A6B15500A26556 SplitCount @@ -371,18 +369,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 229}} + {{0, 0}, {531, 202}} RubberWindowFrame 566 197 841 654 0 0 1440 878 Module PBXNavigatorGroup Proportion - 229pt + 202pt Proportion - 379pt + 406pt Tabs @@ -396,7 +394,7 @@ GeometryConfiguration Frame - {{10, 27}, {531, 352}} + {{10, 27}, {531, 379}} RubberWindowFrame 566 197 841 654 0 0 1440 878 @@ -452,7 +450,7 @@ GeometryConfiguration Frame - {{10, 27}, {531, 339}} + {{10, 27}, {531, 365}} Module PBXBuildResultsModule @@ -480,11 +478,11 @@ TableOfContents - 8BE4469423A6A0D400A26556 + 8BE4471223A6B86300A26556 1CA23ED40692098700951B8B - 8BE4469523A6A0D400A26556 + 8BE4471323A6B86300A26556 8BD7274A1D46E5A5000176F0 - 8BE4469623A6A0D400A26556 + 8BE4471423A6B86300A26556 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -657,7 +655,7 @@ StatusbarIsVisible TimeStamp - 598122708.61674905 + 598128739.18132901 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -674,7 +672,7 @@ 5 WindowOrderList - 8BE4469723A6A0D400A26556 + 8BE446DB23A6B15500A26556 /Users/christopherjohnson/Desktop/Plugins/MacAU/Coils/Coils.xcodeproj WindowString -- cgit v1.2.3