Saturday, May 27, 2006

The Worst Thing about iPods

I'm very happy that Apple has provided Firewire for fast data transfers for so long. However, if you asked me to name the worst thing about the whole Mac / iPod / iTunes system, I would have to name Firewire as my #1 gripe.

How do you stop an iPod from charging? Plug it into a Firewire port! When the iPod first came out, I read how you could trickle-charge it by leaving it connected to the Firewire port on a Mac instead of using its own power brick. Well, I've tried that more times than I can count, with iPods from different generations, and it's never worked. I've left an iPod plugged in for 2 days straight, and the battery indicator didn't budge. I've plugged in iPods that were near the end of their battery charge, and had them shut off in the middle of synching because of low battery.

How do you stop an iPod from synching? Plug it into a Firewire port! Macs have some sort of fuse to prevent Firewire from overloading the power capacity of the computer. Frequently for me, the fuse gets tripped, possibly because I've got some external hard drives daisy-chained off one Firewire port. When this happens:
  • Plugging in the iPod leads to about a 20-minute wait before the computer announces it can't read the contents of the iPod and I should reformat it. (Don't fall for this trick!)
  • The Finder, file dialogs, and anything else that tries to check available volumes also lock up during this period.
  • The iPod icon never actually appears in the Finder, so there's no way to eject it properly.
  • Unplugging the iPod causes warnings about how the volume wasn't ejected properly, with subsequent rise in system instability.
  • The iPod's hard drive keeps spinning this whole time, leading to excessive heat buildup, loss of battery power, and often the need to reset the iPod by mashing down the buttons in combination.
  • If the iPod has to be physically reset, it frequently forgets any ratings I've assigned using the iPod controls since the last synch. (Sometimes, this results in losing ratings for >100 songs.)
Once the fuse is tripped, it doesn't matter if the iPod is plugged directly into the computer's Firewire port or daisy-chained off one of the drives. It doesn't work in either case.

The fuse seems to trip spontaneously without any help from the iPod. That is, it gets fouled up just from having the external drives going, so even the very first iPod connection fails. Meanwhile, the hard drives all keep working happily; the fuse doesn't cause any problems for them.

Rectifying the problem requires serious disassembly of a system with lots of external components. I've found that the computer must be powered down, all external hard drives must be powered down, and all the Firewire cables must be disconnected -- computer to drive and drive to drive. I also unplug the power cables from the drives, just to be safe. Leave everything turned off for 1/2 hour, then most times the problem will be solved when everything is plugged back in and reconnected. Not always though; I've had to go through this process multiple times just to synch an iPod successfully once. Then the problem might happen again later the same day. Leaving the iPod connected in its cradle while the computer is asleep seems to exacerbate the problem.

Apple seems to have woken up to this problem, and lately all the iPods come with USB connections. My Nano charges perfectly well over USB, and I've never experienced any similar problem with USB, either for the Nano or my older iPod that I can connect either way using a dual-connector cable. However, those of us with older Macs don't have USB 2.0, making it an all-morning proposition to synch a Nano, or an all-day proposition to synch a larger iPod.

Wednesday, May 24, 2006

Optimistic and Pessimistic Ranking Strategies

With computer algorithms related to performance, there are often variations known as "optimistic" and "pessimistic". That is, you figure out whether each operation is likely to be trouble-free or error-prone, and arrange things so that you don't waste a lot of time going down the wrong path.

I've run through a lot of different scenarios for ranking songs, and found that these complementary strategies can save plenty of time and aggravation if you use them wisely.


Let's start with the pessimistic technique, because I've found this applies in more kinds of situations. For me, it usually involves rating songs on the iPod while driving. It could also apply while listening to a particular playlist, particularly on shuffle play.

You should use this technique when you're listening to music that is unfamiliar, or from a genre that's not your favorite, or from a whole range of genres. You don't have any particular reason to expect great things from each song. You might like an occasional song, but chances are that >50% will get a low rating.

