Bitwise Evolution

Musings of a Portland-area hacker bent on improving digital lifestyles.

Playing It by Ear...

Those who know me well know that I am almost always listening to music of some sort. When I’m working you will usually find me with a set of headphones plugged into my ears, or speakers blasting (if that doesn’t bother anyone else nearby). Similarly, I always have the car radio on when it doesn’t interfere with conversation or intense driving, and I usually queue up some mp3s on the stereo before I start cooking dinner, cleaning, etc.

My taste in music is about as diverse as the situations above. I don’t particularly enjoy country western, or rap / hip-hop, but pretty much everything else will show up on a playlist at some point. This is somewhat of a problem; while in general I will enjoy listening to anything, at any specific time I’d prefer to stay within a certain genre.

The issue is that to achieve this level of filtering I need to do it manually. With a couple thousand tracks (with much missing meta-data, such as the “official” genre) this becomes a huge task. Also, keep in mind that some artists cross a number of genres – A Perfect Circle and Nine Inch Nails are two good examples. Some NIN tracks are nearly symphonic while others are very industrial, this prevents bagging by artist in enough instances to be annoying.

Recently a number of music management programs have cropped up that provide more filtering tools than a plain player such as winamp or xmms. iTunes is probably the best known of these programs – and I used iTunes for nearly two years and the searching it provides is much better than what I used before, but it still doesn’t do the level of filtering I want.

About a week ago I began using amarok. Amarok is similar to iTunes, but it makes use of a service called Audioscrobbler to provide suggestions on what to play. Audioscrobbler uses collaborative filtering techniques to recommend songs based on what you are listening to. I’ll come back to this, but first a sidebar on collaborative filtering:

The idea behind collaborative filtering is that people have similar tastes in “things”. If you like a given movie, say Star Wars: Episode 3, then you may like Star Wars: Episode 4, because many people who liked the first movie also liked the second. MovieLens (http://movielens.umn.edu/login) does exactly this. As you rate movies, it compares your preferences with those of thousands of other people, and predicts how you will rate movies you haven’t seen. I’ve had good experiences with using MovieLens, but I put significantly more thought into choosing a movie to see than I put into choosing a song to listen to. This makes sense when you consider the time commitment – 5 minutes spent choosing a song is wasted time, you could have just listened to it in that time. (Choosing an album to buy is a different scenario also, and seems to share many aspects with choosing a movie.)

Now, back to amarok and audioscrobbler. The problem here is that I want a specific genre, and I want it right now. This is in stark contrast to choosing a movie, which I could wait to see later if I’m not in the mood for that particular movie – I can control the context in which I watch a movie, but I’m not willing to dedicate that effort to choosing a song. Music is a background task for me, and it shouldn’t dictate very much attention. When I’m listening my attention has other targets: research, writing, driving, etc. However, I am not so involved in these tasks (usually) that I don’t notice the background music.

Audioscrobbler actually does pretty good. (The parts of amarok that take advantage of it are another story…) There are, however three (or more?) problems with audioscrobbler: 1) you must have a network connection to get suggestions, 2) your meta-data on each song must be correct, and 3) if you have diverse input to the system, you will get diverse output. To explain #3: The input I provide to audioscrobbler is of very limited use. The range of music I listen to is to large to provide information on what music “sounds” alike – Knowing that I like Bach and some tracks by Scooter (a rave artist) doesn’t help when I’m listening to Back or Scooter, since I probably don’t want Bach to pop on while I’m in a rave mood, or vice-versa. This has happened a number of times recently with amarok – it suggested a set of U2, Dave Matthews, Tool, and one of the tracks I used to program my iTrip. (The iTrip is a FM transmitter for an iPod, and the tracks are 6 seconds long, consisting only of a couple beeps that represent a new frequency to broadcast on.)

The solution to this, I think, is to make recommendations based on the actual waveform of the music. This should be able to detect things such as tempo, average amplitude, the change in amplitude (and the frequency of that change…) and so on. It seems reasonable that this would provide a more accurate representation of what a song “sounds” like. I have done some minor experimentation with this idea in the past, and I had some success. It is something I’d like to get back to, but until then, I’ll see if I can fix some amarok bugs…