Meditation #4
In this meditation, we were directed to sonify the string of an L-System that draws a space-filling curve. I chose the Sierpinski-Square L-System, as illustrated on p. 88 of The Computational Beauty of Nature:
Axiom: F-F-F-F Rule: F=FF[-F-F-F]F
(I suppose that this isn't technically a space-filling curve, but I think it'll do for the purposes of the assignment.)
This Processing applet displays the curve and will also (if you download it and run it on your own computer) generate the score, according to the algorithm given below. (Here's the original csound file, including sample score and instrument definitions.)
A note is generated and time advances in the score every time an F is found in the string. The - character moves the current note up one step (using a pre-selected scale); [ and ] push and pop note values off a stack. The real trick of this piece is that all generations of the L-System are played simultaneously: the duration of each note is equal to the (predetermined) length of the song divided by the number of Fs in that generation's string. For the axiom/ruleset given above, this leads to the notes of generation 0 being six times as long as those of generation 1, which are in turn six times the length of generation 2, etc. This strategy leads to a sort of rhythmic play between generations, which I think does a good job of relating the fractal nature of the underlying data.
A thirty-second excerpt of the piece is embedded below, or you can download the whole thing (192kbps MP3, 2'30").