Happy Pi Day! 🥳
March 14th (3/14) is the day we celebrate everyone's favorite never-ending number: π. To celebrate, I made a Pi-ano. You're probably wondering what that is. Well, let's see! 🎹
Introducing the Pi-ano 🎶
The Pi-ano does exactly what it sounds like — it calculates digits of pi and plays a note for each one; it's a piano controlled by pi! Each digit (0-9) is mapped to a different note, so as Pi unfolds, it creates a completely unique melody.
How It Works
- The program continuously computes digits of Pi.
- Each digit corresponds to a note, and the note is played on your speaker.
- It's basically a never-ending, math-powered concert.
Here's a quick demo. Don't get your hopes up, the song isn't that great:
Try It Yourself!
Want to hear Pi sing? You can check out the code and play around with it here:
https://github.com/The-Best-Codes/bestcodes-react-site/tree/main/app/math/pi-ano
More Pi Day Fun
Of course, Pi Day isn't just about weird musical experiments. It's a great excuse to eat pie. 🥧
What's your favorite kind of pie? (I don't have a favorite, I like all of them!)
How are you celebrating Pi Day? Let me know in the comments!