Friday, March 16, 2007

Geekin' the iPod

Warning: long and very geeky post ahead that has absolutely nothing whatsoever to do with games. You have been warned.

Apple's iPod is currently the clear winner in the digital music wars but not necessarily for the reasons you might think. Sure, the iPod looks really cool. Yeah, it's super sleek, super compact, and it has a really nifty user interface (love that click-wheel). And sure, the iTunes store has built-in podcast support and easy access to a huge and well organized catalog of music for download. Oh, all of those things may be true but none of those things is what really sets the iPod apart from the competition. Oh no. The thing that really makes the iPod light-years better than the rest is: the smartlist. Zune doesn't have it. Creative doesn't have it. Nobody but Apple has it and it's the best thing to happen to music since it first went digital.

So what is a smartlist and why should you care? Well basically, a smartlist is a filter that lets you build a list of songs based on any one of the dozens of different attributes that iTunes associates with each of your songs. For instance, you could build a smartlist that contains twenty randomly chosen songs by your favorite band. Or you could build a smartlist that contains all songs that you have rated with five stars.

When I first started using my iPod I immediately realized how useful it would be to rate each of my songs and I immediately created a smartlist that contained all of my four and five star songs. Then I could turn on shuffle and play that list, ensuring that I never heard a stinker. That was fine for a while but I soon realized that I wanted to be able to do more. I kept hearing the same songs repeating over and over (because random selection does not ensure that each song gets played the same number of times, or even at all) and I wanted more control over how the songs were mixed. Because Apple (foolishly in my opinion) doesn't provide any detailed documentation on how smartlists actually work, and because there are some quirks that aren't immediately obvious, it wasn't until much later that I actually figured out how to leverage them to give myself exactly what I wanted. Now that I've figured it out, I'm going to share what I've learned.

How Smartlists Work

(Caveat: this information is correct as of March 16, 2007)

The iPod has two kinds of playlists: regular playlists and smartlists. Both are important so I'll explain them both here.

Regular playlists are useful but they're static. A playlist is just a simple list of songs (well actually, tracks since you can also include podcasts or videos or most anything you can store in iTunes). It never changes unless you make it change by adding or removing songs to the list yourself. Its order is also static. If you want song A to play before song B then you need to put song A above song B in the list.

A smartlist is a set of rules that iTunes (or the iPod) uses to populate a playlist. A simple smartlist might be: "All songs rated greater than 3 stars." When you create a smartlist, iTunes evaluates all of your songs against the conditions of the list and populates the list based upon those conditions.

Smartlists can be built with multiple conditions. If you use more than one condition in a smartlist then you can specify that either all conditions must by satisfied or any of the conditions must be satisfied. (Some of you will recognize that as a logical AND or a logical OR.) There are dozens of conditions you can evaluate against but some of the most useful are conditions that check the rating of the song, the artist, the title, the genre, the play count, the skip count, or the length.

Smartlists can also be limited to a set number of songs (based on count, time, or size) which are chosen either randomly, or by some other criteria (such as length or play count).

iTunes comes with a few pre-built smartlists such as the "most recently played" list which lists all tracks which have been played in the last two weeks by descending play order, so the most recently played track is at the top of the list. There's nothing special about these smartlists. They follow the same rules as any other smartlist. You can even change them or delete them if you want to.

Smartlists caused me no end of frustration when I first discovered them. The first thing I tried was to set up a smartlist that contained twenty random 4 and 5 star songs. I immediately discovered that I got exactly what I'd asked for but that the list never changed. It was the same twenty songs in the same order every time I played it! That's hardly useful.

So the next thing I tried was to check the "live update" box. I figured that would make the list change every time I played it. WRONG! There was no difference! The list still always contained the same twenty songs! How odd!

Eventually I realized that smartlists weren't broken. I just didn't understand how they worked. I needed to know the answers to three important questions: "How can I force a song to leave my list?", "What happens to the other tracks in the list?" and "When will the list be updated?" These questions and others will be answered in this section.

There are a few very important concepts you need to understand about smartlists:

  1. Smartlists do not change unless something causes them to be updated.
  2. Tracks are never automatically reordered within a smartlist.
  3. Tracks are not automatically removed from a smartlist unless they no longer meet the list criteria.
So when will a smartlist be updated? A normal smartlist will be updated whenever you press the OK button in its property box. That implies when you create the list or change the list conditions, or even if you don't change the list conditions but just open the property box and press OK.

Live-Update smartlists are a little different. In iTunes, live-update smartlists are updated every few seconds whether they're selected or not. On the iPod it's less frequent since the iPod has limited processing power. Instead, a live-update smartlist is updated on the iPod only whenever it is chosen from the playlists menu. Merely repeating the smartlist isn't good enough. You have to actually select the list again.

