View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide


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;{ });

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; 
                        pat.list = Array.fill(i+3, { arg i;  i.squared }); 
b = a.asStream;{ });

Links to this Page