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::.
15 a dictionary or an event.
19 elem1 -> [ otherElements ],
20 elem2 -> [ otherElements ],
21 elem2 -> [ otherElements ]
27 The examples use the code::():: shortcut for link::Classes/Event::.
31 a = Prewrite(0, // start with 0
37 30.do({ x.next.postln });
41 //Prewrite used as a sequence of pitches:
44 SynthDef(\help_sinegrain,
45 { arg out=0, freq=440, sustain=0.05;
47 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
48 Out.ar(out, SinOsc.ar(freq, 0, env))
60 Synth(\help_sinegrain, [\freq, (a.next * 5 + 70).midicps]);