Hipchat + Spotify/Spartify
- Technical

Solving studio playlist issue with ‘Spartify’

Head shot of OliverBy Oliver Northam

Like most office environments, our studio faces tough questions on a daily basis, such as “Is 21.5 or 22 degrees the optimal working temperature?” or “Is the Pepsi Max fridge rotation system working effectively for our throughput?”. The most challenging question we face daily – “Who is in charge of the music?”.

We used to have a laptop plugged into some speakers, running a Spotify client that had been loaded up with playlists. The volunteer DJ would pick a playlist for the day and that’s that. The issue with this is that everyone has different tastes. Quite often ‘Indie Weekly’ or ‘Nu Metal Classics’ wouldn’t appeal to everyone, and the task of picking a ‘safe’ playlist that everyone liked would be too overwhelming to prompt any volunteers, so the office would be in silence for large parts of the day.

Enter Spartify, an internal name for a project to solve these issues. The concept is simple and effective; pick a bunch of user selected playlists, mix them all together and play. This means if you want to satisfy those partial to ‘Nu Metal Classics’ or ‘Indie Weekly’, you just select them both.

The software to bring the concept to life is simple. A node.js ‘jukebox’ server with a compiled version of libspotify running where the speakers are. A node.js relay server running on a web server remotely and then the client, running in user’s browsers. When the ‘jukebox’ server connects to the relay server, it’s given a ‘Party ID’ which it then broadcasts to users. This ‘Party ID’ can be used to manage playlists or queue tracks people want to hear next.

The hardware required for a project like this is minimal. A Raspberry Pi 2 and a set of speakers. libspotify can be compiled for Linux and Windows too.

There’s also a plugin architecture, so there’s now a plugin for HipChat to tell us what’s currently playing in a room, with the option to skip tracks. There is a plugin to control audio volume coming too.

We now have a responsive, internet connected music system that satisfies all members of the team, even the metal heads and hardcore rap fans. Pulling multiple Spotify playlists together means that it’s even possible to slip guilty pleasures in there without attracting too much stick. Now if we could just hack everyone’s body temperatures to settle the air-con debate….

Get started

Plan your project