Removing a song from a smartlist can be done in any number of ways. The easiest way is to select the song in iTunes and delete the song (note that the song is only removed from the list; not your library). If you delete only some of the songs then the other songs will remain in the list and they'll slide up to take the place of the deleted songs. The next time the list updates, the list conditions will be evaluated to see if more songs should be added to the list.

Going back to my first example of the 20 random songs list, if I just select all the songs and delete them they'll disappear from the list. Now if I open the list properties window and press the OK button it will suck in 20 more random songs. If I make the list "live updating" and delete all the songs, then I need only wait a second or two (if that) and the list will repopulate itself; no need to open the property box at all.

Do note that deleting a song from a list like this one doesn't necessarily mean it won't be pulled right back into the list. If it still meets the conditions then it might very well be chosen again.

Another cool thing about smartlists is that you can reorder the songs in a smartlist if you want to by clicking and dragging songs around and your changes will be respected because the songs will still all meet the list conditions.

The problem with using delete to remove songs from a smartlist is that there's no delete key on the iPod so you can't use this method to change the list dynamically on your iPod. Instead what you need to do is find a way to make the song remove itself from the list by no longer meeting the criteria. The easiest way to do that is to add two rules to your list:
  • exclude any song that has been played in the last day
  • exclude any song that has been skipped in the last day

Now songs will automatically drop off the list as they are played and if you decide you don't want to hear a song then you can skip it and that will also cause it to drop off the list. Note that you still should let it play for a second or two or the iPod may not mark it as skipped. Also note that on the iPod the songs won't actually be removed from the list until you select the list again from the playlist menu (a side-effect which can actually be rather handy). And also note that this means you won't hear the same song twice in a day using a list like this. (It would be very nice if Apple would let us specify a time interval shorter than a day.)

Putting It All Together

Now that you understand how smartlists really work you can do some very cool things by combining smartlists. Let me give you an example. Consider this set of lists:

-The Mix-
match any of:
.playlist is Ω 5 Star Feed
.playlist is Ω 4 Star Feed
.playlist is Ω Recently Added Feed
25 songs chosen randomly
live-update true

Ω 5 Star Feed
match all of:
.rating is 5 stars
.last skipped is greater than 1 day
.last played is greater than 1 day
6 songs chosen randomly
live-update true

Ω 4 Star Feed
match all of:
.rating is 4 stars
.last skipped is greater than 1 day
.last played is greater than 1 day
3 songs chosen randomly
live-update true

Ω Recently Added Feed
match all of:
.playlist is not Ω 5 Star Feed
.playlist is not Ω 4 Star Feed
.rating is greater than 3 stars
.last skipped is greater than 1 day
.last played is greater than 1 day
.date added is less than 2 months
3 songs chosen randomly
live-update true

This may look a little complicated but it's actually not that bad. The result is that -The Mix- will contain twelve randomly chosen songs with a carefully crafted mix: six 5-star songs, three 4 star songs, and three 4 or 5 star songs that I recently added to my collection.

One thing to notice is that -The Mix- is limited to 25 songs although it can only contain 12. The size of the list in this case is limited by the size of the lists upon which it depends. It will add random songs until either there are no more songs to add or until the list is full. Choosing a larger number means that if I ever decide that I'm not hearing enough 5 star songs I can bump the size of that list and I don't have to worry about changing the conditions in the master list.

Notice also that the Recently Added Feed checks itself against the contents of the 5 Star and 4 Star Feeds. That's because the criteria overlap and if I didn't do this then it might choose something that's already been chosen by one of the other lists. That really isn't a problem because when the lists are combined into -The Mix- the duplicate songs would only show up once, but that would result in a shorter list and I'd rather have the list always be the same length.

Another thing to notice is that -The Mix- starts with a hyphen and the various dependent lists start with an omega symbol (Ω). That's to make sure that the main list shows up first on my iPod's playlist menu and the various smartlists that are used to build it are forced to sort at the end of the menu behind any other lists that I might actually want to select. Sort order tricks like this are handy because it means it's easy to find the list I really want. (It would be nice if Apple let you hide certain lists altogether on the iPod.)

The list I actually use on my iPod is much more complex than this. It consists of a precise mix of 5 star songs, 4 star songs, recently added songs, songs that haven't played in a very long time, songs that have never been played at all, a few Brazilian songs (I lived in Brazil for a while), and one of a few other select songs that I want placed into "heavy rotation". Furthermore, instead of drawing my 4 and 5 star songs from the entire iPod or even a single genre, it pulls my songs from a carefully crafted set of lists that contain all the types of music I generally listen to. I also have special song feeds for Christmas songs and country songs that I can play if the mood strikes me.

I've also set up lists whose sole purpose is to help me maintain my feed lists. These lists show me all the songs that are not rated at all, songs that for whatever reason are not available to any of my main music feeds, and many other conditions that are interesting to me.

