dsp::Chorus feedback bug

Hi all,

I’m checking out the new Chorus in the Juce 6 dsp module. Sounds amazing.
However the feedback isn’t doing much.

In the Chorus.h file process() call at line 128 we have:

        for (size_t i = 0; i < numSamples; ++i)
        {
            auto input = inputSamples[i];
            auto output = input - lastOutput[channel];

            delay.pushSample ((int) channel, input);
            delay.setDelay (delaySamples[i]);
            output = delay.popSample ((int) channel);

            outputSamples[i] = output;
            lastOutput[channel] = output * feedbackVolume[channel].getNextValue();
        }

Seems that the output with the feedback factor is not pushed into the delay line and the output is overwritten after reading the delay.
Changing into this seems to make more sense and I can hear the feedback clearly.

        for (size_t i = 0; i < numSamples; ++i)
        {
            delay.pushSample ((int) channel, inputSamples[i] - lastOutput[channel]);
            delay.setDelay (delaySamples[i]);
            auto output = delay.popSample ((int) channel);

            outputSamples[i] = output;
            lastOutput[channel] = output * feedbackVolume[channel].getNextValue();
        }

Also, should the lastOutput be added or subtracted to the input? :face_with_monocle:

Hope this helps.
Best,
Milan

1 Like

Thanks for the feedback, it’s going to be fixed asap.

Yes it’s normal, feedback consequence is not going to sound the same with addition or substraction, traditionally we find minus sign here in chorus audio effects algorithms, but you can play with addition instead and see what you prefer.