Skip to content

why cellular automata work for music

Several people have suggested that I post about cellular automata and music, since two of the pieces on the IOLET CD, Simple Automata and Sixteen-color Prime-generating Automaton, use one-dimensional cellular automata to provide their underlying structure. The subject has also been in the news with recent blog posts about using two dimensional automata for generative music-making. So consider this post to be partly liner notes for the Simple Automata (which can be streamed in its entirety here), and part speculative ramble by a composer who is also a computer guy. How and why would a composer use cellular automata for generative music-making?

I’m not going to give a tutorial on CAs; there is a vast amount of information freely available on the web, up to and including Stephen Wolfram’s immense tome, in its informative, yet pompous, entirety. CAs are easy to understand, to notate, and to implement. Diversity and complexity can be generated by very simple machines, without the need for the complicated syntax and evaluation rules used by other common modeling approaches such as L-systems or Chomsky grammars. Perhaps as important as their ability to generate complex patterns from simple beginnings is their ability to generate interesting, yet repetitive, patterns, since the simple breaking of symmetry is far more fundamental to our human enjoyment of music than complexity.

Piano-roll view of Simple Automata

Piano-roll for Simple Automata

Automata are firmly established as tools for creating visual art and music. Musical applications of CAs appeared as early as 1988, and the popularity of Conway’s Game of Life rapidly made them truly commonplace. For this reason, when I decided to use CAs as a basis for the Anathem pieces, I wanted to appeal to listeners’ existing knowledge when present, and yet tread new aural ground. In Anathem, the avout sometimes use musical CAs to perform calculations on-the-fly as a group, and so the obvious place to begin my search was to consider how a group of people might perform continuously evolving CAs from rule notation, rather than from though-composed musical scores.

At the Anathem launch event in San Francisco, I demonstrated the results of this thought experiment, using members of the audience as individual two-state cells. Since not everyone is comfortable with singing, we used rhythmic clapping (8 claps to a cycle) to represent one state, and silence to represent the other. The CAs that we performed together were all synchronous one-dimensional machines, which made it very easy to propagate information left and right down a single-file line of people. (We also performed asynchronous turing machines as a demonstration of less rhythmically rigorous performance possibilities.)

Before starting each rule by counting off eight beats, I gave simple English explanations of the rules, such as the following for the symmetric and pleasing rule 126: “Start clapping on the next cycle if either or both neighbors are clapping. Stop clapping if you and both of your neighbors are all clapping. Otherwise, continue what you are doing on the next cycle.” The chaotic rule 30 was less simple, but still doable: “If one and only one of your neighbors is clapping and you are not, start clapping on the next cycle. If you are clapping, and the person on your left is also clapping, then stop clapping on the next cycle. Otherwise, continue what you are doing on the next cycle.” Even the notorious complexity-producing rule 110 was simple enough to perform: “If you are not clapping, but if either the neighbor on your right is clapping or both neighbors are clapping, start clapping on the next cycle. If you and both of your neighbors are all clapping, stop clapping on the next cycle. Otherwise, continue what you are doing on the next cycle.”

[Details for would-be experimenters: Before starting, you need to set the initial state by telling some members of the line to begin in an “on” state by clapping; you also need to decide how to handle the special cases at both ends of the row. It is also straightforward to have individuals represent more than one cell by cycling through them in order; in this way, small groups can perform large automata. Finally, the possibilities for state mappings that are more complex than simple on/off gestures are infinite and limited only by your imagination.]

Making music is especially enjoyable for amateurs when done in a group, and this experiment confirmed for me that performing cellular automata is a fun, unthreatening, group activity. As detailed above, each cell was represented by individuals clapping, but if those individuals were told to choose a note and sing it, rather than to clap, what would result is Simple Automata. In this piece, the “master of the automata” calls out a rule number (in Orth, on the recording), and the “cells” each pick a pitch before computing their way through a chordal landscape. The resulting chord is fixed until the next automaton is called, but the voicing of the chord changes as singers enter and exit. It is both an extremely simple approach and an interesting thing to which to listen. If the mental gymastics prove too hard, or if you want more control over tonality, the master can pre-assign notes; this is what we did to make the recording. Both approaches are fun to perform.

The most notable feature of cellular automata is their synchrony: like all parallel computing activities, the cells of an automaton must share some notion of synchronization (which is, in this case, the pulse). For musical activity, unlike computing, synchronization is an advantage rather than an impediment.  Performing together is the whole point, after all! Musical performance, like any process unfolding over time, can be thought of as computation. What is interesting about using CAs in this way is that the computation can be purely abstract. The process doesn’t need to produce any results besides the execution of the rule itself, which helps to explain why many researchers working with automata think of them as a way to model life itself.