Tuesday, October 22, 2019

BEHIND THE SONG: Rule 34

From XKCD, one of my favorite nerdy comic strips

"If it exists, there is porn of it.  If there isn't, there will be."  - part of Urban Dictionary's definition of Rule 34

In my last post, I wrote about cellular automata and how there is a system for describing all the potential rules in an organized way. Each rule "number" corresponds to a set of instructions in binary. My post two posts ago talks about how 1D cellular automata evolve in different ways: the pattern may go all light or dark, it may freeze into something predictable, or it may exhibit what looks like chaotic behavior overall or locally in pockets.

Now let's talk music.

During my summer sabbatical project, I was working through a textbook on chaos and fractals that helped inspire this bit of songwriting. I took the opportunity to work through the book's exercises on Mathematica to relearn that program and explore some possibilities. Mathematica is especially suited for work on 1D cellular automata since Stephen Wolfram led the charge with both.

In the program, you can ask for a cellular automaton that's as "wide" as you want, with any "rule" that you want, for as many steps as you want (and with a random starting state - so rerunning the instruction would give a different pattern). So I started playing around. The musical thought that I went with was that I'd use the CAs to define rhythm: I would make my rows eight squares long, a black square would become an eighth note and a white one would become a quarter note. I found if the rule number was too high or low, the patterns would descend into one color quickly, and I wasn't in the mood to write anything in straight 8ths 4/4 time.

I didn't go into this assuming any particular rule number would work, but I found coincidentally that Rule 34 inspired me musically.


Notice the two T "tetris" pieces with black squares on the bottom correspond to the binary digits 32 and 2. One of my first sequences started and evolved like this:


When I first saw a set of starting squares like this, I thought about what rhythm it would make. I did my composing in GuitarPro and set up a simple percussion track that looked like this:


Hopefully you can see that this rhythm matches up with the top row of squares on the long image above. Then, rule 34 tells the squares how to evolve. It so happens that the first row when translated into eighths and quarters leads to a 6/4 rhythm, but from there on out only two black squares can be seen per row, so the remaining rows are 7/4 and the location of the eighth notes shifts. I wrote out this rhythm and gave each row basically two "bars" of my musical chart.


And this is where the magic happened for me. I'll probably talk more about myself as a composer later, but in my life I tend not to randomly hear stuff in my head that's new and original. But with this pattern, just hearing the computerized claves play this rhythm got me thinking, and so I wrote a bass line next.


The rhythm of this part matches that of the claves. I continued this for the rest of what feels like a "verse."

I wanted some interesting transition and maybe another section of the song, though, so I kept playing with initial conditions to see what interesting patterns would come out. A different starting state led to a pattern that's a little more active.


Notice the top line of this has five black squares and three white squares, and the subsequent lines have three black squares and five white squares. Therefore, the top line represents a bar of 11/8 and the rest show a pattern that translates (with my scheme) to 13/8. Now we're talking.


Again, compare these rhythms with the top two lines in the CA above. I heard this in my head as a transition and new section, and the 13/8 bit needed to be faster. So this transition and new part is what you hear on the album. If anything, even though this is the craziest section of the song, it is the most derivative because my former band Might Could released a song in 13/8 that we all loved a great deal. But I loved getting back to that rhythm through purely nerdy mathematical means. Totally made using "Rule 34" worth it.

I treated the 13/8 bit as a solo section, wrote a transition back to the first part of the song, and finished it off. It's not mathematical, but the switch from the 13/8 part back to the slower section is the part I strangely felt the most creative. I can't really explain it.

Anyway, that's how I took a cellular automaton idea, merged it with an internet meme somewhat by chance, and got some interesting musical sections out of it. My next entry will be about "Room 101," a song that used a different rule for a new and interesting effect. In a later entry, I will talk about how The Devil's Staircase plays all of this live. After all this work, do we play every nuance in eighth note placement?  Do we do the strange 11/8 and 13/8 stuff?

No, not at all.

But it's a fun part of the process to talk about.

No comments:

Post a Comment