# [sc-users] Ppar in Pspawn confusion

Dear list,

Maybe I'm asking nonsense but how can I solve the following? (see the
commented code below for the actual question):

(
SynthDef(\GrainFM,{|freq = 220, mod = 10, index = 1, dur = 0.01, density =
100, amp = 1|
var syn, env;
var trigger = Dust.kr(density);
syn = GrainFM.ar(2,trigger,dur, freq, mod, index);
env = EnvGen.kr(Env.perc(0.001,0.5),doneAction:2);
Out.ar(0,(syn*env)*amp)
);

(
var choice = Dictionary [

\layer1 -> Pbind(\instrument, \GrainFM,
\midinote,Pseq((70..80),1),
\amp,0.05,
\mod, Pwhite(100,30),
\dur,0.1
),

\layer2 -> Pbind(\instrument, \GrainFM,
\midinote,Pseq((80..70),1),
\amp,0.05,
\dur,0.1,
\mod, Ppoisson(200)
),

\layer3 -> Pbind(\instrument, \GrainFM,
\midinote,Pseq(Array.fill(10,{rrand(60,90).ceil}),1),
\amp,0.05,
\mod,Pseries(10,2,10),
\dur,0.1
)
];
p = Pspawn(Pbind(
\pattern, Pseq([\layer1,\layer2,\layer3,Ppar([\layer1,\layer2,\layer3])]),
//Doesn't work because... a Ppar cant be an event and needs to be played
with a .play method?
//How to do something like this that works?
\method, \par,
\delta, Pwhite(0.5,1.6)
), (dict: choice));
p.play
)

Thanks a lot!

Best,
Darien

--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Ppar-in-Pspawn-confusion-tp7615352.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/