At last, an almost working version!
Here it is:
github.com/quarterturn/due_ensenble_chor...e/master/chorus_test
Here's a ink to a quick video demo:
I used my Casio MT-600, since it's battery operated and easy to get close to my code desk. I chose the driest preset it has, which is "violin". There's a tiny bit of chorus in it, but you can definitely hear the springy animation of the ensemble chorus. Also you can hear how the unwanted noise tracks the LFO.
If you feed in a narrow pulse or sawtooth, you'll hear the classic triple-BBD 120-degree phased sound.I think it's pretty close to what my Oakley SRE330 in triple mode.
What remains to be fixed is some sort of periodic noise which is getting in somehow from the LFO. I'm pretty sure it's the LFO as it's in sync with the period of the LFO wavetable. I'm pretty sure it's not an overflow or wrapping problem in the circular buffer. Maybe my code is taking too long to run inside the 44.1 KHz interrupt? I doubt this, as I hear a similar noise with everything commented out down to just one buffer.
It took me a long time to wrap my head around the chorus/vibrato example. There's confusing stuff going on in there as it does not use a circular buffer. Once I started over with a circular buffer it made a lot more sense and I got it working pretty quickly.