2 summary:: instantiate new patterns from a function
3 related:: Classes/PlazyEnvir, Classes/PlazyEnvirN, Classes/Pfunc
4 categories:: Streams-Patterns-Events>Patterns>Function
8 Plazy evaluates a function that returns a pattern and embeds it in a stream.
15 A link::Classes/Function:: that returns a pattern or any other valid pattern input.
23 x = Array.series(rrand(2, 4), [1, 100].choose, 1);
26 x = Pn(a, inf).asStream;
27 30.do({ x.next.postln });
31 //Plazy used to produce a sequence of pitches:
34 SynthDef(\help_sinegrain,
35 { arg out=0, freq=440, sustain=0.05;
37 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
38 Out.ar(out, SinOsc.ar(freq, 0, env))
45 x = Array.series(rrand(2, 4), [1, 5].choose, 1);
46 x.put(x.size.rand, 8+0.1.rand2);
49 x = Pn(a, inf).asStream;
53 Synth(\help_sinegrain, [\freq, (x.next*5+70).midicps]);
60 // using event streams
65 x = Array.series(rrand(2, 4), [1, 5].choose, 1);
66 x.put(x.size.rand, 8+0.1.rand2);
68 \instrument, \help_sinegrain,