-
Notifications
You must be signed in to change notification settings - Fork 3
/
flanger.dsp
24 lines (21 loc) · 969 Bytes
/
flanger.dsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
declare name "flanger";
declare license "BSD";
import("effect.lib");
import("guitarix.lib");
import("osc.lib");
flangerstereogx = *(level),*(level) : flangerstereoN(dmax,curdel1,curdel2,depth,fb,invert) // change to flanger_stereo for faust >= 0.9.27
with {
lfol = component("osc.lib").oscrs; // sine for left channel
lfor = component("osc.lib").oscrc; // cosine for right channel
dmax = 2048;
dflange = 0.001 * SR * hslider("flange delay [unit:ms]", 10, 0, 20, 0.01);
odflange = 0.001 * SR * hslider("flange delay offset [unit:ms]", 1, 0, 20, 0.01);
freq = hslider("LFO freq [unit:Hz]", 0.2, 0, 5, 0.01);
depth = hslider("depth", 1, 0, 1, 0.01);
fb = hslider("feedback gain", 0, 0, 1, 0.01);
invert = checkbox("invert[enum:linear|invert]");
level = hslider("level [unit:dB]", 0, -60, 10, 0.1) : db2linear;
curdel1 = odflange+dflange*(1 + lfol(freq))/2;
curdel2 = odflange+dflange*(1 + lfor(freq))/2;
};
process = flangerstereogx;