I recently posted a five-hour version of "The Song That Doesn't End," and in the discussion boards, atteSmythe was kind enough to point me to an adjacent idea called the "Eternal Jukebox"–an application that allows you to listen to any song, forever. I was curious so I had to learn more!
I went over to the Eternal Jukebox—"For when your favorite song just isn't long enough"—and played around with it. The bottom of the website states that the app is "powered by Spotify," so I'm assuming you can search for any song that's available there.
I first chose my current obsession, "Clean-Up Crew" by Spanish Love Songs, and listened for about nine glorious minutes. It sounded great. My second pick, The Mountain Goats' "Opossum by Night," also worked really well. But the app stumbled hard on "Skyway" by The Replacements. It kept getting stuck in endless ten-second loops of various parts of the song—and turned this beautiful ballad into an abomination. That glitch aside, I loved playing around with app and will continue to do so. What's even cooler is that it generates a colorful visual showing various pathways through whatever song is currently playing.
The original app was called "Infinite Jukebox" and was created by Paul Lamere at the 2012 MIT Music Hack Day, as an adaptation and extension of his previous app, "Infinite Gangnam Style" (fair warning: click that link at your own peril)–which Cory Doctorow wrote about here on BoingBoing in 2012. Back in November 2012, Lamere explained how Infinite Jukebox worked:
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 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.
In November 2022, Paul Lamere reflected on ten years of the Infinite Jukebox. He wrote:
Ten years ago, at the Boston Music Hack Day held at the MIT I built the Infinite Jukebox – a hack that takes (almost) any song and makes it last (nearly) forever. The hack made use of the Echo Nest audio analysis to identify parts of the song that were self similar and automatically created looping points that the engine could use to play an every changing and never ending version of the song. The jukebox included a nifty visualization that would animate as the song was playing back.
The Infinite Jukebox was quite popular, making it to the top of Reddit and Hacker News (which of course, triggered the OMFG how do I keep this running with so much traffic, Wired magazine, cited in dozens of research articles, and it even won an Information is Beautiful design award.
I built an iOS version of the Infinite Jukebox too, but I realized that the music licensing would be too big of a challenge and I'd never be able to release it in the app store. A video of the iOS version lives on as a record of this effort.
Eventually, the corporate lawyers got a little too nervous about all that uploaded content being served and the machines hosting the system were shutdown.
However, that wasn't the end of the Infinite Jukebox. An enterprising developer: Izzy Dahanela made her own hack on top of mine. To make it work without using uploaded content, she matches up the Echo Nest/Spotify music analysis with the corresponding song on YouTube. She hosts this at eternalbox.dev. It runs just as well as it ever did, 10 years later.
I loved learning about the history of the Eternal Jukebox, and I'm thrilled that it's still up and running after more than a decade. Go listen to your favorite songs, forever, here.