The Blues Box groups Spotify's blues catalog into five channels from sad blues (ex: Blind Willie Johnson) to "happy" blues (ex: B.B. King). To hear dark, woeful laments from a tortured soul, turn the dial all the way left. To hear the uplifting chorus of a spirit reborn, dial all the way to the right. For something in between, dial toward the middle.

I built the Blues Box during Hack Week at Spotify in Fall 2014. The project had two main components,  the enclosure and the music player. To prototype the enclosure, I used OpenSCAD and a Makerbot Replicator 2. Once I had the basic dimensions, it was easy to iterate on the design and lay out the player components. I also documented the general steps for setting up a RaspberryPi for an audio hack in case you want to build something similar.

The next step involved building the player. I used a RaspberryPi B+  and a proprietary Spotify player built specifically for Raspbian. After the Pi boots up and initializes the player, a Python script listens for input from the channel and volume knobs. The script also pre-fetches 10 tracks per channel. Fetching the tracks involves hitting an Echo Nest API endpoint to search for tracks within a genre based on emotional descriptors. Early on I built a basic prototype in a browser so I could quickly iterate on the backend calls.

To build the final enclosure, I laser cut wood for the front and back panels and acrylic for the interior structure. An enclosed lithium battery powers the Pi. A small rechargeable speaker connects to the PI's audio output. 

The nice thing about this project is its flexibility around genres. Instead of blues, you could explore the emotional spectrum of jazz, rockabilly, celtic folk, etc. I've listened to many discussions about the relationship between mood and music recommendation. The Blues Box gets pretty much to the heart of the debate. 

You'll notice in the photo on the right, the Blues Box has a friend! @MrChrisJohnson and I also collaborated on a real time recommendation box. Push the left button to thumbs down. Push the right button to thumbs up. The play queue updates in real time!