I just discovered the perfect solution to one of my biggest problems in recent memory, i.e. controlling playback of my music playing on my Home Entertainment Computer. It’s called mpd and I love it. I love it I love it I love it I love it. Why didn’t anyone tell me about this earlier? It lets me remote control music playback on my entertainment machine from virtually any device in my flat. Well, I don’t think there’s an mpd client for coffee brewers yet, but still.
A bit of background: ever since I set up my own server (“im in ur closet survin ur blog”) I’ve stored my whole music collection on it. Everything in one place, nice and easy to manage. But I couldn’t very well play the music from the server. First of all, it has no display attached to it (ok, not a real problem, but I’ll list it just to get some more reasons). Second, it doesn’t have a decent sound card, and even if it did, it’s too far from my amplifier to connect an audio cable between them. The solution at that time was to mount the music directory on the server to my desktop computer and use Amarok or Rhythmbox or whatever player was being used at the time to play the music. Since my desktop computer was in the same room as my amplifier, an audio cable could be connected fairly effortlessly.
This solution worked quite well as long as my desktop computer was switched on (which it was 24/7). When using my old laptop in the sofa, I could even connect to my desktop over ssh and control Amarok through dcop. Which was nice.
Last year when I got my Mac at work, I ditched my desktop computer and started using the Book instead. About at the same time, I set up my Home Entertainment Computer which became responsible for providing me with digital tv, showing movies, playing music and so on. The HEC (heck, let’s call it Kermit since that’s its hostname) first used the same music playing setup as my desktop computer, mounting the music directory and playing it with Amarok. It has a wireless keyboard with some “media buttons”, i.e. play, stop, forward etc, making it fairly easy to control Amarok although the only display attached to it is my tv, which makes Amarok’s interface somewhat unreadable (besides, who want’s to keep the tv turned on all the time).
This was my reality until a few days ago. It performed allright, but still had some annoying drawbacks:
- Problem: I’m lazy. Reaching for the wireless keyboard 0,5m away to skip to the next song, change volume, pause, etc. is too cumbersome.
Solution: Use my laptop (which of course is in my lap) to ssh to Kermit and use “DISPLAY=:0 dcop amarok player next” and similar commands. Ok, I can live with that.
- Problem: Managing playlists. Dcop has support for queuing a file into the playlist from the filesystem, but it’s just too painful. Furthermore, it’s either not possible or really difficult to rearrange the playlist using dcop. Not to speak of searching for a particular song.
Solution candidate: use X11 on my Mac, ssh to Kermit with X11 forwarding and run the whole Amarok interface locally. The problem here is that if I close the lid on my Mac, the music stops. Fail.
Basically, having Amarok running on Kermit and controlling it with either the wireless keyboard or my laptop was like walking around in the dark. You get around, but you don’t enjoy the trip.
Along came mpd. A music playing daemon running on some machine connected to the loudspeakers, which can be controlled remotely (or locally) from a wide variety of clients. With a shitload of features it takes on Amarok anytime. Just point it to the directory with your music, start it and connect to it with a client. After that it’s like playing music locally, although the sound comes from the big living room speakers and not your crappy laptop speakers.
I started using MPcOSX, a client for OS X with basic playlist functionality. It looks smooth and works pretty well, but it still lacked some of the features I’ve been longing for. What really blew my socks off was the web based client RelaXXPlayer with drag’n’drop, context menus and the shitz. I even taught my girlfriend how to use it, so now it doesn’t require a geek to control music playback anymore. Ok, this version (0.6b4) has some performance issues (mainly due to polling the daemon every second and using tickers and sliders in the interface), but I took matters in my own hands and rewrote the interface a bit. I’ll upload the patches when I have time.
Edit: grab the patches here:
While these clients allow me to search for songs, reorder the playlist, change volume etc graphically, I still need my laptop as a remote control. Today I discovered MDPod, an mpd client for iPhone or iPod Touch. Since my girlfriend has an iTouch, I decided to try it out. Amazingly, it works really well, which means that I can use the iTouch as a remote control for the music playing in the living room. This is where I really started to like mpd.
The next step is to find a client to run locally which would interpret the media buttons on the wireless keyboard, and a scrobbler for sending info to LastFM.
But for now: over and out.