Musician Creates a Million-Hour Song Based on the Number Pi
There are over 2.7 trillion known digits of Pi. This irrational (non-repeating) number we all remember from primary school has inspired all manner of artistic endeavors, from Kate Bush's song "Pi" to Martin Krzywinski's data artworks. Now, for Pi Day (March 14), music software programmer Canton Becker has crafted a million-hour song based on Pi that unfolds generatively on a virtual tape deck.
Titled "Shepard's Pi," the song combines two of Becker's favorite infinities: Pi, and an auditory illusion called a Shepard tone, which he describes as an "unsettling sonic illusion of a pitch that climbs or descends forever, never reaching a top or a bottom."
Found at PiSongs.com, users can tune into "Shepard's Pi" in real time with a custom virtual tape deck. The track itself evolves moment to moment, but the synthesized and sampled tones will be familiar to anyone who has ever listened to the electronic music of Kraftwerk, Tangerine Dream, Aphex Twin, and Global Communication. Far from being a mere gimmick, it is a highly evocative and transporting piece of electronic music, alternately ambient, glitchy, and interestingly rhythmic.
The project was born when Becker's 11-year old kid heard his new tune based on the number Pi and suggested that "the song go on forever" like the irrational number. Becker spent the next two weeks programming and working on custom samples.
Becker told me that he started programming in the 1980s, when his parents bought a Commodore 64 computer. Since brand-name software was expensive, he learned to program his own.
As a fan of early electronic artists like Kraftwerk and Jean-Michel Jarre, Becker became interested in making music via computer synthesis. These intellectual and creative pursuits eventually led him to Northwestern University, where he studied artificial intelligence and music cognition. During the Dot-com boom, he co-founded the Distributed Real Time Groove Network, a way for musicians from across the globe to jam on an online MIDI sequencer over their then-standard dial-up modems.
If you can believe it, Becker's original vision for "Shepard's Pi" was even more ambitious than one million hours of music.
"At first I wanted to make a song that would last 7.5 billion years, until the death of the Earth, but it was too difficult to keep a song interesting for that long," he explained. "Ultimately, I settled on a plan that would give me a song length of around 100 years, which seemed manageable."
Distributing a 58,999 GB MP3 file wasn't feasible, and Becker quickly realized the best way to distribute it would be with web page or app. So, he started hacking away at the basic algorithm in the programming languages PHP and Javascript. In between coding marathons, Becker composed and recorded the loops and samples that would form the basis of the song. He experimented with sounds that would work well together regardless of being stacked one upon the other.
"For this piece, I knew I wanted to create an ambient piece, something between space music and ambient techno," said Becker. "These are genres that can tolerate long listening sessions, and where big spaces between the notes are welcome."
The software he wrote combines these sounds automatically, sometimes sequencing them one after another, other times layering them. Becker said that a composer would typically want to introduce randomness into the algorithm to keep things interesting, but he needed to do the very opposite.
"I needed some way for the computer to generate a one million-hour long song that would sound exactly the same whether you were playing it for the first time or the hundredth time, whether you started listening to it from the start or midway through," Becker told me. "This is where Pi comes into play. I downloaded the first one billion digits of pi (3.1415") and fed these into the algorithm."
Becker's algorithm essentially functions as a really long ticker tape, upon which are written the billion digits of Pi. You can imagine that the machine pulls in digits at a rate of one digit every four seconds. As these digits are scanned, the algorithm uses the numbers to determine when to play a sound, how long to play it, whether it will be played forwards or backwards, loudly or quietly, looped or not, and so on.
The algorithm looks for natural patterns in Pi. For instance, when it finds a double digit in Pi, like 33 or 44, it triggers a loop. When a three digit ascending or descending sequence appears, like 234 or 987, the algorithm switches out the sound that's being used to play melodies. This gave Becker a system for a predictable one-million hour musical score, in which "every single note and nuance has been predetermined, even though the score was never written down or recorded in its entirety."
When users hit "play" on the virtual tape deck, the algorithm actually "performs" the piece. . This way, the 114-year song can fit in just one gigabyte of space, which is mostly comprised of the digits of Pi. The virtual tape deck was also a solution to a built-in quirk of browsers such as Chrome, Safari, and Firefox-users must click on a webpage to trigger a sound.
From start to finish, "Shepard's Pi" lasts 999,999 hours. This, Becker says, was a limitation imposed by only considering the first one billion digits of Pi.
"What's joyful and astonishing for me is that even though I programmed the algorithm and recorded the samples, the actual results are surprising and delightful," Becker muses. "When I listen to the song, I don't feel as if I'm listening to something I made. I feel as if I'm listening to something that was made for me."
Becker plans to continue this project beyond Pi Day 2019. For the past two decades, he's gradually gathered a community of electronic musicians to freely trade audio samples and original music on his project SampleSwap.org. In a few months, he intends to invite the site's membership of 350,000 users to collaborate on the next Pi song.
"What will it sound like if we can get hundreds or even thousands of musicians to collaborate together on a one million hour song?" Becker wonders. "I can't wait to find out."
To collaborate on the next million-hour Pi song, visitSampleSwap.org, or sign up for thePiSongs.commailing list.