With the pessimistic technique, as soon as the song starts playing, you give it a low rating. For me, "low" means 2 stars. That's the rating where I'll actually uncheck the songs so they don't get synched to the iPod or played on shuffle or sequential play.

With the iPod, this typically involves 2 presses of the center Select button, spin the wheel until you hear 2 clicks corresponding to stars, then you can either put down the iPod and or press the Select button one final time to go immediately back to the time display. Within iTunes, I'd recommend a utility like SizzlingKeys that lets you use a keyboard shortcut to assign an iTunes rating regardless of what application you're in.

With a little practice, it becomes automatic to assign the same low rating every time a new song starts playing, or immediately after you skip to a new song.

The key with this technique is that the moment a song starts to bore or annoy you, you skip to the next song without even a fraction of a second of unnecessary torment. The low rating becomes permanent, you assign the next low rating in the first 1-2 seconds before the next song can really get going, and most of the time this is all you need to do.

For those relatively rare cases where a song deserves a higher rating, you have to assign a new, higher rating later on during the song. But this is not so unpleasant to do for an enjoyable song. Since you expect most songs to get low ratings, it's more important to avoid going into a funk from listening too long to bad songs, or having to fumble with the rating controls before you can skip ahead.

This technique is appropriate for:
  • Diverse collections. I'm using it for rating songs from SXSW 2005, which featured hundreds of free songs across a wide range of genres.
  • Exploring an artist's back catalog. If the band isn't one of your favorites, you already know their hits, and just want to make sure all their other songs are rated, you can expect that most songs won't be all that good.
  • Taking a flyer on a new style of music. For example, if someone says "you really should try some" modern jazz, nu metal, world music from a place you've never heard of... In other words, some style that if you were actually going to like it, you'd probably know if already. Hey, you might be pleasantly surprised, and if >50% of the songs earn a good rating you can stop using this technique.


With the pessimistic technique, the priority is to get out of a bad song as fast as humanly possible. The optimistic technique uses the opposite approach, the idea being that most songs deserve a high rating and so should play all the way through without having to touch the rating controls.

Instead of assigning a (low) rating to each song as it begins to play, then bumping up the rating for the occasional good song, you assign high ratings to all the songs beforehand, and only lower them for the occasional bad song. There's an assumption here that these rare bad songs won't be especially bad -- maybe deserving 3 or 4 stars instead of 5 -- so it doesn't drive you nuts to keep listening while you bump down the rating.

