Another Music Hack Day weekend … this time in Boston hosted at MIT. It was a pretty awesome event. The space at MIT was perfect for hacking, with the best network connectivity I’ve ever seen at a hacking event. For my weekend hack, I took the idea from my Iceland hack (Infinite Gangnam Style), and made it work with any song. The result is The Infinite Jukebox.
With The Infinite Jukebox, you can create a never-ending and ever changing version of any song. The app works by sending your uploaded track over to The Echo Nest, where it is decomposed into individual beats. Each beat is then analyzed and matched to other similar sounding beats in the song. This information is used to create a detailed song graph of paths though similar sounding beats. As the song is played, when the next beat has similar sounding beats there’s a chance that we will branch to a completely different part of the song. Since the branching is to a very similar sounding beat in the song, you (in theory) won’t notice the jump. This process of branching to similar sounding beats can continue forever, giving you an infinitely long version of the song.
To accompany the playback, I created a chord diagram that shows the beats of the song along the circumference of the circle along with with chords representing the possible paths from each beat to it’s similar neighbors. When the song is not playing, you can mouse over any beat and see all of the possible paths for that beat. When the song is playing, the visualization shows the single next potential beat. I was quite pleased at how the visualization turned out. I think it does a good job of helping the listener understand what is going on under the hood, and different songs have very different looks and color palettes. They can be quite attractive.
I did have to adapt the Infinite Gangnam Style algorithm for the Infinite Jukebox. Not every song is as self-similar as Psy’s masterpiece, so I have to dynamically adjust the beat-similarity threshold until there are enough pathways in the song graph to make the song infinite. This means that the overall musical quality may vary from song to song depending on the amount of self-similarity in the song.
Overall, the results sound good for most songs. I still may do a bit of tweaking on the algorithm to avoid some degenerate cases (you can get stuck in a strange attractor at the end of Karma Police for instance). Give it a try, upload your favorite song and listen to it forever. The Infinite Jukebox.
Some of my favorite listener contributed tracks:
- Call Me Maybe
- R Kelly’s Ignition (remix)
- Scatman by Scatman John
- Feel Good by Gorillaz
- The Game Has Changed by Daft Punk
- Supersition by StevieWonder
- Blue Rondo a la Turk by Dave Brubeck
- BIRDHOUSE IN YOUR SOUL by They Might Be Giants
- Mediterranean Sundance 5.14 by Al DiMeola - this one is fantastic!
- I Feel Love by Donna Summer – this song was made for the Infinite Jukebox
- Come Together by The Beatles – The Beatles are really tight on this song, so it works really well
- Yakity Sax – The Benny Hill Theme - oh my.
- The Game has Changed by Daft Punk - ”This song was made for the Infinite Jukebox” – an insightful Internet user
- Sabotage by the Beatie Boys
- Green Grass and High Tides by The Outlaws - the guitar solo that never ends! via @tpetr
- Smells Like Teen Spirit by Nirvana – seamless infinite grunge