2 summary:: rewriting system
4 categories:: Streams-Patterns-Events>Patterns>List>Indexing
8 Lindenmayer system pattern for selfsimilar structures. Its strong::dictionary (or event):: maps one element to an array of child elements. The algorithm replaces iteratively (strong::levels:: deep) elements by arrays of elements starting with the values in the strong::pattern::.
18 a dictionary or an event.
25 elem1 -> [ otherElements ],
26 elem2 -> [ otherElements ],
27 elem2 -> [ otherElements ]
33 The examples use the code::():: shortcut for link::Classes/Event::.
37 a = Prewrite(0, // start with 0
43 30.do({ x.next.postln });
47 //Prewrite used as a sequence of pitches:
50 SynthDef(\help_sinegrain,
51 { arg out=0, freq=440, sustain=0.05;
53 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
54 Out.ar(out, SinOsc.ar(freq, 0, env))
66 Synth(\help_sinegrain, [\freq, (a.next * 5 + 70).midicps]);