aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacVST/SingleEndedTriode
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/MacVST/SingleEndedTriode
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/MacVST/SingleEndedTriode')
-rwxr-xr-xplugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser43
-rwxr-xr-xplugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev377
-rwxr-xr-xplugins/MacVST/SingleEndedTriode/source/SingleEndedTriodeProc.cpp54
3 files changed, 51 insertions, 123 deletions
diff --git a/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser
index 666e6a8..76b994a 100755
--- a/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser
@@ -49,14 +49,12 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 547786592;
- PBXWorkspaceStateSaveDate = 547786592;
+ PBXPerProjectTemplateStateSaveDate = 569771858;
+ PBXWorkspaceStateSaveDate = 569771858;
};
perUserProjectItems = {
- 8B7E3E7A20A690EE00482CB5 /* PBXBookmark */ = 8B7E3E7A20A690EE00482CB5 /* PBXBookmark */;
- 8B7E3E8320A6930B00482CB5 /* XCBuildMessageTextBookmark */ = 8B7E3E8320A6930B00482CB5 /* XCBuildMessageTextBookmark */;
+ 8B793FA121F60766006E9731 /* PBXTextBookmark */ = 8B793FA121F60766006E9731 /* PBXTextBookmark */;
8B7E3E8420A6930B00482CB5 /* PBXTextBookmark */ = 8B7E3E8420A6930B00482CB5 /* PBXTextBookmark */;
- 8B7E3E8720A6930B00482CB5 /* PBXTextBookmark */ = 8B7E3E8720A6930B00482CB5 /* PBXTextBookmark */;
};
sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */;
userBuildSettings = {
@@ -80,17 +78,17 @@
};
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {838, 19747}}";
+ sepNavIntBoundsRect = "{{0, 0}, {838, 19877}}";
sepNavSelRange = "{10616, 0}";
- sepNavVisRange = "{10459, 399}";
+ sepNavVisRange = "{10459, 280}";
sepNavWindowFrame = "{{15, 42}, {895, 831}}";
};
};
24D8286F09A914000093AEF8 /* SingleEndedTriodeProc.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {848, 3978}}";
+ sepNavIntBoundsRect = "{{0, 0}, {848, 3744}}";
sepNavSelRange = "{10510, 0}";
- sepNavVisRange = "{1431, 2096}";
+ sepNavVisRange = "{3404, 1933}";
sepNavWindowFrame = "{{26, 47}, {895, 831}}";
};
};
@@ -108,18 +106,15 @@
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
- 8B7E3E7A20A690EE00482CB5 /* PBXBookmark */ = {
- isa = PBXBookmark;
- fRef = 24D8286F09A914000093AEF8 /* SingleEndedTriodeProc.cpp */;
- };
- 8B7E3E8320A6930B00482CB5 /* XCBuildMessageTextBookmark */ = {
+ 8B793FA121F60766006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- comments = "Deprecated conversion from string constant to 'char*'";
fRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */;
- fallbackIsa = XCBuildMessageTextBookmark;
- rLen = 1;
- rLoc = 306;
- rType = 1;
+ name = "audioeffectx.cpp: 307";
+ rLen = 0;
+ rLoc = 10616;
+ rType = 0;
+ vrLen = 280;
+ vrLoc = 10459;
};
8B7E3E8420A6930B00482CB5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
@@ -131,16 +126,6 @@
vrLen = 399;
vrLoc = 10459;
};
- 8B7E3E8720A6930B00482CB5 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 24D8286F09A914000093AEF8 /* SingleEndedTriodeProc.cpp */;
- name = "SingleEndedTriodeProc.cpp: 279";
- rLen = 0;
- rLoc = 10510;
- rType = 0;
- vrLen = 2096;
- vrLoc = 1431;
- };
8D01CCC60486CAD60068D4B7 /* SingleEndedTriode */ = {
activeExec = 0;
};
diff --git a/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3
index 7b7baa9..8ba4686 100755
--- a/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3
@@ -222,48 +222,7 @@
</dict>
</array>
<key>OpenEditors</key>
- <array>
- <dict>
- <key>Content</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>8B7E3E8520A6930B00482CB5</string>
- <key>PBXProjectModuleLabel</key>
- <string>SingleEndedTriodeProc.cpp</string>
- <key>PBXSplitModuleInNavigatorKey</key>
- <dict>
- <key>Split0</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>8B7E3E8620A6930B00482CB5</string>
- <key>PBXProjectModuleLabel</key>
- <string>SingleEndedTriodeProc.cpp</string>
- <key>_historyCapacity</key>
- <integer>0</integer>
- <key>bookmark</key>
- <string>8B7E3E8720A6930B00482CB5</string>
- <key>history</key>
- <array>
- <string>8B7E3E7A20A690EE00482CB5</string>
- </array>
- </dict>
- <key>SplitCount</key>
- <string>1</string>
- </dict>
- <key>StatusBarVisibility</key>
- <true/>
- </dict>
- <key>Geometry</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 20}, {895, 734}}</string>
- <key>PBXModuleWindowStatusBarHidden2</key>
- <false/>
- <key>RubberWindowFrame</key>
- <string>26 103 895 775 0 0 1440 878 </string>
- </dict>
- </dict>
- </array>
+ <array/>
<key>PerspectiveWidths</key>
<array>
<integer>810</integer>
@@ -297,6 +256,8 @@
<key>Layout</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@@ -362,7 +323,7 @@
<real>185</real>
</array>
<key>RubberWindowFrame</key>
- <string>27 292 810 487 0 0 1440 878 </string>
+ <string>143 323 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -390,10 +351,10 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8B7E3E8420A6930B00482CB5</string>
+ <string>8B793FA121F60766006E9731</string>
<key>history</key>
<array>
- <string>8B7E3E8320A6930B00482CB5</string>
+ <string>8B7E3E8420A6930B00482CB5</string>
</array>
</dict>
<key>SplitCount</key>
@@ -407,18 +368,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {603, 132}}</string>
+ <string>{{0, 0}, {603, 117}}</string>
<key>RubberWindowFrame</key>
- <string>27 292 810 487 0 0 1440 878 </string>
+ <string>143 323 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>132pt</string>
+ <string>117pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>309pt</string>
+ <string>324pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -432,7 +393,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {603, 414}}</string>
+ <string>{{10, 27}, {603, 297}}</string>
+ <key>RubberWindowFrame</key>
+ <string>143 323 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -487,8 +450,6 @@
<dict>
<key>Frame</key>
<string>{{10, 27}, {603, 282}}</string>
- <key>RubberWindowFrame</key>
- <string>27 292 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -516,11 +477,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8B7E3E5D20A68F7800482CB5</string>
+ <string>8B793FA221F60766006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8B7E3E5E20A68F7800482CB5</string>
+ <string>8B793FA321F60766006E9731</string>
<string>8B0237581D42B1C400E1E8C8</string>
- <string>8B7E3E5F20A68F7800482CB5</string>
+ <string>8B793FA421F60766006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -673,7 +634,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>547787531.91072297</real>
+ <real>569771878.44873595</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -691,10 +652,10 @@
<key>WindowOrderList</key>
<array>
<string>8B7E3E8520A6930B00482CB5</string>
- <string>/Users/christopherjohnson/Desktop/SingleEndedTriode/SingleEndedTriode.xcodeproj</string>
+ <string>/Users/christopherjohnson/Desktop/MacVST/SingleEndedTriode/SingleEndedTriode.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>27 292 810 487 0 0 1440 878 </string>
+ <string>143 323 810 487 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
diff --git a/plugins/MacVST/SingleEndedTriode/source/SingleEndedTriodeProc.cpp b/plugins/MacVST/SingleEndedTriode/source/SingleEndedTriodeProc.cpp
index 5781165..ef6694c 100755
--- a/plugins/MacVST/SingleEndedTriode/source/SingleEndedTriodeProc.cpp
+++ b/plugins/MacVST/SingleEndedTriode/source/SingleEndedTriodeProc.cpp
@@ -127,18 +127,14 @@ void SingleEndedTriode::processReplacing(float **inputs, float **outputs, VstInt
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
}
- //noise shaping to 32-bit floating point
- float fpTemp = inputSampleL;
- fpNShapeL += (inputSampleL-fpTemp);
- inputSampleL += fpNShapeL;
- //if this confuses you look at the wordlength for fpTemp :)
- fpTemp = inputSampleR;
- fpNShapeR += (inputSampleR-fpTemp);
- inputSampleR += fpNShapeR;
- //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
+ //stereo 32 bit dither, made small and tidy.
+ int expon; frexpf((float)inputSampleL, &expon);
+ long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62);
+ inputSampleL += (dither-fpNShapeL); fpNShapeL = dither;
+ frexpf((float)inputSampleR, &expon);
+ dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62);
+ inputSampleR += (dither-fpNShapeR); fpNShapeR = dither;
+ //end 32 bit dither
*out1 = inputSampleL;
*out2 = inputSampleR;
@@ -148,12 +144,6 @@ void SingleEndedTriode::processReplacing(float **inputs, float **outputs, VstInt
*out1++;
*out2++;
}
- fpNShapeL *= 0.999999;
- fpNShapeR *= 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.
}
void SingleEndedTriode::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
@@ -276,18 +266,16 @@ void SingleEndedTriode::processDoubleReplacing(double **inputs, double **outputs
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
}
- //noise shaping to 64-bit floating point
- double fpTemp = inputSampleL;
- fpNShapeL += (inputSampleL-fpTemp);
- inputSampleL += fpNShapeL;
- //if this confuses you look at the wordlength for fpTemp :)
- fpTemp = inputSampleR;
- fpNShapeR += (inputSampleR-fpTemp);
- inputSampleR += fpNShapeR;
- //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 64 bit output
+ //stereo 64 bit dither, made small and tidy.
+ int expon; frexp((double)inputSampleL, &expon);
+ long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62);
+ dither /= 536870912.0; //needs this to scale to 64 bit zone
+ inputSampleL += (dither-fpNShapeL); fpNShapeL = dither;
+ frexp((double)inputSampleR, &expon);
+ dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62);
+ dither /= 536870912.0; //needs this to scale to 64 bit zone
+ inputSampleR += (dither-fpNShapeR); fpNShapeR = dither;
+ //end 64 bit dither
*out1 = inputSampleL;
*out2 = inputSampleR;
@@ -297,10 +285,4 @@ void SingleEndedTriode::processDoubleReplacing(double **inputs, double **outputs
*out1++;
*out2++;
}
- fpNShapeL *= 0.999999;
- fpNShapeR *= 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