Hi,
I have written some code for a portamento Pbind sequence, it is almost what I want but not quite.
I want a sequence that starts on a frequency, here it is 80hz, portamentos up to another, eg. 100Hz, then goes back to 80Hz and repeats on a loop, up and down.
So, 80Hz(slideup)100Hz(slidedown)80Hz(slideup)100Hz(slidedown)…
Here is my synth def,
(
SynthDef(\portamentoSin, {
arg out=0, pan=0, freq=440, endFreq=440, dur=1, amp=2.0, atk=0.0001, rel=0.1;
var sus, sig, env;
sus = dur - atk - rel;
env = EnvGen.ar(Env.linen(atk, sus, rel), doneAction:2);
sig = SinOsc.ar(XLine.kr(freq, endFreq, dur).poll);
Out.ar(out, Pan2.ar(sig, pan, amp) * env);
}).add;
)
and my Pbind
(
Pbind(\instrument, \portamentoSin,
\freq, 80,
\endFreq, 100,
\octave, 5,
\dur, 20,
\atk, 0.01,
\rel, 0.09
).play;
)
How can i integrate the slide down into the code as well?
Thanks