I discovered the power of storing arays in variables and sequence these in Pbinds
I have three variables which store a pseq with a finite loop
These varables are then sequenced in a master Pseq with an infinite loop , but the problem is that it stops after all Pseqs are played
(
SynthDef (\simple,
{
|att=0.001,dec=0.200,mod=500,pitch=0,filterfreq=400,reso=0.5,vol=0.5,pan=0|
var sig,env;
env=EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]),doneAction:2);
sig=Pulse.ar(pitch.midicps,mul:0.5)+Saw.ar((pitch+12.1).midicps,mul:0.5);///////I an
sig=RLPF.ar(sig,filterfreq+(env*mod).clip(40,20000),rq:reso);
sig=sig*env;
sig=Pan2.ar(sig,pos:pan);
Out.ar(0,sig*vol)
}).add
);
/////
///sequences
~vag=Pseq([48,72,48,55,60,48,48,48]-10,4)
~lag=Pseq([48,72,48,\,60,48,48,48]-17,2)
~rag=Pseq([48,72,48,\,60,48,48,48]-15,2)
(
Pdef(\zxcv,
Pbind(\instrument,\simple,
\dur,Pseq([1/2,1/2],inf),
\pitch,Pseq([
~vag,
~lag,
~rag,
],inf)+12,
\filterfreq,Prand([400,440,600,400,2000,400,900,350,3000],inf),
\dec,Prand([2,3,4],inf),
\att,Pwhite(0.001,0.01,inf),
\reso,Pseq([1,0.5,0.7],inf),
\vol,Pseq([0.1,0.2],inf),
\pan,Pseq([-0.3,1,0,0.3,1],inf),
)
));
///////////
Pdef(\zxcv).play(t);
Pdef(\zxcv).stop;
t=TempoClock(120/60).permanent_(true)