2 summary:: Function pattern of given length
3 categories:: Streams-Patterns-Events>Patterns>Function
4 related:: Classes/Pfunc
7 Returns a stream that returns values from the code::func::.
14 Stream function. In an event stream receives the current link::Classes/Event:: as argument.
16 End after this number of times.
23 a = Pfuncn({ exprand(0.1, 2.0) + #[1, 2, 3, 6].choose }, 2);
24 b = Pfuncn({ #[-2, -3].choose }, 2);
25 Pseq([a, b], inf).asStream.nextN(20).postln;
32 SynthDef(\help_sinegrain,
33 { arg out = 0, freq = 440, sustain = 0.05;
35 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
36 Out.ar(out, SinOsc.ar(freq, 0, env))
43 a = Pfuncn({ exprand(0.1, 2.0) + #[1, 2, 3, 6].choose }, 2);
44 b = Pfuncn({ #[-2, -3].choose }, 7);
45 c = Pseq([a, b], inf).asStream;
48 Synth(\help_sinegrain, [\freq, val * 100 + 300]);