[SCM] calf/master: + Monosynth: removed (misguided) soft clipping on filters per Thor's suggestion
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:38:14 UTC 2013
The following commit has been merged in the master branch:
commit 3c4dfb9948f6f2fee2bfc79cdb777db99f5a8ff5
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Sat Nov 1 17:30:18 2008 +0000
+ Monosynth: removed (misguided) soft clipping on filters per Thor's suggestion
diff --git a/src/calf/modules_synths.h b/src/calf/modules_synths.h
index 35ca5d2..77e7d57 100644
--- a/src/calf/modules_synths.h
+++ b/src/calf/modules_synths.h
@@ -138,19 +138,6 @@ public:
}
void activate();
void deactivate() {}
- /// Hard-knee 2:1 reducation outside range [-0.75, +0.75]
- inline float softclip(float wave) const
- {
- float abswave = fabs(wave);
- if (abswave > 0.75)
- {
- abswave = abswave - 0.5 * (abswave - 0.75);
- if (abswave > 1.0)
- abswave = 1.0;
- wave = (wave > 0.0) ? abswave : - abswave;
- }
- return wave;
- }
/// Run oscillators and two filters in series to produce mono output samples.
void calculate_buffer_ser();
/// Run oscillators and just one filter to produce mono output samples.
diff --git a/src/monosynth.cpp b/src/monosynth.cpp
index c9dc938..b6b923a 100644
--- a/src/monosynth.cpp
+++ b/src/monosynth.cpp
@@ -411,7 +411,7 @@ void monosynth_audio_module::calculate_buffer_ser()
float wave = fgain * (osc1val + (osc2val - osc1val) * xfade);
wave = filter.process_d1(wave);
wave = filter2.process_d1(wave);
- buffer[i] = softclip(wave);
+ buffer[i] = wave;
fgain += fgain_delta;
}
}
@@ -424,7 +424,7 @@ void monosynth_audio_module::calculate_buffer_single()
float osc2val = osc2.get();
float wave = fgain * (osc1val + (osc2val - osc1val) * xfade);
wave = filter.process_d1(wave);
- buffer[i] = softclip(wave);
+ buffer[i] = wave;
fgain += fgain_delta;
}
}
@@ -437,8 +437,8 @@ void monosynth_audio_module::calculate_buffer_stereo()
float osc2val = osc2.get();
float wave1 = osc1val + (osc2val - osc1val) * xfade;
float wave2 = phaseshifter.process_ap(wave1);
- buffer[i] = softclip(fgain * filter.process_d1(wave1));
- buffer2[i] = softclip(fgain * filter2.process_d1(wave2));
+ buffer[i] = fgain * filter.process_d1(wave1);
+ buffer2[i] = fgain * filter2.process_d1(wave2);
fgain += fgain_delta;
}
}
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list