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/ADT | |
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/ADT')
-rwxr-xr-x | plugins/MacAU/ADT/ADT.cpp | 18 | ||||
-rwxr-xr-x | plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser | 42 | ||||
-rwxr-xr-x | plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 | 28 |
3 files changed, 40 insertions, 48 deletions
diff --git a/plugins/MacAU/ADT/ADT.cpp b/plugins/MacAU/ADT/ADT.cpp index b12c056..098adaa 100755 --- a/plugins/MacAU/ADT/ADT.cpp +++ b/plugins/MacAU/ADT/ADT.cpp @@ -317,23 +317,15 @@ void ADT::ADTKernel::Process( const Float32 *inSourceP, if (output < 1.0) inputSample *= output; - //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/ADT/ADT.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser index 2f05153..3d176d1 100755 --- a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 561258474; - PBXWorkspaceStateSaveDate = 561258474; + PBXPerProjectTemplateStateSaveDate = 569588119; + PBXWorkspaceStateSaveDate = 569588119; }; perUserProjectItems = { 8B15DB8E21742E37007AD769 /* PlistBookmark */ = 8B15DB8E21742E37007AD769 /* PlistBookmark */; - 8BE627BC215F0C7700E4E476 /* PlistBookmark */ = 8BE627BC215F0C7700E4E476 /* PlistBookmark */; + 8B79275021F339F0006E9731 /* PlistBookmark */ = 8B79275021F339F0006E9731 /* PlistBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { @@ -72,12 +72,24 @@ rLen = 0; rLoc = 0; }; + 8B79275021F339F0006E9731 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleName, + ); + name = /Users/christopherjohnson/Desktop/MacAU/ADT/Info.plist; + rLen = 0; + rLoc = 0; + }; 8BA05A660720730100365D66 /* ADT.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {719, 4563}}"; - sepNavSelRange = "{14352, 0}"; - sepNavVisRange = "{0, 0}"; - sepNavWindowFrame = "{{701, 68}, {890, 810}}"; + sepNavIntBoundsRect = "{{0, 0}, {843, 4654}}"; + sepNavSelRange = "{13854, 0}"; + sepNavVisRange = "{12187, 1670}"; + sepNavWindowFrame = "{{396, 68}, {890, 810}}"; }; }; 8BA05A690720730100365D66 /* ADTVersion.h */ = { @@ -92,8 +104,8 @@ uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {894, 2028}}"; sepNavSelRange = "{5711, 0}"; - sepNavVisRange = "{2516, 1388}"; - sepNavWindowFrame = "{{712, 68}, {890, 810}}"; + sepNavVisRange = "{4340, 1557}"; + sepNavWindowFrame = "{{550, 68}, {890, 810}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { @@ -110,18 +122,6 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8BE627BC215F0C7700E4E476 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - CFBundleName, - ); - name = /Users/christopherjohnson/Desktop/MacAU/ADT/Info.plist; - rLen = 0; - rLoc = 9223372036854775808; - }; 8D01CCC60486CAD60068D4B7 /* ADT */ = { activeExec = 0; }; diff --git a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 index fb2f9be..4fab981 100755 --- a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 @@ -225,8 +225,8 @@ <array/> <key>PerspectiveWidths</key> <array> - <integer>841</integer> - <integer>841</integer> + <integer>653</integer> + <integer>653</integer> </array> <key>Perspectives</key> <array> @@ -324,7 +324,7 @@ <real>288</real> </array> <key>RubberWindowFrame</key> - <string>775 349 653 504 0 0 1440 878 </string> + <string>597 292 653 504 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> @@ -352,10 +352,10 @@ <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8B15DB8E21742E37007AD769</string> + <string>8B79275021F339F0006E9731</string> <key>history</key> <array> - <string>8BE627BC215F0C7700E4E476</string> + <string>8B15DB8E21742E37007AD769</string> </array> </dict> <key>SplitCount</key> @@ -371,7 +371,7 @@ <key>Frame</key> <string>{{0, 0}, {343, 0}}</string> <key>RubberWindowFrame</key> - <string>775 349 653 504 0 0 1440 878 </string> + <string>597 292 653 504 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> @@ -395,8 +395,6 @@ <dict> <key>Frame</key> <string>{{10, 27}, {343, 431}}</string> - <key>RubberWindowFrame</key> - <string>775 349 653 504 0 0 1440 878 </string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -450,7 +448,9 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 339}}</string> + <string>{{10, 27}, {343, 431}}</string> + <key>RubberWindowFrame</key> + <string>597 292 653 504 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> @@ -478,11 +478,11 @@ </array> <key>TableOfContents</key> <array> - <string>8B15DB7F21741FEB007AD769</string> + <string>8B79274221F339AE006E9731</string> <string>1CA23ED40692098700951B8B</string> - <string>8B15DB8021741FEB007AD769</string> + <string>8B79274321F339AE006E9731</string> <string>8BD7274A1D46E5A5000176F0</string> - <string>8B15DB8121741FEB007AD769</string> + <string>8B79274421F339AE006E9731</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -655,7 +655,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>561262135.87675905</real> + <real>569588208.91309297</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -675,7 +675,7 @@ <string>/Users/christopherjohnson/Desktop/MacAU/ADT/ADT.xcodeproj</string> </array> <key>WindowString</key> - <string>775 349 653 504 0 0 1440 878 </string> + <string>597 292 653 504 0 0 1440 878 </string> <key>WindowToolsV3</key> <array> <dict> |