aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/WinVST/DitherMeTimbers
diff options
context:
space:
mode:
authorChris Johnson <jinx6568@sover.net>2018-12-16 13:54:56 -0500
committerChris Johnson <jinx6568@sover.net>2018-12-16 13:54:56 -0500
commit2a6e1bef6b4bd039386aa24c988f5d69364ff874 (patch)
treeef44a92cb132b9b277dcbbb5120b063213e674ae /plugins/WinVST/DitherMeTimbers
parentb25674789c87a1564af673faff8a7ee3dfcbcaf2 (diff)
downloadairwindows-lv2-port-2a6e1bef6b4bd039386aa24c988f5d69364ff874.tar.gz
airwindows-lv2-port-2a6e1bef6b4bd039386aa24c988f5d69364ff874.tar.bz2
airwindows-lv2-port-2a6e1bef6b4bd039386aa24c988f5d69364ff874.zip
TapeDelay (and DitherMeTimbers overs update)
Diffstat (limited to 'plugins/WinVST/DitherMeTimbers')
-rwxr-xr-xplugins/WinVST/DitherMeTimbers/.vs/VSTProject/v14/.suobin23040 -> 23040 bytes
-rwxr-xr-xplugins/WinVST/DitherMeTimbers/DitherMeTimbersProc.cpp36
2 files changed, 35 insertions, 1 deletions
diff --git a/plugins/WinVST/DitherMeTimbers/.vs/VSTProject/v14/.suo b/plugins/WinVST/DitherMeTimbers/.vs/VSTProject/v14/.suo
index 38e99b1..749d2c5 100755
--- a/plugins/WinVST/DitherMeTimbers/.vs/VSTProject/v14/.suo
+++ b/plugins/WinVST/DitherMeTimbers/.vs/VSTProject/v14/.suo
Binary files differ
diff --git a/plugins/WinVST/DitherMeTimbers/DitherMeTimbersProc.cpp b/plugins/WinVST/DitherMeTimbers/DitherMeTimbersProc.cpp
index 7ba84d7..4641d8b 100755
--- a/plugins/WinVST/DitherMeTimbers/DitherMeTimbersProc.cpp
+++ b/plugins/WinVST/DitherMeTimbers/DitherMeTimbersProc.cpp
@@ -41,7 +41,24 @@ void DitherMeTimbers::processReplacing(float **inputs, float **outputs, VstInt32
noiseShapingR += outputSampleR;
noiseShapingR -= lastSampleR;
-
+
+ if (outputSampleL > 8388600.0) {
+ outputSampleL = 8388600.0;
+ noiseShapingL *= 0.5;
+ }
+ if (outputSampleR > 8388600.0) {
+ outputSampleR = 8388600.0;
+ noiseShapingR *= 0.5;
+ }
+ if (outputSampleL < -8388600.0) {
+ outputSampleL = -8388600.0;
+ noiseShapingL *= 0.5;
+ }
+ if (outputSampleR < -8388600.0) {
+ outputSampleR = -8388600.0;
+ noiseShapingR *= 0.5;
+ }
+
*out1 = outputSampleL / 8388608.0;
*out2 = outputSampleR / 8388608.0;
@@ -87,6 +104,23 @@ void DitherMeTimbers::processDoubleReplacing(double **inputs, double **outputs,
noiseShapingR += outputSampleR;
noiseShapingR -= lastSampleR;
+ if (outputSampleL > 8388600.0) {
+ outputSampleL = 8388600.0;
+ noiseShapingL *= 0.5;
+ }
+ if (outputSampleR > 8388600.0) {
+ outputSampleR = 8388600.0;
+ noiseShapingR *= 0.5;
+ }
+ if (outputSampleL < -8388600.0) {
+ outputSampleL = -8388600.0;
+ noiseShapingL *= 0.5;
+ }
+ if (outputSampleR < -8388600.0) {
+ outputSampleR = -8388600.0;
+ noiseShapingR *= 0.5;
+ }
+
*out1 = outputSampleL / 8388608.0;
*out2 = outputSampleR / 8388608.0;