aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU/Pop
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/Pop
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/Pop')
-rwxr-xr-xplugins/MacAU/Pop/Pop.cpp21
-rwxr-xr-xplugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.pbxuser57
-rwxr-xr-xplugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.perspectivev336
3 files changed, 55 insertions, 59 deletions
diff --git a/plugins/MacAU/Pop/Pop.cpp b/plugins/MacAU/Pop/Pop.cpp
index 62acd34..d1e96e1 100755
--- a/plugins/MacAU/Pop/Pop.cpp
+++ b/plugins/MacAU/Pop/Pop.cpp
@@ -341,23 +341,16 @@ void Pop::PopKernel::Process( const Float32 *inSourceP,
flip = !flip;
if (output < 1.0) inputSample *= output;
- if (wet<1.0) inputSample = (drySample*(1.0-wet))+(inputSample*wet);
+ if (wet < 1.0) inputSample = (drySample*(1.0-wet))+(inputSample*wet);
- //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/Pop/Pop.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.pbxuser
index b860d50..482d742 100755
--- a/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.pbxuser
@@ -49,14 +49,14 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 557537811;
- PBXWorkspaceStateSaveDate = 557537811;
+ PBXPerProjectTemplateStateSaveDate = 569675407;
+ PBXWorkspaceStateSaveDate = 569675407;
};
perUserProjectItems = {
8B6DBAB1213B5E6A00E44739 /* PBXTextBookmark */ = 8B6DBAB1213B5E6A00E44739 /* PBXTextBookmark */;
8B6DBAB2213B5E6A00E44739 /* PBXTextBookmark */ = 8B6DBAB2213B5E6A00E44739 /* PBXTextBookmark */;
- 8B6DBAB3213B5E6A00E44739 /* PBXTextBookmark */ = 8B6DBAB3213B5E6A00E44739 /* PBXTextBookmark */;
- 8B6DBAB5213B5E6A00E44739 /* PBXTextBookmark */ = 8B6DBAB5213B5E6A00E44739 /* PBXTextBookmark */;
+ 8B792EE421F48F26006E9731 /* PBXTextBookmark */ = 8B792EE421F48F26006E9731 /* PBXTextBookmark */;
+ 8B792EE921F48F73006E9731 /* PBXTextBookmark */ = 8B792EE921F48F73006E9731 /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
@@ -82,34 +82,39 @@
vrLen = 133;
vrLoc = 5301;
};
- 8B6DBAB3213B5E6A00E44739 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 8B6DBAB4213B5E6A00E44739 /* VariMuProc.cpp */;
- name = "VariMuProc.cpp: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 188;
- vrLoc = 0;
- };
- 8B6DBAB4213B5E6A00E44739 /* VariMuProc.cpp */ = {
+ 8B6DBAB6213B5E6A00E44739 /* VariMuProc.cpp */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.cpp;
name = VariMuProc.cpp;
path = /Users/christopherjohnson/Desktop/MacVST/VariMu/source/VariMuProc.cpp;
sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {554, 6708}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 169}";
+ };
};
- 8B6DBAB5213B5E6A00E44739 /* PBXTextBookmark */ = {
+ 8B792EE421F48F26006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8B6DBAB6213B5E6A00E44739 /* VariMuProc.cpp */;
name = "VariMuProc.cpp: 1";
rLen = 0;
rLoc = 0;
rType = 0;
- vrLen = 188;
+ vrLen = 169;
vrLoc = 0;
};
- 8B6DBAB6213B5E6A00E44739 /* VariMuProc.cpp */ = {
+ 8B792EE921F48F73006E9731 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 8B792EEA21F48F73006E9731 /* VariMuProc.cpp */;
+ name = "VariMuProc.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 169;
+ vrLoc = 0;
+ };
+ 8B792EEA21F48F73006E9731 /* VariMuProc.cpp */ = {
isa = PBXFileReference;
name = VariMuProc.cpp;
path = /Users/christopherjohnson/Desktop/MacVST/VariMu/source/VariMuProc.cpp;
@@ -117,15 +122,15 @@
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {554, 6708}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 188}";
+ sepNavVisRange = "{0, 169}";
};
};
8BA05A660720730100365D66 /* Pop.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1098, 4953}}";
- sepNavSelRange = "{10564, 3718}";
- sepNavVisRange = "{12637, 2394}";
- sepNavWindowFrame = "{{570, 66}, {1145, 812}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1098, 4758}}";
+ sepNavSelRange = "{14221, 0}";
+ sepNavVisRange = "{12566, 2051}";
+ sepNavWindowFrame = "{{205, 66}, {1145, 812}}";
};
};
8BA05A670720730100365D66 /* Pop.exp */ = {
@@ -146,10 +151,10 @@
};
8BC6025B073B072D006C4272 /* Pop.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {810, 2288}}";
+ sepNavIntBoundsRect = "{{0, 0}, {824, 2028}}";
sepNavSelRange = "{5470, 0}";
- sepNavVisRange = "{5301, 133}";
- sepNavWindowFrame = "{{691, 65}, {787, 813}}";
+ sepNavVisRange = "{4265, 1315}";
+ sepNavWindowFrame = "{{444, 65}, {787, 813}}";
};
};
8BD3CCB8148830B20062E48C /* Source Control */ = {
diff --git a/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.perspectivev3
index 117e75b..3f71234 100755
--- a/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacAU/Pop/Pop.xcodeproj/christopherjohnson.perspectivev3
@@ -298,7 +298,7 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>4</integer>
+ <integer>3</integer>
<integer>2</integer>
<integer>1</integer>
<integer>0</integer>
@@ -322,7 +322,7 @@
<real>185</real>
</array>
<key>RubberWindowFrame</key>
- <string>584 391 810 487 0 0 1440 878 </string>
+ <string>490 387 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -333,8 +333,6 @@
<key>Dock</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -352,12 +350,12 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8B6DBAB5213B5E6A00E44739</string>
+ <string>8B792EE921F48F73006E9731</string>
<key>history</key>
<array>
<string>8B6DBAB1213B5E6A00E44739</string>
<string>8B6DBAB2213B5E6A00E44739</string>
- <string>8B6DBAB3213B5E6A00E44739</string>
+ <string>8B792EE421F48F26006E9731</string>
</array>
</dict>
<key>SplitCount</key>
@@ -371,18 +369,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {603, 102}}</string>
+ <string>{{0, 0}, {603, 86}}</string>
<key>RubberWindowFrame</key>
- <string>584 391 810 487 0 0 1440 878 </string>
+ <string>490 387 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>102pt</string>
+ <string>86pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>339pt</string>
+ <string>355pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -396,9 +394,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {603, 312}}</string>
- <key>RubberWindowFrame</key>
- <string>584 391 810 487 0 0 1440 878 </string>
+ <string>{{10, 27}, {603, 328}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -452,7 +448,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {603, 297}}</string>
+ <string>{{10, 27}, {603, 328}}</string>
+ <key>RubberWindowFrame</key>
+ <string>490 387 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -480,11 +478,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8B6DBAB7213B5E6A00E44739</string>
+ <string>8B792EEB21F48F73006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8B6DBAB8213B5E6A00E44739</string>
+ <string>8B792EEC21F48F73006E9731</string>
<string>8BFDB0BC213A19540079F90D</string>
- <string>8B6DBAB9213B5E6A00E44739</string>
+ <string>8B792EED21F48F73006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -637,7 +635,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>557538922.04973304</real>
+ <real>569675635.69867206</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -657,7 +655,7 @@
<string>/Users/christopherjohnson/Desktop/MacAU/Pop/Pop.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>584 391 810 487 0 0 1440 878 </string>
+ <string>490 387 810 487 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>