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/Righteous4 | |
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/Righteous4')
3 files changed, 57 insertions, 54 deletions
diff --git a/plugins/MacAU/Righteous4/Righteous4.cpp b/plugins/MacAU/Righteous4/Righteous4.cpp index f20e5ec..be1a1f6 100755 --- a/plugins/MacAU/Righteous4/Righteous4.cpp +++ b/plugins/MacAU/Righteous4/Righteous4.cpp @@ -412,14 +412,11 @@ void Righteous4::Righteous4Kernel::Process( const Float32 *inSourceP, //output dither section if (bitDepth == 3) { - //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 } else { //entire Naturalize section used when not on 32 bit out @@ -519,10 +516,5 @@ void Righteous4::Righteous4Kernel::Process( const Float32 *inSourceP, 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/Righteous4/Righteous4.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.pbxuser index b81dbe3..9104560 100755 --- a/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.pbxuser @@ -49,19 +49,50 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 548108471; - PBXWorkspaceStateSaveDate = 548108471; + PBXPerProjectTemplateStateSaveDate = 569678261; + PBXWorkspaceStateSaveDate = 569678261; }; perUserProjectItems = { + 8B792FA321F49A2F006E9731 /* PBXTextBookmark */ = 8B792FA321F49A2F006E9731 /* PBXTextBookmark */; + 8B792FA521F49A2F006E9731 /* PBXTextBookmark */ = 8B792FA521F49A2F006E9731 /* PBXTextBookmark */; + 8B792FAA21F49A42006E9731 /* PBXTextBookmark */ = 8B792FAA21F49A42006E9731 /* PBXTextBookmark */; 8B7E3DB220A6725600482CB5 /* PBXTextBookmark */ = 8B7E3DB220A6725600482CB5 /* PBXTextBookmark */; 8B904BD0209D3B52008CBAD8 /* PlistBookmark */ = 8B904BD0209D3B52008CBAD8 /* PlistBookmark */; - 8BBFF82820AD804F005650EF /* PBXTextBookmark */ = 8BBFF82820AD804F005650EF /* PBXTextBookmark */; - 8BBFF86720AD84A3005650EF /* PBXTextBookmark */ = 8BBFF86720AD84A3005650EF /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B792FA321F49A2F006E9731 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Righteous4.h */; + name = "Righteous4.h: 169"; + rLen = 0; + rLoc = 6101; + rType = 0; + vrLen = 439; + vrLoc = 5895; + }; + 8B792FA521F49A2F006E9731 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Righteous4.cpp */; + name = "Righteous4.cpp: 355"; + rLen = 0; + rLoc = 16702; + rType = 0; + vrLen = 960; + vrLoc = 18184; + }; + 8B792FAA21F49A42006E9731 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Righteous4.cpp */; + name = "Righteous4.cpp: 355"; + rLen = 0; + rLoc = 16702; + rType = 0; + vrLen = 960; + vrLoc = 18184; + }; 8B7E3DB220A6725600482CB5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* Righteous4Version.h */; @@ -86,10 +117,10 @@ }; 8BA05A660720730100365D66 /* Righteous4.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {838, 6825}}"; + sepNavIntBoundsRect = "{{0, 0}, {838, 6981}}"; sepNavSelRange = "{16702, 0}"; - sepNavVisRange = "{16728, 303}"; - sepNavWindowFrame = "{{-2, 59}, {1007, 819}}"; + sepNavVisRange = "{18184, 960}"; + sepNavWindowFrame = "{{290, 59}, {1007, 819}}"; }; }; 8BA05A690720730100365D66 /* Righteous4Version.h */ = { @@ -100,31 +131,11 @@ sepNavWindowFrame = "{{15, 41}, {816, 832}}"; }; }; - 8BBFF82820AD804F005650EF /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Righteous4.cpp */; - name = "Righteous4.cpp: 355"; - rLen = 0; - rLoc = 16702; - rType = 0; - vrLen = 303; - vrLoc = 16728; - }; - 8BBFF86720AD84A3005650EF /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Righteous4.cpp */; - name = "Righteous4.cpp: 355"; - rLen = 0; - rLoc = 16702; - rType = 0; - vrLen = 303; - vrLoc = 16728; - }; 8BC6025B073B072D006C4272 /* Righteous4.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {894, 2392}}"; + sepNavIntBoundsRect = "{{0, 0}, {803, 2756}}"; sepNavSelRange = "{6101, 0}"; - sepNavVisRange = "{5232, 1102}"; + sepNavVisRange = "{5895, 439}"; sepNavWindowFrame = "{{687, 14}, {816, 832}}"; }; }; diff --git a/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.perspectivev3 index 90a4f18..fae6e0d 100755 --- a/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Righteous4/Righteous4.xcodeproj/christopherjohnson.perspectivev3 @@ -352,12 +352,13 @@ <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8BBFF86720AD84A3005650EF</string> + <string>8B792FAA21F49A42006E9731</string> <key>history</key> <array> <string>8B904BD0209D3B52008CBAD8</string> <string>8B7E3DB220A6725600482CB5</string> - <string>8BBFF82820AD804F005650EF</string> + <string>8B792FA321F49A2F006E9731</string> + <string>8B792FA521F49A2F006E9731</string> </array> </dict> <key>SplitCount</key> @@ -371,18 +372,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {531, 74}}</string> + <string>{{0, 0}, {531, 370}}</string> <key>RubberWindowFrame</key> <string>599 193 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> - <string>74pt</string> + <string>370pt</string> </dict> <dict> <key>Proportion</key> - <string>534pt</string> + <string>238pt</string> <key>Tabs</key> <array> <dict> @@ -396,7 +397,7 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 507}}</string> + <string>{{10, 27}, {531, 211}}</string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -450,7 +451,7 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 507}}</string> + <string>{{10, 27}, {531, 211}}</string> <key>RubberWindowFrame</key> <string>599 193 841 654 0 0 1440 878 </string> </dict> @@ -480,11 +481,11 @@ </array> <key>TableOfContents</key> <array> - <string>8BBFF86820AD84A3005650EF</string> + <string>8B792FAB21F49A42006E9731</string> <string>1CA23ED40692098700951B8B</string> - <string>8BBFF86920AD84A3005650EF</string> + <string>8B792FAC21F49A42006E9731</string> <string>8BD7274A1D46E5A5000176F0</string> - <string>8BBFF86A20AD84A3005650EF</string> + <string>8B792FAD21F49A42006E9731</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -657,7 +658,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>548242595.39476001</real> + <real>569678402.692945</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -674,7 +675,6 @@ <integer>5</integer> <key>WindowOrderList</key> <array> - <string>8BBFF86B20AD84A3005650EF</string> <string>/Users/christopherjohnson/Desktop/MacAU/Righteous4/Righteous4.xcodeproj</string> </array> <key>WindowString</key> |