diff options
Diffstat (limited to 'lib/reverb')
-rw-r--r-- | lib/reverb/Reverb.cc | 10 | ||||
-rw-r--r-- | lib/reverb/Reverb.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/reverb/Reverb.cc b/lib/reverb/Reverb.cc index ca5b8f03f8..98b204d886 100644 --- a/lib/reverb/Reverb.cc +++ b/lib/reverb/Reverb.cc @@ -431,13 +431,14 @@ Descriptor<PlateX2>::setup() #endif - +#include <util/rampingvalue.h> // (timrae) we have our left / right samples interleaved in the same array, so use slightly modified version of PlateX2::cycle void MixxxPlateX2::processBuffer(const sample_t* in, sample_t* out, const uint frames, const sample_t bandwidthParam, const sample_t decayParam, const sample_t dampingParam, - const sample_t blendParam) { + const sample_t currentSend, + const sample_t previousSend) { // set bandwidth input.bandwidth.set(exp(-M_PI * (1. - (.005 + .994*bandwidthParam)))); // set decay @@ -446,15 +447,14 @@ void MixxxPlateX2::processBuffer(const sample_t* in, sample_t* out, const uint f double damp = exp(-M_PI * (.0005+.9995*dampingParam)); tank.damping[0].set(damp); tank.damping[1].set(damp); - // set blend - sample_t blend = pow(blendParam, 1.53); + RampingValue<sample_t> send(pow(currentSend, 1.53), previousSend, frames); // the modulated lattices interpolate, which needs truncated float DSP::FPTruncateMode _truncate; // loop through the buffer, processing each sample for (uint i = 0; i + 1 < frames; i += 2) { - sample_t mono_sample = blend * (in[i] + in[i + 1]) / 2; + sample_t mono_sample = send.getNext() * (in[i] + in[i + 1]) / 2; PlateStub::process(mono_sample, decay, &out[i], &out[i+1]); } } diff --git a/lib/reverb/Reverb.h b/lib/reverb/Reverb.h index ac50cc9bd0..ac8821124a 100644 --- a/lib/reverb/Reverb.h +++ b/lib/reverb/Reverb.h @@ -227,7 +227,8 @@ class PlateX2 const sample_t bandwidthParam, const sample_t decayParam, const sample_t dampingParam, - const sample_t blendParam); + const sample_t currentSend, + const sample_t previousSend); void init(float sampleRate) { fs = sampleRate; |