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/Gatelope | |
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/Gatelope')
3 files changed, 32 insertions, 98 deletions
diff --git a/plugins/MacAU/Gatelope/Gatelope.cpp b/plugins/MacAU/Gatelope/Gatelope.cpp index bde6522..3f6ed4e 100755 --- a/plugins/MacAU/Gatelope/Gatelope.cpp +++ b/plugins/MacAU/Gatelope/Gatelope.cpp @@ -334,23 +334,15 @@ void Gatelope::GatelopeKernel::Process( const Float32 *inSourceP, flip = !flip; - //noise shaping to 32-bit floating point - Float32 fpTemp = inputSample; - fpNShape += (inputSample-fpTemp); - inputSample += fpNShape; - //for deeper space and warmth, we try a non-oscillating noise shaping - //that is kind of ruthless: it will forever retain the rounding errors - //except we'll dial it back a hair at the end of every buffer processed - //end noise shaping on 32 bit output + //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; sourceP += inNumChannels; destP += inNumChannels; } - fpNShape *= 0.999999; - //we will just delicately dial back the FP noise shaping, not even every sample - //this is a good place to put subtle 'no runaway' calculations, though bear in mind - //that it will be called more often when you use shorter sample buffers in the DAW. - //So, very low latency operation will call these calculations more often. } diff --git a/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser index 7846c86..fdc4740 100755 --- a/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser @@ -49,15 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 565571362; - PBXWorkspaceStateSaveDate = 565571362; + PBXPerProjectTemplateStateSaveDate = 569646970; + PBXWorkspaceStateSaveDate = 569646970; }; perUserProjectItems = { 8B0209A521B3215F00952287 /* PlistBookmark */ = 8B0209A521B3215F00952287 /* PlistBookmark */; - 8B416D2421B5EF2500DD5013 /* PBXBookmark */ = 8B416D2421B5EF2500DD5013 /* PBXBookmark */; - 8B416D2921B5FD1F00DD5013 /* PBXTextBookmark */ = 8B416D2921B5FD1F00DD5013 /* PBXTextBookmark */; - 8B416D2E21B5FD3000DD5013 /* PBXTextBookmark */ = 8B416D2E21B5FD3000DD5013 /* PBXTextBookmark */; - 8B416D3421B5FD3000DD5013 /* PBXTextBookmark */ = 8B416D3421B5FD3000DD5013 /* PBXTextBookmark */; + 8B792C9021F41F9A006E9731 /* PBXTextBookmark */ = 8B792C9021F41F9A006E9731 /* PBXTextBookmark */; + 8B792C9521F420BF006E9731 /* PBXTextBookmark */ = 8B792C9521F420BF006E9731 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { @@ -75,11 +73,7 @@ rLen = 0; rLoc = 9223372036854775808; }; - 8B416D2421B5EF2500DD5013 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 8BA05A660720730100365D66 /* Gatelope.cpp */; - }; - 8B416D2921B5FD1F00DD5013 /* PBXTextBookmark */ = { + 8B792C9021F41F9A006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* GatelopeVersion.h */; name = "GatelopeVersion.h: 54"; @@ -89,7 +83,7 @@ vrLen = 126; vrLoc = 2816; }; - 8B416D2E21B5FD3000DD5013 /* PBXTextBookmark */ = { + 8B792C9521F420BF006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* GatelopeVersion.h */; name = "GatelopeVersion.h: 54"; @@ -99,22 +93,12 @@ vrLen = 126; vrLoc = 2816; }; - 8B416D3421B5FD3000DD5013 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Gatelope.cpp */; - name = "Gatelope.cpp: 325"; - rLen = 0; - rLoc = 13129; - rType = 0; - vrLen = 1897; - vrLoc = 12493; - }; 8BA05A660720730100365D66 /* Gatelope.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1082, 5057}}"; - sepNavSelRange = "{13129, 0}"; - sepNavVisRange = "{12493, 1897}"; - sepNavWindowFrame = "{{15, 39}, {1129, 834}}"; + sepNavIntBoundsRect = "{{0, 0}, {1082, 4979}}"; + sepNavSelRange = "{13893, 0}"; + sepNavVisRange = "{12404, 1492}"; + sepNavWindowFrame = "{{185, 44}, {1129, 834}}"; }; }; 8BA05A670720730100365D66 /* Gatelope.exp */ = { @@ -127,7 +111,7 @@ }; 8BA05A690720730100365D66 /* GatelopeVersion.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {456, 923}}"; + sepNavIntBoundsRect = "{{0, 0}, {456, 871}}"; sepNavSelRange = "{2884, 4}"; sepNavVisRange = "{2816, 126}"; sepNavWindowFrame = "{{15, 43}, {705, 830}}"; diff --git a/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 index 1a46c04..7009de0 100755 --- a/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 @@ -222,48 +222,7 @@ </dict> </array> <key>OpenEditors</key> - <array> - <dict> - <key>Content</key> - <dict> - <key>PBXProjectModuleGUID</key> - <string>8B416D3221B5FD3000DD5013</string> - <key>PBXProjectModuleLabel</key> - <string>Gatelope.cpp</string> - <key>PBXSplitModuleInNavigatorKey</key> - <dict> - <key>Split0</key> - <dict> - <key>PBXProjectModuleGUID</key> - <string>8B416D3321B5FD3000DD5013</string> - <key>PBXProjectModuleLabel</key> - <string>Gatelope.cpp</string> - <key>_historyCapacity</key> - <integer>0</integer> - <key>bookmark</key> - <string>8B416D3421B5FD3000DD5013</string> - <key>history</key> - <array> - <string>8B416D2421B5EF2500DD5013</string> - </array> - </dict> - <key>SplitCount</key> - <string>1</string> - </dict> - <key>StatusBarVisibility</key> - <true/> - </dict> - <key>Geometry</key> - <dict> - <key>Frame</key> - <string>{{0, 20}, {1129, 737}}</string> - <key>PBXModuleWindowStatusBarHidden2</key> - <false/> - <key>RubberWindowFrame</key> - <string>15 95 1129 778 0 0 1440 878 </string> - </dict> - </dict> - </array> + <array/> <key>PerspectiveWidths</key> <array> <integer>815</integer> @@ -365,7 +324,7 @@ <real>288</real> </array> <key>RubberWindowFrame</key> - <string>46 385 815 372 0 0 1440 878 </string> + <string>278 409 815 372 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> @@ -393,11 +352,11 @@ <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8B416D2E21B5FD3000DD5013</string> + <string>8B792C9521F420BF006E9731</string> <key>history</key> <array> <string>8B0209A521B3215F00952287</string> - <string>8B416D2921B5FD1F00DD5013</string> + <string>8B792C9021F41F9A006E9731</string> </array> </dict> <key>SplitCount</key> @@ -411,18 +370,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {505, 67}}</string> + <string>{{0, 0}, {505, 50}}</string> <key>RubberWindowFrame</key> - <string>46 385 815 372 0 0 1440 878 </string> + <string>278 409 815 372 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> - <string>67pt</string> + <string>50pt</string> </dict> <dict> <key>Proportion</key> - <string>259pt</string> + <string>276pt</string> <key>Tabs</key> <array> <dict> @@ -436,7 +395,7 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {505, 232}}</string> + <string>{{10, 27}, {505, 249}}</string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -490,9 +449,9 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {505, 232}}</string> + <string>{{10, 27}, {505, 249}}</string> <key>RubberWindowFrame</key> - <string>46 385 815 372 0 0 1440 878 </string> + <string>278 409 815 372 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> @@ -520,11 +479,11 @@ </array> <key>TableOfContents</key> <array> - <string>8B416D2F21B5FD3000DD5013</string> + <string>8B792C9621F420BF006E9731</string> <string>1CA23ED40692098700951B8B</string> - <string>8B416D3021B5FD3000DD5013</string> + <string>8B792C9721F420BF006E9731</string> <string>8BD7274A1D46E5A5000176F0</string> - <string>8B416D3121B5FD3000DD5013</string> + <string>8B792C9821F420BF006E9731</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -697,7 +656,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>565574960.58745801</real> + <real>569647295.48975003</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -714,11 +673,10 @@ <integer>5</integer> <key>WindowOrderList</key> <array> - <string>8B416D3221B5FD3000DD5013</string> <string>/Users/christopherjohnson/Desktop/MacAU/Gatelope/Gatelope.xcodeproj</string> </array> <key>WindowString</key> - <string>46 385 815 372 0 0 1440 878 </string> + <string>278 409 815 372 0 0 1440 878 </string> <key>WindowToolsV3</key> <array> <dict> |