diff options
author | Chris Johnson <jinx6568@sover.net> | 2019-01-27 21:13:54 -0500 |
---|---|---|
committer | Chris Johnson <jinx6568@sover.net> | 2019-01-27 21:13:54 -0500 |
commit | 966f2d253cd2ee6ce140ad68095a20a9d2b63052 (patch) | |
tree | b0400d95bd06512531ade6ddf55190a58b6a5623 /plugins/MacAU/Slew2 | |
parent | 0887543349dbbec0721a1fc8b1c7deba9afefa8b (diff) | |
download | airwindows-lv2-port-966f2d253cd2ee6ce140ad68095a20a9d2b63052.tar.gz airwindows-lv2-port-966f2d253cd2ee6ce140ad68095a20a9d2b63052.tar.bz2 airwindows-lv2-port-966f2d253cd2ee6ce140ad68095a20a9d2b63052.zip |
Floating Point Dither For All
Diffstat (limited to 'plugins/MacAU/Slew2')
-rwxr-xr-x | plugins/MacAU/Slew2/Slew2.cpp | 8 | ||||
-rwxr-xr-x | plugins/MacAU/Slew2/Slew2.h | 2 | ||||
-rwxr-xr-x | plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.pbxuser | 55 | ||||
-rwxr-xr-x | plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.perspectivev3 | 56 |
4 files changed, 68 insertions, 53 deletions
diff --git a/plugins/MacAU/Slew2/Slew2.cpp b/plugins/MacAU/Slew2/Slew2.cpp index 06a128a..d9a5093 100755 --- a/plugins/MacAU/Slew2/Slew2.cpp +++ b/plugins/MacAU/Slew2/Slew2.cpp @@ -164,8 +164,8 @@ void Slew2::Slew2Kernel::Reset() ataUpsampleHighTweak = 0.0414213562373095048801688; //more adds treble to upsampling ataDecay = 0.915965594177219015; //Catalan's constant, more adds focus and clarity ataFlip = false; //end reset of antialias parameters - demotimer = 0; lastSample = 0.0; + fpNShape = 0.0; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -255,6 +255,12 @@ void Slew2::Slew2Kernel::Process( const Float32 *inSourceP, ataPrevDiffSample = ataDiffSample / 2.0; //apply processing as difference to non-oversampled raw input + //32 bit dither, made small and tidy. + int expon; frexpf((Float32)inputSample, &expon); + long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); + inputSample += (dither-fpNShape); fpNShape = dither; + //end 32 bit dither + *destP = inputSample; //built in output trim and dry/wet by default diff --git a/plugins/MacAU/Slew2/Slew2.h b/plugins/MacAU/Slew2/Slew2.h index 236a415..4e16def 100755 --- a/plugins/MacAU/Slew2/Slew2.h +++ b/plugins/MacAU/Slew2/Slew2.h @@ -140,8 +140,8 @@ public: Float64 ataDiffSample; Float64 ataPrevDiffSample; bool ataFlip; //end defining of antialiasing variables - int demotimer; Float64 lastSample; + long double fpNShape; }; }; diff --git a/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.pbxuser index c33013d..d905aae 100755 --- a/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.pbxuser @@ -10,7 +10,7 @@ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, - 364, + 427, 20, 48, 43, @@ -49,13 +49,14 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 528457914; - PBXWorkspaceStateSaveDate = 528457914; + PBXPerProjectTemplateStateSaveDate = 569679497; + PBXWorkspaceStateSaveDate = 569679497; }; perUserProjectItems = { 8B41AFAA1DA1D3B100555FA2 /* PBXTextBookmark */ = 8B41AFAA1DA1D3B100555FA2 /* PBXTextBookmark */; - 8B9D670A1F7C8F10007AB60F /* PBXTextBookmark */ = 8B9D670A1F7C8F10007AB60F /* PBXTextBookmark */; - 8B9D760A1F7FA10A007AB60F /* PBXTextBookmark */ = 8B9D760A1F7FA10A007AB60F /* PBXTextBookmark */; + 8B79301821F49F45006E9731 /* PBXTextBookmark */ = 8B79301821F49F45006E9731 /* PBXTextBookmark */; + 8B79301A21F49F45006E9731 /* PBXTextBookmark */ = 8B79301A21F49F45006E9731 /* PBXTextBookmark */; + 8B79301F21F49F56006E9731 /* PBXTextBookmark */ = 8B79301F21F49F56006E9731 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { @@ -71,31 +72,41 @@ vrLen = 12; vrLoc = 0; }; - 8B9D670A1F7C8F10007AB60F /* PBXTextBookmark */ = { + 8B79301821F49F45006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BC6025B073B072D006C4272 /* Slew2.h */; - name = "Slew2.h: 126"; + name = "Slew2.h: 143"; rLen = 0; - rLoc = 4945; + rLoc = 5356; rType = 0; - vrLen = 78; - vrLoc = 2972; + vrLen = 948; + vrLoc = 4563; }; - 8B9D760A1F7FA10A007AB60F /* PBXTextBookmark */ = { + 8B79301A21F49F45006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8BC6025B073B072D006C4272 /* Slew2.h */; - name = "Slew2.h: 126"; + fRef = 8BA05A660720730100365D66 /* Slew2.cpp */; + name = "Slew2.cpp: 263"; + rLen = 0; + rLoc = 12140; + rType = 0; + vrLen = 1567; + vrLoc = 10707; + }; + 8B79301F21F49F56006E9731 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Slew2.cpp */; + name = "Slew2.cpp: 263"; rLen = 0; - rLoc = 4945; + rLoc = 12140; rType = 0; - vrLen = 70; - vrLoc = 2980; + vrLen = 1613; + vrLoc = 10661; }; 8BA05A660720730100365D66 /* Slew2.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1027, 3497}}"; - sepNavSelRange = "{8581, 0}"; - sepNavVisRange = "{8239, 2561}"; + sepNavIntBoundsRect = "{{0, 0}, {1027, 3575}}"; + sepNavSelRange = "{12140, 0}"; + sepNavVisRange = "{10661, 1613}"; sepNavWindowFrame = "{{548, 41}, {892, 828}}"; }; }; @@ -116,9 +127,9 @@ }; 8BC6025B073B072D006C4272 /* Slew2.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {554, 2119}}"; - sepNavSelRange = "{4945, 0}"; - sepNavVisRange = "{2980, 70}"; + sepNavIntBoundsRect = "{{0, 0}, {922, 2301}}"; + sepNavSelRange = "{5356, 0}"; + sepNavVisRange = "{4563, 948}"; sepNavWindowFrame = "{{548, 50}, {892, 828}}"; }; }; diff --git a/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.perspectivev3 index 4765fda..43df8cf 100755 --- a/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Slew2/Slew2.xcodeproj/christopherjohnson.perspectivev3 @@ -225,8 +225,8 @@ <array/> <key>PerspectiveWidths</key> <array> - <integer>-1</integer> - <integer>-1</integer> + <integer>835</integer> + <integer>835</integer> </array> <key>Perspectives</key> <array> @@ -256,8 +256,6 @@ <key>Layout</key> <array> <dict> - <key>BecomeActive</key> - <true/> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> @@ -282,7 +280,7 @@ <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> - <real>185</real> + <real>147</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> @@ -307,7 +305,7 @@ </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> - <string>{{0, 0}, {185, 428}}</string> + <string>{{0, 0}, {147, 699}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> @@ -317,19 +315,19 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {202, 446}}</string> + <string>{{0, 0}, {164, 717}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> - <real>185</real> + <real>147</real> </array> <key>RubberWindowFrame</key> - <string>630 353 810 487 0 0 1440 878 </string> + <string>433 98 835 758 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> - <string>202pt</string> + <string>164pt</string> </dict> <dict> <key>Dock</key> @@ -340,7 +338,7 @@ <key>PBXProjectModuleGUID</key> <string>8B41AF5A1DA1CCC700555FA2</string> <key>PBXProjectModuleLabel</key> - <string>Slew2.h</string> + <string>Slew2.cpp</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> @@ -348,15 +346,16 @@ <key>PBXProjectModuleGUID</key> <string>8B41AF5B1DA1CCC700555FA2</string> <key>PBXProjectModuleLabel</key> - <string>Slew2.h</string> + <string>Slew2.cpp</string> <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8B9D760A1F7FA10A007AB60F</string> + <string>8B79301F21F49F56006E9731</string> <key>history</key> <array> <string>8B41AFAA1DA1D3B100555FA2</string> - <string>8B9D670A1F7C8F10007AB60F</string> + <string>8B79301821F49F45006E9731</string> + <string>8B79301A21F49F45006E9731</string> </array> </dict> <key>SplitCount</key> @@ -370,18 +369,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {603, 69}}</string> + <string>{{0, 0}, {666, 538}}</string> <key>RubberWindowFrame</key> - <string>630 353 810 487 0 0 1440 878 </string> + <string>433 98 835 758 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> - <string>69pt</string> + <string>538pt</string> </dict> <dict> <key>Proportion</key> - <string>372pt</string> + <string>174pt</string> <key>Tabs</key> <array> <dict> @@ -395,9 +394,7 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {603, 345}}</string> - <key>RubberWindowFrame</key> - <string>630 353 810 487 0 0 1440 878 </string> + <string>{{10, 27}, {666, 147}}</string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -451,7 +448,9 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {603, 414}}</string> + <string>{{10, 27}, {666, 147}}</string> + <key>RubberWindowFrame</key> + <string>433 98 835 758 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> @@ -460,7 +459,7 @@ </dict> </array> <key>Proportion</key> - <string>603pt</string> + <string>666pt</string> </dict> </array> <key>Name</key> @@ -479,11 +478,11 @@ </array> <key>TableOfContents</key> <array> - <string>8B9D760B1F7FA10A007AB60F</string> + <string>8B79302021F49F56006E9731</string> <string>1CA23ED40692098700951B8B</string> - <string>8B9D760C1F7FA10A007AB60F</string> + <string>8B79302121F49F56006E9731</string> <string>8B41AF5A1DA1CCC700555FA2</string> - <string>8B9D760D1F7FA10A007AB60F</string> + <string>8B79302221F49F56006E9731</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -636,7 +635,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>528457994.05700201</real> + <real>569679702.44383299</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -653,11 +652,10 @@ <integer>5</integer> <key>WindowOrderList</key> <array> - <string>8B9D760E1F7FA10A007AB60F</string> <string>/Users/christopherjohnson/Desktop/MacAU/Slew2/Slew2.xcodeproj</string> </array> <key>WindowString</key> - <string>630 353 810 487 0 0 1440 878 </string> + <string>433 98 835 758 0 0 1440 878 </string> <key>WindowToolsV3</key> <array> <dict> |