I upgraded to iTunes 7 yesterday. This new version adds a feature opera and classical fans were clamoring for, gapless playback. Often, two or more consecutive tracks must be played without interruption. CD players do that effortlessly, surprisingly few MP3 players can. A pause, however slight in the middle of an aria can be incredibly jarring. Apple took its sweet time, but they eventually delivered (although it is not clear if all older iPod models will support this beyond the 5G video-capable iPod). You have to explicitly flag albums that must be played without gaps by selecting the “gapless album” option.

I still have to get used to the cosmetic changes in the new version. I liked the green musical note icon better than the new blue one. The new style looks a little flat and one-dimensional, just like many Windows XP applications have a flat web page inspired look compared to the beveled buttons and controls of the CUA-based Windows 2000 interface.

iTunes 7 is also markedly different in behavior from previous versions in how it handles albums. To keep the user interface easily understandable for the general public, all tracks are shown as a single flat database, but behind the scenes, iTunes implicitly normalizes this into something that looks like the following relational data model:

old iTunes ER model

iTunes 7 added a few new fields, including “Album Artist”, which seems to be of dubious utility. I described in a previous article my coding conventions to work around the fact iTunes was obviously designed by people with absolutely no clue about classical music. Unfortunately, iTunes 7 does not rectify this situation, but what’s worse, they also changed the key for the album to include both Artist and Album Artist:

iTunes 7 ER model

I can understand why they did this – if you have several alternative versions of the same work by the same composer, but by different artists, they would be played in intermingled order, which is why I append (2), (3) and so on to multiple interpretations of the same work (by decreasing order of preference).

On the other hand, the new behavior means that if you assigned different artists to tracks in an album (in a classical piece or an opera, you seldom have all the tracks played by the same artists), iTunes mistakenly thinks you have several albums, one for each possible value for artist, and this breaks libraries that worked with previous versions. iTunes 6 and earlier would not care and play them all in the order implied by the Track# field. iTunes 7 will see them as different albums and you will get a nasty surprise when you play the album in shuffle mode, as it will skip to a completely different album halfway through.

Let me illustrate with the album I first encountered the problem with. The last two tracks have Peter Seiffert credited, whereas the first two do not. The list view shows the albums sorted properly, like previous versions of iTunes:

iTunes 7 list view

The album view makes it clear what iTunes thinks is happening:

iTunes 7 album view

The only work-around this today is to force all tracks in an album to have the same Artist field. I will need to write an AppleScript to identify all tracks that need to be normalized thus, even if this means a loss of information. A further quirk is that the implicit normalization is apparently done at iTunes startup, so you need to restart iTunes for the changes to have an effect.

Update (2006-11-03):

I auto-updated to 7.0.2 today and finally figured out something that has been puzzling me for a couple of weeks now. My copy of Poulenc’s Stabat Mater (Battle/Ozawa/Boston/Tanglewood) would not play as a single album, even though it is displayed as such in the album view. I have “shuffle by album” activated, and it would skip from any track in that specific album to a completely unrelated one. Even if I pinned it down by entering “poulenc stabat” in the search box so no other album could be selected, iTunes would skip from track 1 to a completely random track, instead of moving on to track two.

Apparently iTunes shuffles using a different algorithm than the album grouping. I have another album that has the exact same title “Stabat Mater”, albeit one by Pergolesi, not Poulenc (and four others by Dvořak, Szymanowski and Vivaldi, but the opus or RV number differentiates the album titles). Having two albums with the same title seems to confuse iTunes no end. I don’t want to mangle my album names just to appease iTunes 7, but I found a work-around: just change the mostly useless “Disc Number M out of N” field so the two albums with conflicting titles have different disc numbers, and they will collide no more. Better yet, use the CD number field to uniquely identify each CD in your collection, instead of just within a boxed set. Once again, you need to restart iTunes for this to kick in.