2 summary:: routine pattern
3 related:: Classes/Proutine, Classes/Routine
4 categories:: Streams-Patterns-Events>Patterns>Function
8 note that there is a shortcut to create a Prout:
15 Returns a routine from the function.
25 a = Prout({ loop { 1.yield; 2.yield; 7.yield; 10.do { 1.0.rand.yield } }});
26 a.asStream.nextN(100).plot;
32 SynthDef(\help_sinegrain,
33 { arg out=0, freq=440, sustain=0.05;
35 env = EnvGen.kr(Env.perc(0.01, sustain, 0.1), doneAction:2);
36 Out.ar(out, SinOsc.ar(freq, 0, env))
43 a = Prout({ loop { 1.yield; 2.yield; 7.yield; 10.do { 1.0.rand.yield } }}).asStream;
46 Synth(\help_sinegrain, [\freq, val * 100 + 300]);
55 \instrument, \help_sinegrain,
56 \freq, p { loop { ([1000, 2000].choose + [100, 200].choose + [10, 20].choose).postln.yield } },