The Music Server

August 6, 2006

A few years ago, when Jen and I lived in a one-room loft, we both wanted to control the stereo’s music from our respective computers. All our music was in MP3 format, so I wrote some software to let us do just that.

The software had two parts. The server ran on a Linux machine that was hooked up to the stereo through a sound card. That machine also hosted the MP3 files. The client ran on our desktops and sent commands to the server over a TCP/IP connection using a simple protocol. I ran it from my desktop machine and Jen ran it from her laptop, which was connected to the server using a wireless card and router.

The client looked like this (on Windows XP):

The full list of all your songs is on the left, the playlist is on the right, and player controls are in the upper right. Features of the system included:

The server was written in C++. It used the id3 library, and I embedded some code that I grabbed from xmms, which they grabbed from mpg123. The client was written in Java and used Swing.

I was going to release the source code, but (a) we stopped using the program once we moved to a multi-room house, where centralized control of music no longer made sense; and (b) at work I’ve since developed a music system, and I’d rather not be releasing free code that competes with it.

Back to projects