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/Channel6 | |
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/Channel6')
3 files changed, 54 insertions, 64 deletions
diff --git a/plugins/MacAU/Channel6/Channel6.cpp b/plugins/MacAU/Channel6/Channel6.cpp index a0e543c..160b961 100755 --- a/plugins/MacAU/Channel6/Channel6.cpp +++ b/plugins/MacAU/Channel6/Channel6.cpp @@ -284,22 +284,15 @@ void Channel6::Channel6Kernel::Process( const Float32 *inSourceP, { 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. -}
\ No newline at end of file +} diff --git a/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.pbxuser index 108e0b5..46650ee 100755 --- a/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.pbxuser @@ -49,19 +49,39 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 553993498; - PBXWorkspaceStateSaveDate = 553993498; + PBXPerProjectTemplateStateSaveDate = 569591253; + PBXWorkspaceStateSaveDate = 569591253; }; perUserProjectItems = { + 8B79290F21F3460C006E9731 /* PBXTextBookmark */ = 8B79290F21F3460C006E9731 /* PBXTextBookmark */; + 8B79291421F3461E006E9731 /* PBXTextBookmark */ = 8B79291421F3461E006E9731 /* PBXTextBookmark */; 8B97541F2103D42D00A4FFA3 /* PBXTextBookmark */ = 8B97541F2103D42D00A4FFA3 /* PBXTextBookmark */; 8BB8B7512103B13800751000 /* PlistBookmark */ = 8BB8B7512103B13800751000 /* PlistBookmark */; - 8BBD18BF2105439F0015A233 /* PBXTextBookmark */ = 8BBD18BF2105439F0015A233 /* PBXTextBookmark */; - 8BBD18F5210547560015A233 /* PBXTextBookmark */ = 8BBD18F5210547560015A233 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B79290F21F3460C006E9731 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Channel6.cpp */; + name = "Channel6.cpp: 216"; + rLen = 0; + rLoc = 9427; + rType = 0; + vrLen = 338; + vrLoc = 9262; + }; + 8B79291421F3461E006E9731 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Channel6.cpp */; + name = "Channel6.cpp: 216"; + rLen = 0; + rLoc = 9427; + rType = 0; + vrLen = 338; + vrLoc = 9262; + }; 8B97541F2103D42D00A4FFA3 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BC6025B073B072D006C4272 /* Channel6.h */; @@ -74,10 +94,10 @@ }; 8BA05A660720730100365D66 /* Channel6.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {656, 4030}}"; + sepNavIntBoundsRect = "{{0, 0}, {656, 3874}}"; sepNavSelRange = "{9427, 0}"; - sepNavVisRange = "{9225, 393}"; - sepNavWindowFrame = "{{659, 57}, {850, 821}}"; + sepNavVisRange = "{9262, 338}"; + sepNavWindowFrame = "{{442, 57}, {850, 821}}"; }; }; 8BA05A670720730100365D66 /* Channel6.exp */ = { @@ -108,32 +128,12 @@ rLen = 0; rLoc = 9223372036854775808; }; - 8BBD18BF2105439F0015A233 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Channel6.cpp */; - name = "Channel6.cpp: 216"; - rLen = 0; - rLoc = 9427; - rType = 0; - vrLen = 439; - vrLoc = 9182; - }; - 8BBD18F5210547560015A233 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Channel6.cpp */; - name = "Channel6.cpp: 216"; - rLen = 0; - rLoc = 9427; - rType = 0; - vrLen = 393; - vrLoc = 9225; - }; 8BC6025B073B072D006C4272 /* Channel6.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {894, 2015}}"; - sepNavSelRange = "{5615, 0}"; - sepNavVisRange = "{2424, 1290}"; - sepNavWindowFrame = "{{600, 57}, {850, 821}}"; + sepNavIntBoundsRect = "{{0, 0}, {894, 1989}}"; + sepNavSelRange = "{5497, 0}"; + sepNavVisRange = "{4141, 1596}"; + sepNavWindowFrame = "{{590, 57}, {850, 821}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.perspectivev3 index 42ecf8f..ffc3590 100755 --- a/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Channel6/Channel6.xcodeproj/christopherjohnson.perspectivev3 @@ -256,8 +256,6 @@ <key>Layout</key> <array> <dict> - <key>BecomeActive</key> - <true/> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> @@ -326,7 +324,7 @@ <real>288</real> </array> <key>RubberWindowFrame</key> - <string>592 182 841 654 0 0 1440 878 </string> + <string>463 218 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> @@ -354,12 +352,12 @@ <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8BBD18F5210547560015A233</string> + <string>8B79291421F3461E006E9731</string> <key>history</key> <array> <string>8BB8B7512103B13800751000</string> <string>8B97541F2103D42D00A4FFA3</string> - <string>8BBD18BF2105439F0015A233</string> + <string>8B79290F21F3460C006E9731</string> </array> </dict> <key>SplitCount</key> @@ -373,18 +371,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {531, 173}}</string> + <string>{{0, 0}, {531, 142}}</string> <key>RubberWindowFrame</key> - <string>592 182 841 654 0 0 1440 878 </string> + <string>463 218 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> - <string>173pt</string> + <string>142pt</string> </dict> <dict> <key>Proportion</key> - <string>435pt</string> + <string>466pt</string> <key>Tabs</key> <array> <dict> @@ -398,9 +396,7 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 408}}</string> - <key>RubberWindowFrame</key> - <string>592 182 841 654 0 0 1440 878 </string> + <string>{{10, 27}, {531, 439}}</string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -454,7 +450,9 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 339}}</string> + <string>{{10, 27}, {531, 439}}</string> + <key>RubberWindowFrame</key> + <string>463 218 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> @@ -482,11 +480,11 @@ </array> <key>TableOfContents</key> <array> - <string>8BBD18F6210547560015A233</string> + <string>8B79291521F3461E006E9731</string> <string>1CA23ED40692098700951B8B</string> - <string>8BBD18F7210547560015A233</string> + <string>8B79291621F3461E006E9731</string> <string>8BD7274A1D46E5A5000176F0</string> - <string>8BBD18F8210547560015A233</string> + <string>8B79291721F3461E006E9731</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -659,7 +657,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>553994070.73831797</real> + <real>569591326.09985697</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -676,11 +674,10 @@ <integer>5</integer> <key>WindowOrderList</key> <array> - <string>8BBD18F9210547560015A233</string> <string>/Users/christopherjohnson/Desktop/MacAU/Channel6/Channel6.xcodeproj</string> </array> <key>WindowString</key> - <string>592 182 841 654 0 0 1440 878 </string> + <string>463 218 841 654 0 0 1440 878 </string> <key>WindowToolsV3</key> <array> <dict> |