Bye bye, Miss American Pi

Wednesday, 1 December 2004 — 4:13pm | Classical, Music

This is less a marriage of music and mathematics than a summer fling of sorts, but I’ll let the pi10k experiment speak for itself:

This experiment attempts to convert the first 10,000 digits of pi into a musical sequence.

Select ten notes, and your corresponding selection translates into an integer. The first note you select will equal “1”, the second “2”, and so on. As your computer cycles through the digits of pi, the corresponding notes will “play.”

Those of you who can make heads or tails of a basic keyboard layout should try it out.

A few comments: First of all, I think the experiment would be on the whole far more interesting if you introduced a number of other factors. The first is that this would be a whole lot more interesting if prior to iterating over the digits of pi, you first converted everybody’s favourite transcendental circumference-diameter ratio into base 12 (0 through 9, A and B), and proceeded to assign notes from there covering the entire twelve-note octave. It would make for some variety, to say the least. Perhaps it would produce the same brand of atonality as what one would expect from, say, Schoenberg’s twelve-tone technique.

The next thing I did was plug in a C blues scale to see what kind of a jazz-me-up solo you can do with pi. This reminded me of two things: first, sitting on the same chord and the same key for more than a few bars at a time is boring. Maybe if it was automatically transposed up to F and G blues scales in accordance with the prototypical twelve-bar progression, it would be a whole lot more interesting. Second, pi (as it is implemented in that particular experiment) could do with some rhythm. Maybe if each of the digits were assigned a relative rhythmic value, the band would be swingin’.

This got me thinking about the iterability of musical sequences, and whether or not there is a systematic way to generate traditional consonance-dissonance tensions by formula without having to resort to an atonal result like the one we have here. Let’s go back to fundamentals here, and examine the circle of fifths. It occurred to me that if you cycle through these, as you do in the traditional vi-ii-V-I cadence back to the tonic, you begin to see that this particular foundation of music theory is a cyclic algebraic group of order 12. (Consider the V-I to be the “operation” in question, thus making the IV-I the “inverse.”)

Now that you have the roots of the chord progression in place, what remains is to map it to a harmonic pattern – your basic major, minor and diminished triads, or the more interesting texture you get when you add a major or minor seventh up top. If you look at the bridge to Gershwin’s “I Got Rhythm” – in B-flat rhythm changes, it goes D7-G7-C7-F7 – the iteration is done entirely over the dominant seventh. This is by itself not very interesting until you add some substitutions, say an alternation with changes every two beats instead of four: Am7-D7-Dm7-G7-Gm7-C7-Cm7-F7. Maybe throw in some tritone substitutions to boot, inverting the third and the seventh of the dominant chords, which is a common substitution trick that translates into some fancy bass lines.

But what does such a series have to do with something as random as pi? How can you generate tonality out of that randomness?

Well, the answer to that is, take advantage of the fact that pi isn’t all that random, and use a numerical approximation algorithm. Euler’s isn’t of much use here, unless you figure out a way to assign arctangents to chords, but if you take something simpler like Newton’s recursive expansion, you’re in business.

In fact, you can try something like this with any infinite series – geometric, Taylor, MacLaurin, what have you. All it takes is to find an analogous operation that moves from chord to chord or note to note (or better yet, manipulates the push-and-pull of time in a systematic rubato) and assign it to the operations the series uses to generate each successive term.

I’ll end with a fun fact that hardly anybody knows (until now): back in high school, I won $25 in a St. Patrick’s Day limerick contest, wherein I did a few stanzas on pi. I had to take a bit of a liberty in rhyming “Euler” with “ruler” (it’s actually pronounced “Oiler,” as in that local hockey franchise), but nobody noticed.


submit to reddit

Say something interesting: