2 /* Stereo delay with feedback. */
4 declare name "echo -- stereo delay effect";
5 declare author "Albert Graef";
10 level = hslider("level", 1, 0, 1, 0.01);
11 dtime = hslider("delay", 0.040, 0, 5, 0.001);
12 feedback = hslider("feedback", 0, 0, 1, 0.001);
13 stereo = hslider("stereo", 1, 0, 1, 0.001);
15 /* The stereo parameter controls the amount of stereo spread. For stereo=0 you
16 get a plain delay, without crosstalk between the channels. For stereo=1 you
17 get a pure ping-pong delay where the echos from the left first appear on
18 the right channel and vice versa. Note that you'll hear the stereo effects
19 only if the input signal already has some stereo spread to begin with; if
20 necessary, you can just pan the input signal to the left or the right to
23 echo(dtime,level,feedback,stereo,x,y)
24 = f(x,y) // the echo loop
26 : (\(u,v).(x+level*(d(u)+c(v)),
28 // compensate for gain level
29 : (/(1+level), /(1+level))
31 f = g ~ (*(feedback),*(feedback));
33 = h(x+d(u)+c(v)), h(y+d(v)+c(u));
34 h = fdelay(1<<18, SR*dtime);
39 process = vgroup("echo", echo(dtime,level,feedback,stereo));