2005/12/14

2005 12 14

Base | Lab | iTunes

21:04

Overlapping tastes

I share a living space with my wife and family (a concept not unheard of, I guess). For the time being and seeing as the eldest is about 2.5 years old, the children have very little to say about what songs get played. Actually, I make a concious effort to expose them to the full scope of my own taste in music (which has in the past attracted comments like 'stretches the meaning of eclectic')

In any case, the only relevant tastes I need to deal with are my own and my wife's. Fortunately, mine encompasses all of hers.

What I did to create the possibility to switch between her taste and mine, wilst maintainting the cool dynamic of my Shuffle playlist, is to assign meaning to four ratings:

no stars
This track has not been assessed yet for this purpose.
1 star
Definitely outside my wife's taste
2 stars
Possibly inside my wife's taste
3 stars
Definitely inside my wife's taste

For my wife's automatic music playing needs, I use a smart playlist that is exactly the same as TheShuffle, but with the added rule that tracks must be rated two stars or higher.

One nice aspect of this mechanism is that by adjusting the rating, she can influence tracks appearing in her playlist or not. Another (deliberate) effect is that I can codify my unsureness about her liking a certain track.

Last (but rather obscure) benefit of the overall setup is that my main playlist reacts not only to itself being played (in the intened way), but also to her playlist being used, or any other track selection mechanism, for that matter.

Base | Lab | iTunes

19:26

Controlled randomness

As promised earlier, I will tell something about the rather elaborate stack of (smart) playlists that I use in iTunes.

First, let me state the Ultimate Goal that started me on this road: to have a playlist that I could blindly use, but that would both be as random as possible, but with a moderate preference for newer (i.e. more recently added) tracks. I got the idea off a mailing list, where someone had his currently playing tune mentioned in his email footer. Someone commented on the appearance that he had but one or two CDs and was apparently listening to them non-stop.

He explained in an answer to that comment that it was merely a coincidence, but not a strange one, as his playlists favoured newer tracks. It was never explained how he he achieved such a dynamic, but I was intrigued to the point of being hooked. In fact, I ditched WinAmp in favour of iTunes the very same day.

Over the course of time since then, I have tried a variety of algorithms, improving and tweaking as I went along. I should admit to trial-an-error, spurred on by the occasional insight, rather than systematic research. In any case, here is my thinking, so that you can either save yourself the trouble or correct my thinking.

The first thing to note is that any setup should be somewhat tuned to the amount of tracks in your database. Not as much the higher numbers, but rather the starting point of someone ripping all five of their CDs.

Second is the notion that to do anything above creating a very basic dynamic involves layering Smart Playlists. This will undoubtly result in a few playlists that you will use and just as many that merely form the building blocks. Recent incarnations of iTunes have a 'folder' feature, that I use, for this very reason, to hide those building blocks, since I will never use them for playing as they are.

OK, building blocks, then.

The most crucial playlist I use is one called 'Recent'. It's 'formula':

  • Match any of the following rules:
  • kind contains MPEG
  • Limit to 2 hours selected by most recently played
  • Math only checked songs
  • Live updating

In English this means: any MP3s that are considered active and have been played for the last two hours of playing.

Next up is a list called 'Exclusion'. The name is pretty accurate: it consists of a list of rules that are all like 'Playlist is not [Foo]. The idea is that in my library, there are a number of tracks that I do want to keep, but that I really only ever want to hear on purpose and thus never as part of any Smart Playlist. I manage this by maintaining a number of manual (i.e. normal) playlists, such as 'Spoken Word', 'Children's music', 'Stuff only my wife actually likes', etc. I find that using membershp of a certain playlist is easier to manage than maintaining multi-value 'Genre' tags. For one thing, I can use the interface with drag & drop for track management. Other than that, the difference is negligible.

In any case, to enable the concept of 'never automatically play any of these tracks' I collect these playlists in one called 'Exclusion'.

The next playlist I have called 'potential', but the name is rather meaningless in the current context. Its 'formula':

  • Match all of the following rules:
  • Playlist is not Exclusion
  • Playlist is not Recent
  • Limit to 10 hours selected by least often played
  • Match oly checked songs
  • ive updating

In English: figure out which tracks I want to hear at all, but leave out the ones that recently have been played. From all those, grab ten hours of the ones played the least often.

Whilst playing tracks, the dynamic emerges that tracks get played, get excluded for some time (determined by the limit in 'Recent') and then re-enter the pool. At some point, however, they are played too often and drift outside of the time limit set in 'Potential'. This is where the size of the library comes in: if you have just a dozen hours or so total playing time to work with (or you aplpy this mechanism to a subset of your library), you should use smaller values. Beware that large values (resulting in playlist with thousands of tracks) require lots CPU resource every time a track ends and mulitple playlists get (re)processed.

Obviously this dynamic is not nearly enough for the demanding bastard that I am. :)

The final playlist (and the one I actually use the most) is called 'TheShuffle' and looks like this:

  • Match the following rule:
  • Playlist is Potential
  • Limit to 54 songs selected by random>
  • Match only checked songs
  • Live updating

The net effect in terms of the playing dynamic, is that over time, the play counts of the tracks in the database levels out. In the meantime, by picking 54 songs (the amount which fills one screen on my laptop with iTunes maximised) out of ten hours playing time at random, I very much avoid repeating patterns in the order in which tracks are played.

The last element to throw into the mix (and somewhat of the reason I add the randomising layer) is that I play the 54-song list in descending order of track time, with the list set to repeat. Because of the 'live updating' set on all Smart Playlists, replacing songs can get added above or below the current one playing. It may thus take anywhere from 4 hours (a typical total playing time for 54 songs) to ten hours (in case the newly added songs are biased towards the 4-5 minute range).

I would be interested to do a study in larger libraries, but I think there is a weak correlation between song length (playing time in iTunes parlance) and genre. My technique thus groups genres dynamically based on that weak correlation.