vdelay — An interpolating variable time delay.
This is an interpolating variable time delay, it is not very different from the existing implementation (deltapi), it is only easier to use.
imaxdel -- Maximum value of delay in milliseconds. If adel gains a value greater than imaxdel it is folded around imaxdel. This should not happen.
iskip -- Skip initialization if present and nonzero
With this unit generator it is possible to do Doppler effects or chorusing and flanging.
asig -- Input signal.
adel -- Current value of delay in milliseconds. Note that linear functions have no pitch change effects. Fast changing values of adel will cause discontinuities in the waveform resulting noise.
f1 0 8192 10 1 ims = 100 ; Maximum delay time in msec a1 oscil 10000, 1737, 1 ; Make a signal a2 oscil ims/2, 1/p3, 1 ; Make an LFO a2 = a2 + ims/2 ; Offset the LFO so that it is positive a3 vdelay a1, a2, ims ; Use the LFO to control delay time out a3
Two important points here. First, the delay time must be always positive. And second, even though the delay time can be controlled in k-rate, it is not advised to do so, since sudden time changes will create clicks.