Plazy/Ppatmod
Plazy can be used by specifying a function that returns a pattern
that is then embedded into the stream. Plazy
a = Plazy({ var array, val;
array = [1, 2, 3].scramble;
val = array.removeAt(0); //take out the first value and store it in val
Pseq([val, val, Pseq(array, rrand(1, 3)), Pshuf([val, \hereiam], 1)])
});
b = Pseq([a], 5).asStream;
60.do({ b.next.postln });
Ppatmod takes the pattern of its input as a whole and applies the
function to it before embedding it into the stream:
(
a = Ppatmod(
Pseq([1, 2, 3], 1),
{ arg pat, i;
\evaluated.postln;
pat.list = Array.fill(i+3, { arg i; i.squared });
pat
},
6
);
b = a.asStream;
30.do({ b.next.postln });
)
Links to this Page
- enter. last edited on 29 January 2003 at 10:46 pm by 203.14.169.19
- Pattern Examples (SC2) last edited on 7 April 2004 at 1:45 am by max2-022.dialin.uni-hamburg.de