Pi: A Musical Celebration
Happy Pi Day!
Sonification Series
Pi: A Musical Celebration
Happy Pi Day!

A frame from the music visualization “100 Seconds of Pi.” (Image by Author)
“Exploring pi is like exploring the universe.” — David Chudnovsky.
Pi Day has circled back again! It’s been 38 years since physicist Larry Shaw introduced the “holiday” at the San Francisco Exploratorium. The occasion serves as a wonderful invitation to enthusiasts, educators, and students to explore and marvel at the mysteries and beauty of mathematics.
People find all sorts of ways to celebrate the day. Activities include eating round things — pie, pizza, pi-shaped pies, and so on. Some run or walk 3.14 miles. Others recite digits from memory, engage in pi-related math puzzles, or construct pi-shaped arts and crafts.
Then there’s music.
Making Music from Pi the Old Fashioned Way
Sonification is a relatively new term of art. Interestingly, spellcheckers still don’t recognize the word. It refers to the process of transforming information into sound that falls within the human hearing range. It’s a field that I am currently active in.
Sonification can not only be applied to scientific data, but also to number sequences. A set of numbers can be matched to a set of notes in an enormous variety of ways. Some can sound marvelous, others horrendous (see the OEIS link below).
For a decimal number, the easiest way is to use 10 consecutive notes of the C major scale. Simply assign the numbers 0 through 9 to those ten notes. We can then read the digits of any number and play the note corresponding to each digit.
As most of you know, π is the most famous irrational number, meaning that the digits never end and never repeat. Looking at Figure 1, if we use the first eight digits of π, 3.1415926…, we would obtain the melody:
{E, C, F, C, G, D, D, A}.
Notice that the two appearances of the note D, corresponding to 9 and 2, are an octave apart.

Figure 1. A piano keyboard illustration. The red C and purple C are said to be an “octave” apart. (Image by Author)
Here is a fun and engaging example of this approach by “Blake.” He uses the first 32 digits of π in counterpoint and even adds mapped chords:
[embed]
A Different Approach
As a mathematician and musician, I was interested in how one might sonify π with several independent voices in a continuous, non-trivial manner. For one thing, I wanted the piece, in principle, to be able to continue forever without repeating previously played digits.
The result was “100 Seconds of Pi,” one of my earliest sonifications. I think of it as a collaboration of sorts. Specifically, my intent was to allow π to provide the core material and see just how little I could do to produce music that might pass for being entirely composed and performed by humans. In effect, my job would be to arrange the parts and conduct the orchestra, telling each instrument when to play and when to remain silent.
All pitches, durations, and dynamics (i.e, loudness/softness) in each of the six voices of the composition are derived from π. To avoid repeating digit sequences across the parts, each voice represents a simple multiple of π: 1π, 2π, 3π, …, 6π.
Here is the mapping scheme I arrived at:
- I wanted a range of two full octaves. Looking at Figure 1, from C up to C there are eight white notes. Getting to the next C requires 7 more, making 15 in total. I also wanted to allow for two rests. I therefore used the digits of π in base 17 and mapped them to the key of C. If you’re not familiar with alternate bases, here are the first 12 digits of π in base 10:
{3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9}
and here they are in base 17:
{3, 2, 6, 15, 10, 16, 5, 7, 9, 15}.
- I generated durations using a simple power-law and mapped them using the digit in base 7 so that for every half note there are two quarter-notes and 4 eighth notes (seven different values).
- I mapped note volumes in base 8.
Mathematica was my tool for generating the various parts. I then arranged those parts, assigned the instruments, and recorded the piece all in Apple’s DAW, Logic. For the visualization, I used the “Magnetosphere” plugin from iTunes and modified it in real time. I edited the final take in iMovie.
Here’s the visualization:
[embed]
If you’d like, you can download the music for free:
[embed]
While the composition does not have the same popular appeal as Blake’s sonification, the animation did make its debut at the science-themed French film festival, Polly Maggoo:
The nicest surprise was when I found out that “100 Seconds of Pi” was featured on NPR’s show “Engines of Our Ingenuity,” produced by Andy Boyd at the University of Houston. It’s a show I’ve enjoyed listening to since the 1990s:
Coda
Pi Day got a big boost on March 12, 2009, when the U.S. House of Representatives passed a non-binding resolution recognizing National Pi Day. Let us be thankful it happened then! It’s hard to imagine that such a societal elevation of math and science could happen here these days.
We can only hope that the seed that Larry Shaw planted 38 years ago continues to inspire people to explore the wonders, the power, and the sheer fun of scientific knowledge.
Thank you for your time! I’m Harlan Brothers, and I share the stories behind how and why math and science work. If you want to see more content like this, please follow me. I reply to every thoughtful comment — I’m always happy to start a conversation!
Enjoyed this? Follow **Science Spectrum** for more daily insights from our talented array of writers.
Down the Rabbit Hole
- Wikipedia: Data sonification
- Selected sequences from the Online Encyclopedia of Integer Sequences (OEIS): Listen to a Sequence in the OEIS
- Veritasium: The Discovery That Transformed Pi
- AsapSCIENCE: The Pi Song (Memorize 100 Digits Of π)
- A super fun story on pi and its less famous twin, tau, by fellow Science Spectrum editor Cole Frederick: The Tau vs. Pi Debate
Related Articles
메타데이터
- post_id
- ac8fed75bca9
- slug
- pi-a-musical-celebration-ac8fed75bca9
- url
- https://sciencespectrumu.com/pi-a-musical-celebration-ac8fed75bca9
- canonical_url
- https://sciencespectrumu.com/pi-a-musical-celebration-ac8fed75bca9
- author_url
- https://medium.com/@harlan.j.brothers
- status
- ok
- fetched_at
- 2026-07-13 06:23:13