This is a first – finishing a hack before the night before the presentations and even having time to write some documentation and do a blog post! Despite this, this hack is by far most involved, impractical and ‘hackiest’ hack I’ve ever done.

DJ Spotify is made up of two parts. The first is the ability to play two consecutive Spotify streams with full control over playback speed, effectively allowing you to beat-match and, theoretically, do a whole DJ with streamed content. In summary, this is achieved by running the second instance of Spotify in a virtual machine via Parallels. The two streams are then sent into individual tracks in Ableton Live, each with a Max For Live patch which reads the Spotify stream into internal buffers which can then be sped up or slowed down at will.

The second part is a Spotify App which retrieves key and BPM information for tracks from EchoNest. Adding fields to Spotify lists isn’t supported by the API, so the workaround used was to request the display of some fields we’re not interested in (I used the Popularity and Share columns), and overwrite their titles and content.

There is so much more to the hack that would take far too long to write down (plus I bet it wouldn’t make very interesting reading), so I’ve made this diagram instead:

DJ Spotify diagram


I’ll post the code up onto GitHub whenever I get a chance although, to be honest, this system is so convoluted I would be seriously impressed if someone bothers to reproduce it…

Fingers crossed everything works in the demo!

UPDATE 1: Hack worked very well on stage! I’ve got a bit of work to do on my beat-matching, but at least all the technology worked. Video will be posted here once it’s online.

UPDATE 2: My hack was nominated the winner by the other hackers, which is a great honour, so I got to present my hack again at the MIDEM Innovation award ceremony. Here’s a video of that happening (starts at 31:32):

UPDATE 3: The code for both the audio routing system of DJ Spotify and the Spotify Key and BPM display app is now up on GitHub. The DJ Spotify system is very convoluted and I’ll be surprised if anyone bothers to reproduce it, but in case any one is interested in seeing exactly how it was done…:

DJ Spotify on GitHub

Spotify Key BPM App on GitHub