Since I started listening to more music through iTunes on my Macbook and with my iPod Mini, I decided to reconnect with Audioscrobbler or technically last.fm. I had used the old Audioscrobbler for a short while back in 2005, but they have since been absorbed and redeployed as the last.fm web services API.
Audioscrobbler plugs in to your media player, scrobbles your tracks a.k.a records what you listen to, and then uploads that data to last.fm. From there, last.fm taps you in to a social network of other digital music listeners. This has turned out be surprisingly interesting, as there are connections to playlists from similar users, videos for many songs that I didn’t think had one, and even free music.
Even better, I’ve found that my jury-rigged home MP3 jukebox can be hooked in as well. I’ve put a bunch of MP3s on an old Linux box. I run MPD as a remotely controllable, media player. MPD feeds an Icecast server which I can securely connect to over SSH tunnels. Comes in handy when trying to listen from work.
Just to be a completist, since I do a lot of listening in the office, I wanted tracks played through the above concoction to be scrobbled as well. MPD doesn’t directly support scrobbling, but there are a handful of supporting applications that listen to MPD’s playlist and scrobble the results. At first I gave mpdscribble a shot, thinking a stable C application would be pretty reliable. For whatever reason, mpdscribble often timed out uploading scrobble data. I switched to the Python based lastfmsubmitd and now things work great.
Finally lastfmsubmitd is a nice elegant piece of code that relies on basic UNIX principles to get the job done. It cleanly forks daemon processes for the MPD listener and the last.fm submitter, and uses the filesystem to record its data. Plus it logs nicely and feels very Pythonic. Excellent job!!
I’ll post more later specifically about the last.fm experience.