Here's a little gotcha I discovered the hard way: don't build a live-update smartlist that uses the "podcast is not true" condition. While that condition is supported in iTunes, it is not supported on the iPod so your smartlist won't ever "live update" on your iPod. Instead use "genre is not podcast".


Note that all of this assumes that you've rated all of your music. I use a pretty simple ratings system that works like this:

  • 5 stars: songs that I love and am always eager to hear. These should come up most frequently.

  • 4 stars: songs that I like and want placed into my rotation.

  • 3 stars: songs that I think are fine but I don't like them enough to want to hear them unless I explicitly select them. Most of these start life as 4 star songs and then I bump them down as I've decided they're not good enough to hear very often. I occasionally review these to see if some should be promoted again.

  • 2 stars: songs that I really don't like. If my iPod ever begins to fill up, these are the first to go.

  • 1 star: songs that I want kept around but I don't want these ever placed into rotation. Most of these are songs that are duplicated elsewhere in my collection; perhaps they're on a greatest hits album. Sometimes these are track that only work in an album context. The key here is that a one rating doesn't mean that I hate the song; it just means that I've rated it and I want it to stick around.

  • 0 stars: songs that I haven't rated yet.
Naturally, you're free to use whatever rating system suits you.

Last Words

Once you've got your music feeds set up just the way you want them you may never need to use the iPod's shuffle feature again. Since your master playlist will be populated by a random set of songs anyway, there's little reason to turn on shuffle and leaving shuffle off can have several advantages. For example, even though the list is randomly generated, it's sometimes nice to be able to see what's coming up next. Also, if you have to pause playback for whatever reason it's very easy to continue right where you left off because when you navigate back to your playlist later, the song you were listening to last will be at the top of your list when you return to it.

So take control of your iPod! Don't let Apple's mysterious shuffle algorithms get the better of you! Make sure you always get to listen to what you want to listen even when you aren't sure!

Finally, are you listening Microsoft? The Zune's pretty cool but until you come up with something that can compete with Apple's smartlist you will never be number one.

Appendix: Essential Smartlist Principles

  1. Smartlists only change by themselves when they are updated.
  2. Simple Smartlists are updated only when you press OK on their properties dialog.
  3. Live-Update Smartlists are updated in iTunes every few seconds.
  4. Live-Update Smartlists are updated on the iPod only by the act of choosing them from the menu.
  5. Tracks are removed from a list only when the list is updated and they no longer meet the criteria.
  6. If a track is removed then subsequent tracks slide up to take its place. When the list is next updated, the rules will be consulted to see if more tracks should be added.


At 5:49 AM, March 29, 2007, Anonymous Gerhard said...

somehow my smart playlists are still broken, they only work on iTunes, but don't get ever updated on the iPod.
Do I miss some additional options on the iPod settings?

At 7:32 AM, March 29, 2007, Blogger Steve said...

If any of your smartlists contain a condition that isn't supported on the iPod (such as "Podcast=true") than they won't update and they will keep other smartlists from updating as well. The iPod doesn't support folders so if any of your dependent smartlists are in folders, try getting rid of the folders (move the smartlists out first of course) and that might fix it.

At 10:52 AM, March 29, 2007, Blogger Steve said...

By the way, a friend of mine pointed out that Microsoft's Media Player does have a feature similar to smartlists. They call it the auto playlist. Auto playlists are pretty cool but they fall short of the functionality of smartlists in a couple of ways. First, so far as I know there are no devices which support them on the device. That means that you can build the list in Media Player but once you download the list to your device it's static. You'll have to dock again to get the list to change. More importantly, auto playlists can't refer to other auto playlists. With smartlists I can build a list that has a precise number of songs from category A + a precise number of songs from category B and so on. With auto playlists, I don't have nearly as much control. But the real puzzler is that the Zune doesn't use Media Player and doesn't have auto playlists at all! I have no idea why the Zune team decided to make their own player with less functionality than the already mature and perfectly functional Media Player but for whatever reason that's exactly what they did. Perhaps there's a good reason and someday it will benefit the customer but I certainly fail to see it.

At 2:30 PM, April 09, 2007, Blogger no so much a geek said...

Thanks, my music collection is pretty eclectic and I have a number of book & spoken word genre in the library. I love the iPod shuffle but when it brings in a chapter of a book, or an Italian lesson, or a short aria it's annoying.

Following your advice let me create my own shuffle feature by excluding, books & spoken and opera (I renamed the opera from classical to opera) I get the music I want without having to create endless play lists. When you get up above 3500 tracks it's nice to let the technology choose the tune.

At 12:57 AM, June 08, 2007, Blogger Antonio Cárdenas López said...

hey, great post, it helped me with some troubles I was having with smart lists :P

thanks :D


Post a Comment

<< Home