TidalCycles lindenmayer generates L-system strings that can be converted to playable patterns via step functions
An L-system (Lindenmayer system) is a formal grammar that starts with an axiom string and rewrites each symbol according to production rules, iterating for a given number of generations. TidalCycles’ lindenmayer b rules axiom runs b iterations and returns the resulting string. Combined with step', which maps characters to sample names, this generates long non-repeating sequences derived from biological growth models. L-systems produce self-similar structures — complex at the pattern level but derived from simple rules. The practical challenge: strings grow exponentially with iterations, so take n limits the length and slow matches tempo. This is generative composition at a different level from randomness — the output is deterministic, infinitely long, and structurally self-similar.
Examples
d1 $ slow 16 $ sound $ step' ["feel:0", "sn:1", "bd:0"]
(take 512 $ lindenmayer 5 "0:1~~~,1:0~~~2~~~~~0~~~2~,2:2~1~,~:~~1~" "0")
Assessment
What property of L-system output makes it different from random generation? What does the take 512 do and why is it necessary? Name one musical characteristic you’d expect from a sequence generated by a Lindenmayer system.