The idea of transforming a mathematical sequence into sound may sound (no pun intended, but I’ll take it) strange at first, but people have been doing it for ages. In this post we will generate some music randomly to have and idea of how it sounds and then we will see how sequences like Fibonacci and Pascal’s triangle sound.
This post is taken from
Music for Geeks and Nerds. You can
find all code and examples for free
here. I use the
open source pyknon library to
generate the music examples. This
free chapter
explains how to use pyknon.
tl;dr: Random music sounds bad, Pascal’s triangle sounds great!