I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
buf[indx] = in[nn];
fv1 = indx - fdel * esr;
/* Make sure inside the buffer */
/*
* See comment above--same fix applied here. heh 981101
*/
while (UNLIKELY(fv1 < FL(0.0)))
fv1 += (MYFLT)maxd;
while (UNLIKELY(fv1 >= (MYFLT)maxd))
fv1 -= (MYFLT)maxd;
and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.
I don’t think it is documented. Maybe one for the manual issues.
Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?)
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind