This week's problem deals with Apple's iTunes "smart playlists." As many of you likely know, iTunes is an application for organizing and listening to your music. One of iTunes features is the ability to create "smart playlists" which select songs to play based on criteria you specify.
Problem #1: Create smart playlists named Playlist A, Playlist B, and Playlist C that have the following property: When a song from Playlist A is played, it is removed from Playlist A and subsequently added to Playlist B (perhaps not immediately, but as soon as possible). Similarly, a song from Playlist B, when played, is removed from Playlist B and added to Playlist C. Likewise, a song from Playlist C must move from Playlist C to Playlist A when played. Your scheme may use other smart playlists in addition to these three.
A Smart Playlist can be set up to match either ALL of a selection of search criteria, or ANY of a selection of search criteria. There are many fields that can be searched: e.g. title, artist, album, genre, beats per minute. Some of the most relevant for this problem are
Search Field | Conditions | Comparison |
---|---|---|
Last Played |
is in the last is not in the last |
a number of days (or weeks or months) |
Playlist |
is [in] is not [in] |
another playlist |
For instance, to create a smart playlist with all the rock music you have listened to in the last month, except for songs by Ted Nugent, you would make a smart playlist (maybe called "Recent Rock") by matching ALL the following conditions
To make a smart playlist with all these songs together with songs you have listened to in the last week, create a smart playlist that matches ANY of the conditions
You may assume that the playlists are updated one at a time, in a sequence you determine and that this evaluation cycles repeatedly. That is, as soon as the last playlist is updated, the first one is updated again.
If you have any any questions about what is possible with iTunes smart playlists, feel free to contact me. One think that can not be done is to compare fields from different songs. You can't, for instance, make a smart playlist of songs you have listened to more often than "Whole Lotta Love," or more recently than "Purple Haze."
Note: It seems that iTunes may not, in fact, allow the sort of scheme described above. ITunes will not allow playlists that reference each other to be programmed. I think iTunes may have changed the way playlists are updated in the newest version, because I'm pretty sure I had something like this running before. Not exactly like this, but similar.
In any case, you should proceed with the problem, though it can only be considered an academic exercise. Rather disappointing, really. Your "solution" should consist of the selection rules for each playlist in your scheme, and a separate description of how they work together.