This is not a blog!

August 8, 2008

Creating intelligent radio-like playlists on iPod

Filed under: Music,Tech — vitalyb @ 6:57 pm

When I am using my iPod choosing a song or an album is quite a task – I have a moderate collection of 220+ albums (1600+ songs). Browsing through all of them to decide which song/album I want to hear now can be rather time consuming. I’d much prefer if I could just turn it on and let it play.

In theory I could just add all my songs and set the iPod on shuffle. However, there are a few issues there:

1) I don’t want to hear songs that I heard recently, which means a song that was played yesterday shouldn’t be played again.
2) I’d like the number of stars that I give to a song to effect how often the iPod plays it (e.g play a 5 starred song every 14 days but a 3 starred song every 30 days).
3) When I listen to a new album I want to listen to it more than anything else to get acquainted to it.
4) I also hear very different kind of music (Metal and Progressive rock) and I wouldn’t like them to mix.
5) I need an easy way to manage this system; adding new albums should be quick and easy.

To make these goals come true I’ll use the smart playlist feature in iTunes (auto-playlist in Windows Media Player).

Note: This isn’t a tutorial as your goals might be different than mine. Feel free to tweak the system in any way you feel fit. I’d be very happy if you go ahead and share your way with everyone in the comments.

What is a smart playlist
In iTunes a smart playlist is a playlist that updates automatically based on a certain set of rules. E.g. “show songs that have more than 4 stars”. For about smart playlists refer this site.

Step 1 – Creating genre/mood/style playlists
Since I’d like to have several “stations” each for a specific mood/genre, I need to create specific playlists to hold these songs.

  1. Create a folder in iTunes and call it “Playlist sources”
  2. Create playlist of varying moods/genres as you see fit. In my example, I created: “zRock (Quiet)”, “zRock (Loud)”, “zElectronic (Dark)”, “zElectronic (Energetic)”. Notice: I added a “z” prefix in front of ever playlist. It is done so that in the iPod these playlists will appear at the end.
  3. Next assign each of your songs to one (or more) playlists. It can be rather annoying to do at first, however, if your songs have genre information in them, you can start by quickly putting all the genres into a specific playlist. For example, I started by putting all “Progressive rock” songs into “zRock (Quiet)” and then manually moved the loud ones to “zRock (Loud)”.
  4. Note: If your iPod can’t hold all the music in your library, add to the source playlists only as many songs as your iPod can hold. E.g if your iPod can hold only 4gb and you have 9gb of music, make sure that all the source playlists combined hold no more than 4gb.

Step 2 – Creating star-based rating smart playlists
As described in the first section, I want the amount of stars to affect how often I will hear a song:

1 star:  Every 80 days.
2 stars: Every 40 days.
3 stars: Every 21 days.
4 stars: Every 14 days.
5 stars: Every 12 days.

As you see, the higher the star rating the more often you will hear the song. Let’s consider what the final playlist of a certain station will look like:


  • (Rating = 1 AND LastPlayDate not in last 80 days) OR
  • (Rating = 2 AND LastPlayDate not in last 40 days) OR
  • etc

Now the problem here is that iTunes smart playlist does not let you mix the AND/OR operators. To get around this issue we need to split each logical group into a different playlist. Follow the following the steps:

1. Create a folder in iTunes and call it “Smart filtering”.
2. Create a new smart playlist and call it “z1 Stars” and define the following set of rules for the playlist:

  • a. Set it to match ALL of the following rules (also known as AND).
  • b. Last Played is not in the last 80 days.
  • c. Rating is 1Star.
  • d. Make sure that Live Updating is marked

3. Create the other new smart playlists and call them “z2-5 Stars” and set their rules accordingly.
4. You should now have 5 playlists under Smart Filtering, if you look inside each, you’ll only see the songs that match the last-played rule and the star rating.
5. Create a new smart playlist and call it “zNot recently heard” and define the following set of rules for the playlist:

  • a. Set it to match ANY of the following rules (also known as OR).
  • b. Playlist is z1 Stars.
  • c. Playlist is z2 Stars.
  • d. And so on for all the other Star playlists
  • e. Make sure that Live Updating is marked

6. If you look inside this playlist you’ll notice now that it holds ALL the songs that should be played according to the rules you’ve defined previously.

Step 3 – Handling new albums/unrated songs
Obviously when you add a new album to your library, it isn’t rated in anyway. We’ll use it to our advantage to identify new songs. However, it also means that all the other, not new, songs in your library should be rated. If they aren’t, I suggest you to choose all the current unrated songs and give them a single rating of 3 stars.
Now let’s add handling for unrated (new) songs:
1. Create a new smart playlist and call it “z0 Stars (Unrated)” and define the following set of rules for the playlist:

  • a. Set it to match ALL of the following rules (also known as AND).
  • b. Last Played is not in the last 5 days.
  • c. Rating is 0Star.
  • d. Make sure that Live Updating is marked

2. Notice that this new playlist of unrated songs will play a LOT more often than any other song in your library.
3. Now update your “zNot recently heard” playlist with the “z0 Stars”. Merely add to its set of rules this new playlist.
Now as long as song is unrated you will hear it a lot more until you decide if you’re keeping it and how many stars you’re giving to it.

Step 4 – Combining the efforts – Smart mood playlists
Now that we have both the smart, rating based playlists and the mood playlists, it is time to combine them. Do the following:
1. Create a new smart playlist that matches by name to your original mood playlist, e.g: “+Rock (Quiet)”. Notice the “+” prefix, this time it is added so that this playlist will appear FIRST in the iPod playlists. Define the following set of rules:

  • a. Set it to match ALL of the following rules (also known as AND).
  • b. Playlist is zRock (Quiet).
  • c. Playlist is zNot recently heard.
  • d. Make sure that Live Updating is marked

2. For each of your mood playlists create a new smart playlist as it was described above.
3. You should have several smart playlists, each containing a list of songs based on certain mood/genre and each holding only the songs that weren’t heard recently, based on their star rating.

Final tweaking – Adding a limit and sorting
After a while with this system I started to notice that there is a problem – Since I listen daily to 10-20 songs, and each “ratio station” holds around 500 songs, I usually only listen to the older songs. And even though the new songs were available every 3 days, the probability of playing them among the other 500 songs was pretty slim.
To handle this situation I added the following rule to each final playlist (e.g “zRock (Quiet)”):

  • Limit to 50 items selected by least often played.

With this rule, each radio station will by default hold only 50 items and most of them will the items you didn’t listen enough to.

Problems and issues
To be able to use this system you must be syncing ALL your music to the iPod

  • If your iPod can’t hold all your music, you can set to sync only certain playlists, but these playlists MUST include all playlists the take place in the system: Sources, stars, and final stations. That means that the “Sources” playlists can’t hold all your music collection – Add to the sources playlists only the music you currently listen to.
  • There is a second way that lets you use the system for all your music, even if your iPod can’t hold it all. However it is complex and requires a more technical approach. If anyone will be interested I’ll post it.

System preference of music – As you might’ve noticed, the system prefers songs that were played least AND that weren’t listened to long enough. Basically it means that songs that were listened less than others (e.g songs with low rating) will be pushed to the playlist as soon as they weren’t heard long enough. You can handle this issue by making the waited time on low-rated songs, longer.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: