Convolution Dry/Mix

Hello everyone,

I’m finishing up a convolution reverb using dsp::convolution and was wondering if there is an “easy” implementation of a dry/mix knob. As I write this, I feel like an idiot asking it, but figured it would be worth asking and finding out there is no option or asking and finding an easier method.

Anyways, I appreciate everyones time.

I don’t believe there’s one included in the DSP library, but writing your own should be trivial. Just create a secondary buffer that gets allocated to the proper buffer size in your prepare method and make a copy to it as the first step in your process method, then apply a gain to both streams based on the normalized position of the dry/wet knob, and finally mix them together into the output buffer using addition.

Here’s an implementation I did for an old project using the dsp:: API. The project as a whole is GPLv3, but this class is self contained and simple feel free to take it and modify it/use it as you wish:

1 Like

Hum… This looks perfectly fine! But I would make an addendum:

What @jonathonracz kindly shared is an equal-gain crossfade, which will add up to 1.0 all along the slider.

But since one of the main effects of a reverb is to create de-correlation on the signal, an equal-gain crossfade may incur in an auditory dip around the slider centre.

For highly de-correlated signals mixing is advised to use “equal-power” crossfading.
There’s plenty explanations on the web, so I won’t write something very similar to what you can find in 15 secs of googling :wink:

But in a nutshell… when the crossfading slider is in the centre, each channel will receive -3dB of gain (0.7071…). On a perfect case scenario, where the source channels are perfectly de-correlated, it will result on equal-gain behaviour.

This is what most plugins/mixers do AFAIK. You should consider experimenting with equal-power crossfading as well :wink: