Hi there
My code looks like this:
(
Ndef(\grav, {
arg freq1 = 300, freq2 = 200, pan;
var snd1, snd2, snd;
snd1 = SinOsc.ar(freq1, mul: 0.5);
snd2 = LFSaw.ar(freq2, mul: 0.1);
snd = XFade2.ar(snd1, snd2, pan);
})
)
Ndef(\grav).play
t = TempoClock.new.permanent_(true)
(
t.sched((2.0, 2.4..30), {Ndef(\grav).set(\pan, if(0.5.coin){1}{-1})});
)
What I try to do is to have an array of times: 2.0, 2.4, 2.8, 3.2 and so on and to change on each of these times the panning position.
It doesn’t work the way I tried it. How to do this?
Thanks!