Pi Day is celebrated worldwide every March, 14 (3.14 in American date format) and there are a lot of reasons to celebrate such an amazing mathematical entity. And there are also many ways to celebrate it.
I’ve been asked to design some form of musical representation and/or celebration of Pi to be used at local schools by a couple of Math teachers (my mother and one of her colleagues) and I’ve been doing several experiments with Pure Data (the perfect tool for Math and Music relations).
The basic principles I’m using are simple.
Pi is an irrational number, meaning it will continue infinitely without repeating, so you can read it as a non repeating sequence of all 10 digits (0, 1, 2, 3 , 4, 5 ,6, 7, 8, 9). If you map every digit (0, 1, 2, 3 , 4, 5 ,6, 7, 8, 9) to a specific musical note or sound you can have Pure Data “playing” Pi, simply by reading each digit at a time.
You can choose a long sequence, such as one million digits of Pi and feed it to any sort of synth or sample player and you’ll have a musical or sonic representation of that infinite non repeating sequence.
For the sake of musical interest and not to “scare” general public, I’ve chosen to map each digit to a note on the major pentatonic scale (the “Chinese” effect of playing the black keys of the piano), since it guarantees a certain overall harmony and the possibility of overlapping several series without dissonance. I’ve used a 2 octave range to have all 10 digits matching a different pitch and then I’ve established a pulse to have rhythmic regularity. This way Pure Data fetches the million digits of Pi and plays them, one at a a time. The mapping makes every digit send a MIDI note that gets converted to frequency (this way I can rearrange the scale at any time) and made audible through a simple modular synth, with amplitude and frequency modulation, that might resemble some metallic percussion. A discrete envelope filter and a noise generator to give it some color and the basis is done. That’s the faster sequence you hear on this track, but you’ll also notice a second, slower one. That’s because I wanted to add something, so I’ve added a second layer where Pure Data is also reading and playing Pi, also with the same pitch mapping, but 4 times slower and with a simpler sine wave. The pentatonic comes in handy here, and the end result has a “scaling” effect also relevant in the Mathematical context: if you use different approaches to the “meaning” of the sequence, you can find pretty much anything embedded into it— your name, your phone number, your ID number (check this Portuguese site).
The result at any stage can be interesting, in my opinion, and I’ll be making different variations of the original Pure Data patch available to anyone interested. For this Routine Check podcast episode I’ve decided to take a third period (a more structural thing) and add a small “suspension” every minute or so, and then end it with a slight twist (you’ll have to hear it).
If you want to use this sample in your own Pi Day celebration, feel free (feedback and credits are welcomed). But if you want a “broader” experience, I can send you the Pure Data patch with instructions. You’ll be able to study and alter it, and you’ll have a working example, where the digits show up in sequence, and the apparent patterns are not only audible, but visible.
Special thanks to Miguel Cardoso, for his help with Pure Data and my mother Rosa Amélia Martins, for the mathematical input.
Post-Scriptum: have you noticed that Pi Day and Pure Data share the same initials?