@dietcv asked me how to design a stereo chorus effect like in the Elektron Monomachine.
This post will be shorter than my usual fare as chorus effects don’t need to be complicated. Traditionally, chorus effects are accomplished with a delay with N taps, each modulated by a sine wave. The sine waves are offset in phase.
As an example, here is a diagram from the manual of the Akai S3000XL, which uses four delays and four LFOs:
Here’s a three-tap chorus, with the phases offset in an equilateral triangle:
(
{
var dry, wet, snd, count;
dry = Saw.ar(440);
count = 3;
wet = DelayC.ar(dry, 0.03, SinOsc.ar(0.1, (0..count - 1) / count * 2pi).linlin(-1, 1, 10e-3, 20e-3)).sum / sqrt(count);
snd = (dry + wet) / sqrt(2);
snd = snd ! 2 * 0.5;
}.play(fadeTime: 0);
)
Before people get on my case, yes, I am wastefully using multiple DelayCs on the same signal when I could be using DelTapRd/DelTapWr. Sue me. I will leave efficiency as an exercise for the reader.
By doubling to six taps and offsetting the phase of three of the taps by 2pi / 6, we can create a mono-to-stereo chorus effect:
(
{
var dry, wet, snd, count;
dry = Saw.ar(440);
count = 3;
wet = 2.collect { |i|
DelayC.ar(dry, 0.03, SinOsc.ar(0.1, ((0..count - 1) + (i * 0.5)) / count * 2pi).linlin(-1, 1, 5e-3, 20e-3)).sum / sqrt(count);
};
snd = (dry + wet) / sqrt(2);
snd = snd * 0.5;
}.play(fadeTime: 0);
)
It is also customary to add a feedback path across the chorus, in this case tamed with a DC blocker and a tanh:
(
{
var dry, wet, snd, count;
dry = Saw.ar(440);
count = 3;
wet = LeakDC.ar(LocalIn.ar(1)).tanh * 0.95; // turn up the feedback past 1 for some WILD sounds
wet = wet + dry;
wet = 2.collect { |i|
DelayC.ar(wet, 0.03, SinOsc.ar(0.1, ((0..count - 1) + (i * 0.5)) / count * 2pi).linlin(-1, 1, 5e-3, 20e-3)).sum / sqrt(count);
};
LocalOut.ar(wet.sum);
snd = (dry + wet) / sqrt(2);
snd = snd * 0.5;
}.play(fadeTime: 0);
)
If you don’t like how my chorus sounds, that’s fine — feel free to tune parameters to taste.
While a good-sounding chorus effect is easy to build, there are many possible variations on this basic form. Some ideas I can think of right now: use LFNoise2 instead of SinOsc, try using pitch shifters instead of delay line modulation, or crossbreeding chorus with other effects like distortion and granular.