I’m a pretty hardcore Spotify user. I haven’t bought a track since I started subscribing to Spotify and I listen to it pretty much 24/7. (Though Rdio has got me curious lately; I’ll make a final decision on that later). I completely embrace the social aspect of the service, even though I’m quite proud of my original Spotify username, before the switch to Facebook logins (hey, they aren’t that common in the US!).
Unfortunately, Spotify does not include a visualizer and even so I quite like the visualizer included with iTunes (even though I use iTunes for nothing else). So I decided I needed to find a way to use the iTunes Visualizer with my Spotify music.
My first instinct was to write some code. I pulled together a ruby script using rake, thin, and a CoreAudio gem, all combined with Soundflower (an audio routing application for Mac OS X). After an hour of failed attempts I came to the conclusion that I was trying too hard. iTunes can already play HTTP streams, so all I needed was a program that could stream the audio from a particular audio device over HTTP.
Enter Nicecast. It costs $60 so I’ll probably looking for some free alternative for the masses (or writing my own once I get around to it) but it works for the time being. It has more features than I require and I’d love something integrated more tightly with Spotify (ex. Sending new song names to iTunes to display them) so maybe I will create a small server application to do it, but for now Nicecast suffices.
So what I did was essentially:
- Install Soundflower and configure the 2 channel device (“Soundflower 2ch”) to use the Built-in Output. This will take whatever Spotify is playing and make it available to another application through the audio device input “Soundflower 2ch”.
- Install Nicecast and configure it to stream the input device “Soundflower 2ch” over HTTP. The default port it uses is 8000.
- Once Soundflower and Nicecast are both running and configured, open iTunes and go to Advanced -> Open Stream… (Command + U). In the box that pops up, type the string “http://localhost:8000″. This will tell iTunes to open an HTTP audio stream that is coming from your computer over port 8000, which is where Nicecast wil be streaming your audio.
- Turn the volume down all the way in iTunes (or Spotify, either or. Doing so in iTunes will probably have better synchronization between the visualizer and audio but I haven’t tested this).
- In iTunes, click View -> Show Visualizer (Command + T).
- You should know see the standard iTunes Visualizer, only it will be be using whatever is playing in Spotify as its source.
I like to have the Visualizer open while I’m cleaning on Sundays as it provides something to look at but isn’t distracting enough to keep me from getting shit done (like TV is). Usually I would just play muted random music I still had in iTunes while Spotify was open, but I like this solution much better.