aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU/DeEss
diff options
context:
space:
mode:
authorChris Johnson <jinx6568@sover.net>2019-01-27 21:13:54 -0500
committerChris Johnson <jinx6568@sover.net>2019-01-27 21:13:54 -0500
commit966f2d253cd2ee6ce140ad68095a20a9d2b63052 (patch)
treeb0400d95bd06512531ade6ddf55190a58b6a5623 /plugins/MacAU/DeEss
parent0887543349dbbec0721a1fc8b1c7deba9afefa8b (diff)
downloadairwindows-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/DeEss')
-rwxr-xr-xplugins/MacAU/DeEss/DeEss.cpp18
-rwxr-xr-xplugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.pbxuser28
-rwxr-xr-xplugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.perspectivev338
3 files changed, 37 insertions, 47 deletions
diff --git a/plugins/MacAU/DeEss/DeEss.cpp b/plugins/MacAU/DeEss/DeEss.cpp
index 1858308..bf85e76 100755
--- a/plugins/MacAU/DeEss/DeEss.cpp
+++ b/plugins/MacAU/DeEss/DeEss.cpp
@@ -276,23 +276,15 @@ void DeEss::DeEssKernel::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/DeEss/DeEss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.pbxuser
index e135353..fe46618 100755
--- a/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.pbxuser
@@ -51,18 +51,18 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 561683701;
- PBXWorkspaceStateSaveDate = 561683701;
+ PBXPerProjectTemplateStateSaveDate = 569597430;
+ PBXWorkspaceStateSaveDate = 569597430;
};
perUserProjectItems = {
- 8B15DCF1217AA138007AD769 /* PlistBookmark */ = 8B15DCF1217AA138007AD769 /* PlistBookmark */;
- 8B42FC5121604F050092969A /* PlistBookmark */ = 8B42FC5121604F050092969A /* PlistBookmark */;
+ 8B792A4121F35E2C006E9731 /* PlistBookmark */ = 8B792A4121F35E2C006E9731 /* PlistBookmark */;
+ 8B792A4621F35E3B006E9731 /* PlistBookmark */ = 8B792A4621F35E3B006E9731 /* PlistBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
};
};
- 8B15DCF1217AA138007AD769 /* PlistBookmark */ = {
+ 8B792A4121F35E2C006E9731 /* PlistBookmark */ = {
isa = PlistBookmark;
fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */;
fallbackIsa = PBXBookmark;
@@ -74,7 +74,7 @@
rLen = 0;
rLoc = 9223372036854775807;
};
- 8B42FC5121604F050092969A /* PlistBookmark */ = {
+ 8B792A4621F35E3B006E9731 /* PlistBookmark */ = {
isa = PlistBookmark;
fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */;
fallbackIsa = PBXBookmark;
@@ -83,15 +83,15 @@
CFBundleName,
);
name = /Users/christopherjohnson/Desktop/MacAU/DeEss/Info.plist;
- rLen = 0;
- rLoc = 9223372036854775808;
+ rLen = 26;
+ rLoc = 0;
};
8BA05A660720730100365D66 /* DeEss.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {843, 4056}}";
- sepNavSelRange = "{10679, 1381}";
- sepNavVisRange = "{10978, 1915}";
- sepNavWindowFrame = "{{550, 67}, {890, 810}}";
+ sepNavIntBoundsRect = "{{0, 0}, {843, 3900}}";
+ sepNavSelRange = "{12395, 0}";
+ sepNavVisRange = "{8626, 2352}";
+ sepNavWindowFrame = "{{356, 68}, {890, 810}}";
};
};
8BA05A670720730100365D66 /* DeEss.exp */ = {
@@ -114,8 +114,8 @@
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {894, 2145}}";
sepNavSelRange = "{5669, 0}";
- sepNavVisRange = "{2589, 1459}";
- sepNavWindowFrame = "{{843, 68}, {890, 810}}";
+ sepNavVisRange = "{4790, 1025}";
+ sepNavWindowFrame = "{{550, 68}, {890, 810}}";
};
};
8BD3CCB8148830B20062E48C /* Source Control */ = {
diff --git a/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.perspectivev3
index 83b64e1..3c8c7b4 100755
--- a/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacAU/DeEss/DeEss.xcodeproj/christopherjohnson.perspectivev3
@@ -225,8 +225,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
- <integer>841</integer>
- <integer>841</integer>
+ <integer>700</integer>
+ <integer>700</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>
@@ -326,7 +324,7 @@
<real>288</real>
</array>
<key>RubberWindowFrame</key>
- <string>807 197 700 649 0 0 1440 878 </string>
+ <string>562 202 700 649 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -354,10 +352,10 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8B15DCF1217AA138007AD769</string>
+ <string>8B792A4621F35E3B006E9731</string>
<key>history</key>
<array>
- <string>8B42FC5121604F050092969A</string>
+ <string>8B792A4121F35E2C006E9731</string>
</array>
</dict>
<key>SplitCount</key>
@@ -371,18 +369,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {390, 197}}</string>
+ <string>{{0, 0}, {390, 183}}</string>
<key>RubberWindowFrame</key>
- <string>807 197 700 649 0 0 1440 878 </string>
+ <string>562 202 700 649 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>197pt</string>
+ <string>183pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>406pt</string>
+ <string>420pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -396,9 +394,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {390, 379}}</string>
- <key>RubberWindowFrame</key>
- <string>807 197 700 649 0 0 1440 878 </string>
+ <string>{{10, 27}, {390, 393}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -452,7 +448,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {531, 352}}</string>
+ <string>{{10, 27}, {390, 393}}</string>
+ <key>RubberWindowFrame</key>
+ <string>562 202 700 649 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -480,11 +478,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8B15DCC9217A9CFD007AD769</string>
+ <string>8B792A4721F35E3B006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8B15DCCA217A9CFD007AD769</string>
+ <string>8B792A4821F35E3B006E9731</string>
<string>8BD7274A1D46E5A5000176F0</string>
- <string>8B15DCCB217A9CFD007AD769</string>
+ <string>8B792A4921F35E3B006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -657,7 +655,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>561684792.65047503</real>
+ <real>569597499.49246502</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -677,7 +675,7 @@
<string>/Users/christopherjohnson/Desktop/MacAU/DeEss/DeEss.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>807 197 700 649 0 0 1440 878 </string>
+ <string>562 202 700 649 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>