« Swinging Gangnam Style
High Five Hero »

The Infinite Jukebox

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.

spacer

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.

spacer

spacer spacer

spacer

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

Share this:

  • Twitter
  • Facebook

Like this:

Like
8 bloggers like this.
  • spacer
  • spacer
  • spacer
  • spacer
  • spacer
  • spacer
  • spacer
  • spacer

This entry was posted on November 12, 2012, 11:27 am and is filed under Music. You can follow any responses to this entry through RSS 2.0. You can skip to the end and leave a response. Pinging is currently not allowed.

  • Comments ( 82 )
  1. spacer

    #1 by Republic of Nynex (@nynexrepublic) on November 12, 2012 - 2:36 pm

    I have been unable to successfully upload a particular song. I don’t know if it’s my fault! If I close my browser before the graph shows up, will the upload eventually show in the recent uploads list? Can an analysis fail entirely?

    Reply
    • spacer

      #2 by Republic of Nynex (@nynexrepublic) on November 12, 2012 - 6:59 pm

      I see you now have a “ONLY MP3″ warning now. I was uploading m4a’s!

      Reply
  2. spacer

    #3 by Aaron on November 12, 2012 - 3:35 pm

    A UI quirk– I ran afoul of this twice before figuring out what the hell was actually going on the third time.

    The “Tweet” button doesn’t seem to appear until the song is fully loaded. So if you go and hover over the ‘play’ button while the song is loading, and click as soon as you see the big colorful circle appear on screen, you may end up back at the main screen because, while you weren’t looking, the “Tweet” button appeared and moved the “New Song” button over into the spot where the ‘Play’ button used to be.

    This is on Chrome 23.0.1271.64.

    Reply
    • spacer

      #4 by Paul on November 13, 2012 - 7:13 am

      Aaron – I’ve re-arranged the buttons. If you do a refresh, you should no longer see the buttons move just before you click

      Reply
  3. spacer

    #5 by Chris Smiddy on November 13, 2012 - 11:32 am

    When I minimize my browser or switch tabs the songs skip around.

    Reply
    • spacer

      #6 by Paul on November 13, 2012 - 11:59 am

      chris – yes, this is because browsers lower the priority of javascript in non-visible tabs. There’s nothing I can do about that. However if you want to play music in the background, you can just open the infinite jukebox in its own browser window and minimize that window.

      Reply
      • spacer

        #7 by mccannmedia on November 14, 2012 - 1:34 pm

        A ‘pop-out’ player might be a good addition.

  4. spacer

    #8 by Bob on November 13, 2012 - 12:08 pm

    Does it only play in Chrome? I’ve got the latest 16.0.2 Firefox and it tells me I need “advanced web audio”.

    Reply
    • spacer

      #9 by Paul on November 13, 2012 - 2:54 pm

      Bob – the app relies on the web audio api which is currently supported by Chrome and Safari.

      Reply
  5. spacer

    #10 by Rebecca Samuelson on November 13, 2012 - 5:18 pm

    Well, there goes the DJ….

    Reply
  6. spacer

    #11 by mike on November 13, 2012 - 8:57 pm

    Are there any mobile browsers that support this?

    Reply
    • spacer

      #12 by Paul on November 13, 2012 - 9:00 pm

      maybe the lastest/fastest iphone and ipad, but I don’t know for sure. It is rather processor intensive.

      Reply
  7. spacer

    #13 by @jpwack on November 13, 2012 - 11:27 pm

    You should call it the markov-chain-lyric-destroyer ;)

    Reply
  8. spacer

    #14 by Peter Dolkens on November 14, 2012 - 12:06 am

    What happens when you click beats? It seems to highlight them. I’d suggest that it toggles a “Forced jump” which would allow you to pick a good point to force the song to loop for those with harsh intro / outros.

    A similar method to prevent jumps would also be nice. Maybe ability to select a jump and press delete?

    Reply
  9. spacer

    #15 by frangossauro on November 14, 2012 - 12:10 am

    Hahaha, marvelous. Uploaded a jamming session and the results are just marvelous.
    Diving in into the code!

    Reply
  10. spacer

    #16 by Baeocystin (@Baeocystin) on November 14, 2012 - 2:49 am

    I’ve had lots of fun playing around with this, thanks!

    Some tracks are silly, some funny, but what has surprised me most is Little Wing. Getting lost in the loop has been delightful.

    Reply
  11. spacer

    #17 by Harold Schellinx on November 14, 2012 - 7:20 am

    Congrats! This is absolutely brilliant :)

    Reply
  12. spacer

    #18 by Roger Boyle on November 14, 2012 - 7:23 am

    OK – I get as far as “calculating pathways through the sog” and it just sits there for 30 minutes. Am I being dim?

    Reply
    • spacer

      #19 by MaxRabbit on November 14, 2012 - 5:54 pm

      I’ve just realised – it works in Chrome, but not in Chromium for some reason. Chromium seems to get stuck with the “calculating pathways through the song” message

      Reply
  13. spacer

    #20 by Brian Kotarski on November 14, 2012 - 9:07 am

    Simply amazing. Is it too much to hope for an mobile application for iPhone or Android?

    Reply
  14. spacer

    #21 by briankotarski on November 14, 2012 - 9:08 am

    Simply amazing. Is it too much to hope for a mobile app for iPhone or Android?

    Reply
  15. spacer

    #22 by Thomas Dippel on November 14, 2012 - 10:00 am

    Which of Echo Nest’s API’s are you using to analyze the beats?

    Reply
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.