Controlling Spotify

I spend an inordinate amount of time at home sat on the sofa in front of my TV working on my laptop.  I have a nice little media set-up consisting of a Mac Mini connected to my Sony Bravia TV which provides me with a nice little Internet connected multimedia option.  Rather than watching TV all the time I frequently find that I want to listen to some music while I work and because I’m quite fickle with what I want to listen to at any time Spotify has proven to be a great little piece of software.

When I first put the Mac in place I used Real VNC to control it and that worked fine until I upgraded to a new TV.  Real VNC just can’t cope with the resolution and so I bought a KeySonic ACK-540 MAC-RF wireless keyboard (with integrated touchpad) which has been fantastic.  I still use it all the time, but I found it a pain to use with Spotify as the power saving features of the keyboard mean I have to wait a few seconds and hammer some keys to get the application to respond.  So I started searching for another (free) solution.

The first solution I found is from theMacBox and enables some control over Spotify using an Apple remote control (which comes with a Mac Mini).  The solution is based on SIMBL (Smart InputManager Bundle Loader) and takes the form of a plugin that “listens” for the remote control and then looks to send key presses to Spotify to instigate the responses required.

This solution allows you to change the volume, skip forward and backward through the current playlist.  It also allows you to close Spotify.  So this is great once Spotify is up and running, but there’s no way to change playlists or to open Spotify in the first place.  For these activities I swap back to using my wireless keyboard.

The second solution I came across is a little more involved but a little bit more powerful and in my opinion has a certain geek-chic to it.  This solution is based upon another plugin, this time by Semisans and posted on the MacThemes forum.  The plugin this time is for iSofa a stylish solution to controlling several applications on your Mac.  It works by running a web service on your Mac which is designed to be accessed using your iPhone or iPod Touch.  It assumes that you are on the same network or that your taking a little bit more of a risk and connecting over the Internet (assuming you’ve configured your router to allow this traffic) - for a long distance remote control!  The focus is definitely on style as you can choose backgrounds for the web server to deliver to the iPhone/iPod, but it is actually practical as well.

Once you have iSofa installed you need to install Semisan’s plugin.  I had a little trouble with this as the ZIP file I containing the plugin and the instructions in the forum post were more than a little ambiguous and didn’t seem to match up.  So to make it a little easier here’s how I’d describe what you need to do (hopefully this won’t confuse you even more).

  1. With iSofa installed, download spotifyremote2.zip from the link in Semisan’s forum post.
  2. Inside the ZIP file is a folder called “spotifyremote2” containing a number of SCPT files and a folder called 02Spotify. Copy the SCPT files into /Library/iSofa/scripts on your Mac’s hard drive.
  3. Navigate to the /Library/iSofa/modules/02/02 folder on your Mac’s hard drive. Rename this folder to “02Spotify” so the path is now /Library/iSofa/modules/02/02Spotify.
  4. Copy the PHP and PNG files from the ZIP file’s “02Spotify” folder to the one you have just named “02spotify”.

The web interface not only allows you to skip through tracks in a playlist and alter the volume levels but it also allows you to open Spotify (and several other applications including iTunes, Front Row and VLC) and skip amongst the first nine playlists.

At this point I have to let you into a secret.  I don’t have an iPhone or an iPod Touch.  Now I thought that iSofa was just a simple web interface designed to fit on the iPhone / iPod Touch screen.  I thought that it would show up just fine on my browser on my laptop.  I was unfortunately wrong.

I tried accessing the service using Mozilla Firefox and got a blank page.  I tried with a couple of versions of Microsoft Internet Explorer and got the background image but no interface.  So at this point I decided to get myself a virtual iPhone.

GenuiTec have a basic iPhone emulator called MobiOne that runs in Windows and is just the job for me.  After installing the MobiOne (which also doubles as a Palm Pre emulator) navigate to the web address for the iSofa service:

  1. When MobiOne starts it defaults to “TruView” - select the top option to “Open”.
  2. From the “Open” screen choose “URL” and type in the URL to your iSofa web service - e.g. http://mymac:9999

You should now see the iSofa page.  Click on Spotify to open the Spotify page.  Note that this does not open Spotify on your Mac.  If Spotify is not open simply click on the play/pause on the page to open it - hopefully you’ve set it to automatically log you in.  If not you’ll really need to use a keyboard.

At this point pressing play again doesn’t do anything and there doesn’t appear to be an option to select a playlist - though there seem to be two different screens on Semisan’s post.  The trick here is to think about how you would use an iPhone rather than a PC.  The page being displayed is actually too big to fit on the screen.

Luckily MobiOne has an option to enable scroll bars (though if you have a touch screen and Windows 7 maybe that will work just like an iPhone?).  To enable the scroll bars go to the very top of the window below the title bar and there is a think grey menu bar.  Click on this bar and a settings panel will appear.  Tick the box to turn scroll bars on and you can now scroll down the page and access the playlist buttons.  Click on one of them and you’ve managed to get Spotify up and running without your keyboard.

So there you have it.  A couple of solutions the second one using an iPhone emulator on a Windows PC to access a web server on a Mac which runs some scripts to control Spotify.  It takes a bit of setting up but hopefully you’ll find the effort well worth it.  I certainly have.

Author: Stephen Millard
Tags: | mac | windows |

Buy me a coffeeBuy me a coffee



Related posts that you may also like to read