Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SynthDef(\sin, {
- arg freq=440, atk=0.01, rel=1, amp=1, pan=0, modAmp=1;
- var sig, env, mod;
- sig = SinOsc.ar(freq);
- env = EnvGen.kr(Env.perc(atk, rel), doneAction:2);
- // Modulation signal
- mod = SinOsc.kr(freq:20, mul:modAmp);
- // Modulate the signal between L & R speakers
- pan = pan * mod;
- sig = sig * env * amp;
- sig = Pan2.ar(sig, pan);
- Out.ar(0, sig);
- }).add;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement