2 summary:: divide stream proportionally
3 related:: Classes/Pattern
4 categories:: Streams-Patterns-Events>Patterns>Math
11 a pattern that returns either numbers (divides the pattern into pairs) or arrays of size n which are used to split up the input into n parts.
19 // divide 1 into various proportions
21 a = Prorate(Pseq([0.35, 0.5, 0.8]), 1);
26 // divide a pattern into various proportions
28 a = Prorate(Pseq([0.35, 0.5, 0.8]), Prand([20, 1], inf));
34 // divide 1 into several parts
36 a = Prorate(Pseq([[1, 2], [5, 7], [4, 8, 9]]).collect(_.normalizeSum), 1);
45 SynthDef(\help_sinegrain,
46 { arg out=0, freq=440, sustain=0.05;
48 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
49 Out.ar(out, SinOsc.ar(freq, 0, env))
56 Prand([2/3, 1/3, [0.3, 0.3, 0.4], [0.6, 0.4]], inf),
57 Pseq([1, 2, 1, 3, 12], inf)
63 var freq = rrand(72, 84).midicps;
65 Synth(\help_sinegrain, [\freq, freq]);