In a piano (or rather, the chromatic scale), notes repeat every 12 semitones (or keys, both black and white), and each whole octave doubles the frequency of these notes. Together, each of these notes separated by octaves form what we call a pitch class.
It occurred me that the shape of a spiral has all the correct properties to represent this relation between notes. So I wondered, how would piano music look like if it was represented as a spiral of keys?
I quickly hacked together a script that reads MIDI files and creates the frames of this video you see below.
Franz Liszt's famous "Hungarian Rhapsody #2" was the first piece I tried. The results were very interesting!
In this representation, the notes with higher frequencies are in the center of the spiral, starting with C8 (as in the piano). Each radial block of keys represents a single pitch class, so octaves (when two adjacent notes of the same pitch class are played togeter) look like a pair of keys being pressed radially.
Interesting patterns emerge for different composers and types of music.
Originally made in PHP (!), later I ported the code to Python for real-time playback.
Scott Joplin's "Maple Leaf Rag" also looks very interesting.