Hi everyone! I’m trying to do the simplest thing ever: apply an envelope to a filter
(
SynthDef.new(\sine2, {
|freq=40, atk=0.03, sus=0.03, rel=9, pan=0, gain=1, trig=0, amp=0.08, out=0|
var sig, env, filter;
sig = VarSaw.ar(freq, width: 0.85);
sig = tanh(Line.ar(0.001, gain) * sig);
sig = sig.softclip;
env = Env(
[0,1,1,0],
[atk, sus, rel],
\sine
).ar(2);
sig = sig * env;
sig = Pan2.ar(sig, pan, amp);
filter = BLowPass.ar(sig, EnvGen.kr(Env([20, 10000, 20], [4,4]), trig));
Out.ar(out, sig);
}).add;
)
Could someone point me to a simple example with an envelope applied to a filter? I can’t find one in the tutorials.