summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2018-05-21 17:29:30 -0500
committerBe <be@mixxx.org>2018-05-29 10:27:59 -0500
commitfd25553f2905c07165980084914ed648fe6dfa81 (patch)
treeabca3705f636d1d26e308421c3845ed71c9abc00 /lib
parentb482b792799de339b09659c275add7eccd0f3388 (diff)
Reverb: add Dry/Wet parameter
Using the Send parameter when the effect unit is in D+W mode does not work as desired because it reduces the volume of the whole effect unit.
Diffstat (limited to 'lib')
-rw-r--r--lib/reverb/Reverb.cc7
-rw-r--r--lib/reverb/Reverb.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/reverb/Reverb.cc b/lib/reverb/Reverb.cc
index e2c0714246..67f4b0ec1c 100644
--- a/lib/reverb/Reverb.cc
+++ b/lib/reverb/Reverb.cc
@@ -434,7 +434,7 @@ Descriptor<PlateX2>::setup()
// (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, bool addDry) {
+ const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam, double wet) {
// set bandwidth
input.bandwidth.set(exp(-M_PI * (1. - (.005 + .994*bandwidthParam))));
// set decay
@@ -454,7 +454,8 @@ void MixxxPlateX2::processBuffer(const sample_t* in, sample_t* out, const uint f
sample_t mono_sample = blend * (in[i] + in[i + 1]) / 2;
sample_t xl, xr;
PlateStub::process(mono_sample, decay, &xl, &xr);
- out[i] = xl + (addDry ? in[i] : 0);
- out[i + 1] = xr + (addDry ? in[i + 1] : 0);
+ out[i] = (xl * wet) + (in[i] * (1 - wet));
+ out[i + 1] = (xr * wet) + (in[i + 1] * (1 - wet));
}
}
+
diff --git a/lib/reverb/Reverb.h b/lib/reverb/Reverb.h
index 8f50ea0c09..c40a108b46 100644
--- a/lib/reverb/Reverb.h
+++ b/lib/reverb/Reverb.h
@@ -224,7 +224,7 @@ class PlateX2
class MixxxPlateX2 : public PlateStub {
public:
void 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, bool addDry);
+ const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam, double wet);
void init(float sampleRate) {
fs = sampleRate;