This technique is appropriate for music that you are familiar with and have high expectations for:
  • A "Greatest Hits" album from a group you like.
  • A box set from one of your favorite groups.
  • An acclaimed album (critics' choice, or on some "greatest of all time" list), in a genre that you like.
  • A live concert, or collection of cover versions, where you already know the songs.
I usually save this technique for cases where the average rating is likely to be 4 stars (meaning it's much rarer than the "pessimistic" case above).

Because this technique involves assigning ratings in bulk before you even start listening, it's not appropriate to use with a Smart Playlist with the condition "My rating is blank". That's a great way to rate unfamiliar music, because as you rate each song it drops off the playlist, meaning you only hear each song once, until you've rated them all and the playlist is empty. But to do something similar for songs with pre-assigned, guesstimated ratings, you must get a bit fancier with Smart Playlists:
  1. Put the collection of songs you're rating into a standard playlist.
  2. Make a second playlist, this one a Smart Playlist, with "All" of these conditions: "Playlist is name of first playlist", "Play count is 0", "My Rating is ****" (or 3 or 5 stars, whatever you want to use as the default rating).
Now you can listen to this new Smart Playlist at leisure, with minimal need to fiddle with ratings. Once a song plays all the way through (and you leave its rating on the default setting), it'll drop off from the playlist. (I'm assuming here that you're rating these songs while listening to them for the first time.) If you decide to change the rating for a song, it'll also drop off the playlist. Listen long enough, and the playlist will become empty; all the songs will be rated, with minimal effort since most of them just keep the default rating you set up in advance.

Categories: , , ,

Monday, May 22, 2006

Songs for the Silly Season

I was struck recently by the number of great songs (according to my definition of great) that actually have silly lyrics, themes, or origins.

In 1985, I remember getting dissed by a pretty girl in my biology class for asserting that Morris Day - It's About Time - Jungle Love"Jungle Love"
by Morris DayMorris Day and the Time was one of the best songs of 1984. (I had it tied for first with David Bowie - Best of Bowie - Blue Jean"Blue Jean" by David BowieDavid Bowie.) Her take: "It's funny, not good". I felt a measure of redemption when, at the end of "Jay and Silent Bob Strike Back", the best song of all time is announced and what do you know, Kevin Smith claims it's "Jungle Love". Ah, the days when Prince was so prolific that he could conjure up a great song for a fictional band invented just to be in a movie.

This is the first year my wife and I have watched "American Idol". In the first show we saw, I immediately decided that Bucky had to go. Couldn't understand -- could hardly hear -- his vocals at all. Paradoxically, on the show where he was voted out, I though his rendition of Queen - Queen: Greatest Hits - Fat Bottomed Girls"Fat Bottomed Girls" by QueenQueen was the highlight of the night. I remember they used to play that song over the arena speakers during public skating when I was a little kid not paying attention to the lyrics. Do you suppose there's some subtext there? Freddy Mercury certainly sounds happy.

I didn't actually see the show "Hit Me Baby One More Time", but I did read that the band CameoCameo played their song Cameo - The Definitive Collection: Cameo - Word Up!"Word Up" on one episode. That prompted some reminiscence, and I realized after listening to it again that it actually is a great great song with some fabulous tongue-in-cheek touches. Little sound effects a la "Kiss" by Tom Jones / Art of Noise. Then when the singer drops the Urkel voice and goes into that sustained wail, just great.

Among Canadian songs, two stand out for me:

"Switching to Glide" by the King Bees is chockablock full of lyrics that make no sense, or only as fragments overheard from one side of a conversation. But has a great beat and switches gears several times so it feels like half a dozen songs in one. (It's often referred to as "Switching to Glide / This Beat Goes On" to reflect the two major segments.) Doesn't appear to be available at the iTunes Music Store.

Which brings us to The Guess Who - The Best of the Guess Who - No Sugar Tonight / New Mother Nature"No Sugar Tonight / New Mother Nature" by The Guess WhoThe Guess Who . This really is a mashup of two separate songs. Burton Cummings and Randy Bachman each had half a song ready, both in the same key, so they jammed them together in a way that made no sense lyrically but worked as a tune. Legend has it that "No Sugar Tonight" was inspired when Bachman was about to get mugged, but the mugger was called off by his girlfriend with the thread of "no sugar tonight" if he didn't come right away.

Thursday, May 11, 2006

iTunes: Music Backups for Music Collectors

In this article, I address a topic that's bugged me for years: how to back up your big and/or fast-changing music collection through iTunes.

Serious nerds don't feel the need to do anything special to back up their music, because they're already backing up their whole computer all the time. But that's cumbersome if you have a big music collection, or if your music library is spread across multiple drives, or if you frequently make changes to song info. (Any such change updates the MP3 file so the backup software backs it up again. Any change to the artist, album, or song title can cause the file to get renamed, messing up the way the backup software tries to track changes to the same file.)

The man on the street can burn a CD or DVD from iTunes every now and then. has a popular page showing how to do that. But that's cumbersome if you have a big music collection, or you keep a lot of songs unchecked but still want to back them up.

There must be a middle ground, a technique using iTunes but still flexible enough to handle extensive music libraries!

The Outline

As in the OneDigitalLife article, the core of this technique is a smart playlist that accumulates all your recently added songs. That is, it has a "Date Added" condition so that all music added since the last backup appears in the playlist automatically. At periodic intervals, or after the playlist grows big enough to make a backup worthwhile, you burn it to one or more CDs or DVDs. Then you reset the "Date Added" condition so the playlist becomes empty, and gradually fills up again as new music is added.

The Essential Smart Playlist

Let's call this Smart Playlist "Backup - Monthly", for lack of a better name. Later, we'll rename it temporarily while doing the actual backups.

We're actually going to go a bit farther than a single-condition playlist; we'll add some touches to make the process work better.

Use a between test for the "Data Added" condition. Make the second date be way off in the future. For example, right now my "Backup - Monthly" Smart Playlist has the condition "Date Added is in the range 4/30/06 to 12/31/06". For most backups, you'll leave the end date alone, but if something goes wrong with a multi-disc backup and it stretches over more than one day, you can set the end date to the date you started the backup process. If you import more songs or fix some typos in song info partway through the backup process, you want to save those songs for the next go-round.

Use a second condition, also with between and the same start and end dates, for "Date Modified". Changes to song info, such as the song name, track number, comments, year, and so on are all stored inside the song file. After you fill in blank fields or correct mistakes and typos, those song files need to be included in the next backup. ("Date Modified" is not changed when you add a rating.)

Before burning the playlist, change its title to something that makes a sensible CD title, since iTunes titles the CD the same as the playlist name. For example, most of the time my Smart Playlist is titled "Backup - Monthly", but before the most recent backup I temporarily changed its name to "Backup - April 2006", then back again after burning the discs.

Don't set a size limit on the playlist. If it's too big for a single data disc, iTunes automatically splits it across multiple discs. Under Preferences > Advanced > Burning, leave the Disc Format set to Data CD or DVD, which ensures that all the files in the playlist are burned to disc. (MP3 CDs omit AAC, MOV, PDF, or other filetypes that you can manage in iTunes.)

Leave the checkbox unchecked for "Match only checked songs". Even though iTunes leaves unchecked songs out when it burns discs, you want them in this playlist. You'll see why in a minute.

Do check the box for "Live updating", so that the playlist grows whenever you add or change a song. You can play games with this checkbox if something goes wrong during the backup and you need to restart it or remove things from the song list. But as a standard practice, leave it checked.

Leave the playlist sorted by either (Song) Name or Artist (or, rarely, Album). The sort column determines how the files are arranged on the burned discs. Sort by song name, and the files are all placed at the top level of the CD, with no directory structure. Sort by artist name, and the songs for each artist go into a directory named for the artist. Sort by album name, and the songs from each album go into a directory named for the album. In each case, an ascending sequence number is tacked on to each item in the root of the CD.

I prefer to sort by artist, because the artist names are easy to scan, and if I'm going to import the songs somewhere else I'll probably do that for all the songs by that artist. I don't sort by song name because I want the song files on disc to keep their original names without the leading 001 etc. If the files are renamed, it's harder to locate or compare against the original files, and I've had the sequence numbers show up in the song titles when I imported the renamed files on another computer. I don't sort by album name because it's hard to tell one "Greatest Hits" album from another without a lot of work fixing up album titles.

Leave the playlist sorted the way you want when you first create it, and doublecheck the sort order before each time you do a new backup.

The Supplemental Playlists

Here's where one of my pet peeves with iTunes comes in: there's not a whole lot you can do with unchecked songs.

I uncheck songs for lots of different reasons -- because I have the same song on both a regular and "Greatest Hits" album, because I've ripped the same CD or downloaded the same Grateful Dead concert at different bit rates, or to keep audio book and other long files out of certain playlists. (Yes, you can also set the "Skip when shuffling" setting for a song, and add extra conditions to Smart Playlists based on Length and Kind, but the checkbox is a convenient shortcut that works in all situations.)

However, I do frequently want to burn discs and include all the unchecked songs. Maybe I'm making a backup copy of a CD ripped at multiple quality settings; maybe I'm about to get rid of a bunch of 2-star songs, but want a backup of those songs in case I change my mind someday.

iTunes makes this process kind of roundabout. Skip to the next section if you don't care about unchecked songs. Otherwise, please bear with me!

What we'll do is use a standard playlist to hold a list of the unchecked songs. We'll turn on the checkboxes for all songs in this playlist, burn the disc(s), then uncheck them again.

Make a new Smart Playlist titled "Backup - Monthly - Checked". Give it one condition, "Playlist is Backup - Monthly" (or whatever name you gave to the Smart Playlist you're using to do backups). Don't check the Limit box, check the "Match only checked songs" and "Live updating" boxes. Now we have a playlist containing only the checked songs from our backup list. We'll use this playlist for no other purpose than to figure out what songs in the backup list are unchecked.

Make a new Smart Playlist titled "Backup - Monthly - Unchecked". Give this playlist two conditions, "Playlist is Backup - Monthly" and "Playlist is not Backup - Monthly - Checked" (or whatever names you used for the previous two playlists. Now you've got a list of all the songs whose checkboxes you must flip while making the backup.

Now make yet another playlist, a standard one this time, titled "Backup - Uncheck afterwards". When you're ready to do a backup, drag and drop the Smart Playlist "Backup - Monthly - Unchecked" onto it, so that it lists the same songs as that Smart Playlist. Select all the songs in this playlist, right-click over one of them, and choose "Check Selection" from the pop-up menu. The songs disappear from the "Backup - Monthly - Unchecked" playlist, but remain here so you can uncheck them later. Most importantly, they will now be included in your backup.

All these playlists, just for backups, can clutter up your Source list in iTunes. Here's where folders come in handy. Make a new folder by selecting the Library icon in the Source list and choosing File > New Folder. Call it, oh I dunno, Backups. Drag and drop each of the backup-related playlists in there. Now you can get at them all at once, and hide them in between backups.

Feel the Burn

OK, at this point, you're ready to actually do a backup. To include your whole library, edit the conditions in the "Backup - Monthly" Smart Playlist so that the start date is in the distant past, before you started with iTunes. Otherwise, take a look in your "Recently Added" Smart Playlist to see when you added your last big batch of songs.
  • You've got the "Backup - Monthly" playlist sorted by the correct column to give the desired CD layout, right?
  • You've renamed that playlist temporarily to include the date or some detail to help you remember why you're backing up this particular batch of songs, right?
  • If any of the songs in the playlist are unchecked, you've set up the supplemental playlists as described above, then checked all the necessary songs, right?
  • Your disc format in Preferences > Advanced > Burning is set to Data CD or DVD, right?
  • You've looked at the total size of the playlist (at the bottom of the iTunes window, when the playlist is selected) to see whether you need a CD, a DVD, or multiple discs, right?
OK, select the playlist to burn, click the Burn icon in the upper-right corner of the iTunes window, and click Burn again after inserting a CD or DVD.

If your backup fits on a single disc, skip ahead to the "Aftermath" section. Otherwise, keep reading to learn the finer points of multi-disc backups.

Multi-Disc Backups

If the playlist is too big to fit onto a single disc, iTunes prompts you when the first disc is finished, then automatically continues burning a second, third, etc. disc until the whole playlist is done.

As each disc is burned, the status area at the bottom of the iTunes window shows how much is left to go. If you've already burned one or more DVDs, but the remaining songs would fit on a CD, you can pop in a CD and iTunes will happily use it for those last few songs.

As each disc is burned, iTunes also shows (with icons and grayed-out song names) which songs go on the current disc. Make a note of the first and last songs, on this disc, so that if something goes wrong you'll know where to pick up.

What could go wrong? During multi-disc backups, I've had (a) iTunes crash after finishing each disc, (b) iTunes error out while burning, creating a useless "coaster", (c) no power failure yet but I'm sure that's coming.

If your backup gets interrupted like this:
  • Edit the conditions for your backup Smart Playlist to turn off live updating.
  • Delete from the playlist all the songs successfully burned to disc.
  • Start burning again with a new disc.
  • Afterwards, turn live updating back on for the Smart Playlist.
Sometimes, these crashes occur while I've left a disc burning overnight, and maybe the next day I can't afford to tie it up burning more discs, or maybe I'm out of discs and need to make a trip to the office supply store. So the process stretches out over 2-3 days or even more. In cases like this, edit the two between conditions in the Smart Playlist so that the end date is the day you started the backup. That way, any songs added in the interim won't sneak in or be skipped over by mistake. You're deliberately leaving them until the next backup.

The Aftermath

Once you've completed a backup, potentially with multiple disks and temporarily checked songs, just a little cleanup makes things simpler for next time:
  • Set the beginning date of your "Date Added" and "Date Modified" conditions to the day you did (or started) the backup.
  • If you turned off live updating due to a failure partway through the process, turn it back on now.
  • If you temporarily checked some songs, go back to the "Backup - Uncheck afterward" playlist, select all the songs, right-click, and choose "Uncheck selection" from the pop-up menu. Then remove all the songs from that playlist.
  • It's not a bad idea to select the backup playlist, choose File > Export Song List and store a copy of the backup playlist somewhere for posterity. You can consult the list someday if you're looking for a song and the backup discs aren't easily accessible.
  • Rename the backup Smart Playlist to a generic name like "Backup - Monthly".
Happy iTuning!

Frequently Asked Questions

Seriously, why not just use dedicated backup software?

I don't have a whole lot of room left on my hard drive(s) even for music, so backing up to another drive isn't practical, I need to burn discs.

If I need to recover a song, it's easier for me to get it from a clearly labelled disc with a folder structure arranged by artist, rather than browse through some months-old representation of my entire directory structure within a backup program.

When I pop in a disc burned by iTunes, I can browse it within iTunes, drag-and-drop songs straight into the library, and recover their original ratings. Recovering a song via backup software means recovering the file back to its original location, then finding that location and importing back into iTunes.

I'm not expecting to recover my entire library this way, more likely audio books or podcasts that I trashed due to lack of space, low-rated songs that I changed my mind about, and so on.

Backup software isn't smart when files move around or change names. With iTunes, I might split a music library across drives, consolidate all songs on a new bigger drive, or change the file path by editing the song name, artist, or album. iTunes knows which of these operations requires backing up the song again better than Retrospect or what have you.

Related Reading

OneDigitalLife article about iTunes backups

Categories: , , ,

iTunes Cleanup: "Rolling Stones" vs. "The Rolling Stones"

As a database nerd, I'm bothered by inconsistencies in iTunes song data that seem easy to fix, but are too time-consuming for a large library.

I'm using a combination of Perl & Applescript to simplify the process of cleaning up information that is similar but not identical across different songs and artists. I wrap everything in Perl, and call Applescript only when necessary. That way, people on Windows (or even Linux) systems could use the code to identify problems, even if the fixes required editing the song info by hand. And on the Mac, the relevant songs can be automatically put into a playlist for later editing or fixing via other Applescripts.

For example, here's a little snippet that identifies all the artists who are represented as both "something" and "The something". Copy and paste it into the Terminal to run it.

grep "Artist" ~/Music/iTunes/"iTunes Music Library.xml" |
sort -u |
sed -e 's/>The />/' |
sort -d |
perl -e '

while($line = <>)
chomp $line;
if ($line =~ /Artist<\/key><string>(.*?)<\/string>/)
$artist = $1;

if ($artist eq $last_artist)
print "Inconsistent THE: [$artist] and [The $artist]\n";
$last_artist = $artist;

What this does is get an alphabetical list of all the artist names, with the initial "The" stripped off. If two consecutive names are identical, the full list of artist names included both the "The" and "no-The" forms.

  • All the songs for an artist will be filed under a single folder, rather than separate folders for "Beatles" and "The Beatles" and so on. Makes it easier to copy or transfer the files via the command line.
  • When going through the iPod "Artists" menu, you'll be able to get to all of the songs by that artist, instead of having separate entries with different groups of songs.
  • Having consistent names makes it easier to check for duplicate songs and weed out other sorts of problems.

Watch this space for more developments on this front!

Tags: , ,

Birth of an iTuNation

My personal blog could easily be overwhelmed by iTunes-related posts. Thus I'm starting the new iTuNations blog purely for topics related to iTunes, iPod, and music. Let's see what it grows into!