Computer Science PhD student in St Andrews. Interested in social networks and usable privacy, with some other nonsense thrown in. I share the cool stuff I find, and open source the code I write, so take it, run with it, and make it beautiful!

Hands-free Spotify

I’m one of those odd people who has a huge music collection lying around (my secret shame is I still buy CDs!), but it’s not always with me, and while Last.fm radio is great for a bit of background noise – it can be a bit hit and miss. When I’m listening to music, I’m a bit of a control freak too. One thing I do without really realising is I queue up songs that end up forming a sort of narrative, as I make lateral jumps from song to song, leading myself down a musical garden path.

Spotify is amazing for having something resembling the breadth of my music collection, plus so so so much more – perfect for a bit of garden path exploration. However, if I’m at work, or just lounging about, I don’t particularly want to obsess over every single song I listen to next – especially when I have some 10 million to pick from. I wanted to see if it’s possible to take that approach to queuing music and encapsulate it in an algorithm.

Spautofy is the result. It’s a lightweight app which sits alongside Spotify. Start playing a song, and it’ll query Last.fm for a similar one. If it’s in the Spotify catalogue, it’ll ‘queue’ next (but currently, without any proper API hooks into the Spotify queue this involves some truly ugly attempts to manually play the song just as the last one is ending). The process repeats, but now the algorithm attempts to look for a song similar both to the current one and what was playing immediately before, and so on…

It’s early days, and I’ve put up an early build because it at least works semi-reliably on my own box. It’s available now on CodePlex for you to try – so please leave bug reports and feel free to contribute to the source! Please note this hasn’t been tested any wider at all, so I can’t promise anything in terms of reliability. Give it a bash and if it explodes, feel free to shout at me in the comments :)

1 Comment

Posted: May 28, 2011 at 2:21 pm

One Response to “Hands-free Spotify”

  1. Luke Hutton » Blog Archive » Down the musical garden path Says:

    [...] A while ago I published a little C# app called Spautofy – it awkwardly interfaces with Spotify to try create an ‘infinite mixtape’ – start playing a song and it will queue songs which are similar to those which came before it. The idea was to mimic algorithmically the way people jump from song to song, constructing a sort of accidental narrative as they go. Unfortunately, the way it tried to control Spotify was so hacky it was really unreliable, so not as useful as I’d like. [...]

Leave a Reply