
Rewrote the interpolation on my chorus after getting corrected
I posted my chorus plugin here a couple weeks ago and someone told me allpass interpolation was the wrong tool for a modulated delay, since the recursive state goes stale while the delay length is moving under it, and that I should look at Lagrange. I was still on linear at that point. So I wrote a 4-tap cubic Lagrange interpolator by hand instead of pulling in a crate, mostly because I wanted to understand it rather than trust it.
What's actually in the thing now, so nobody has to guess from the post:
- 6 ms base delay with the LFO modulating around it, cubic Lagrange on the fractional read. Taps at -1, 0, 1, 2 off the integer index, each one wrapping the ring buffer separately.
- One-pole highpass at 160 Hz sitting inside the feedback loop so the low end doesn't stack up.
- One-pole lowpass on the wet path, cutoff swept by the LFO between 1k and 7k. Most of the character comes from that, not the delay.
- Separate voice struct per channel, LFOs offset 90 degrees. Collapses to mono without eating itself.
- Dry/wet is a plain linear crossfade. There's roughly a 3 dB dip at 50% and I'm fairly sure that's comb cancellation from summing a correlated wet signal with the dry, not bad crossfade math. If that reasoning is wrong I'd like to know.
One debugging note that saved me: check your coefficients at frac = 0.5. They should land on -0.0625, 0.5625, 0.5625, -0.0625. Mine didn't, and it was a typo in one of the products in the third coefficient.
At my defaults (1.6 Hz, about 4 ms depth) the improvement is small. A little less grit on held notes up top. I assume it opens up more if you push the rate.
Two things I still can't answer:
- Any reason to go past cubic when the modulation is this slow, or is higher order mainly for pitch shifting and wide sweeps?
- The HF droop moves with the fractional part, so slow modulation means a slow wobble on the top end. Does anyone correct for that in practice or is it under the floor at this depth?
It's free, GPLv3, VST3 and CLAP, mac/windows/linux. It's built for pitch-corrected vocals specifically, which is the only thing I use it on. If you'd rather hear it than read about it, it's at pyfessional.tech, the download button picks your OS for you and the source is linked from the same page. Would rather have someone install it and tell me it sounds wrong than get upvotes.