Click covers for info. Copyright (C) Rudy Rucker 2021.


Managing Music in iTunes

I link to this page from a new post on February 18, 2014. And I revised this page here, as well.

This post goes with another post, Ripping Vinyl to MP3s for iTunes.


[This post is illustrated with a sequence of non-computer-related photos that I took around Los Gatos and Santa Cruz recently. It’s been raining a lot lately, and now the sun is out, and today it was like a cool spring day.]

Prolegomena

This year I made a simple New Year’s resolution. I’d finally rip my vinyl to digital files. I’ve got a few hundred favorite old LPs in my living room, and I want to hear them on my iPhone.

I’ve been embroiled in this for a couple of weeks, and I’m going to write (at least) two heavily geeky posts about it. This, the first post, “Managing Music in iTunes for Free,” is on the general topic of organizing your music in iTunes, mainly focusing on the Windows platform. And the second post, “Ripping Vinyl for Free” will be about the related process of copying vinyl records into iTunes for use on your music player.

Let me state in advance that I’m a Windows user, and I am not a huge fan of iTunes, in terms of its feature set, user interface, speed and responsiveness. Ever since March, 2010, I’d in fact been getting by with using the Windows Media Player (WMP) in addition to a commercial plug-in that let me synch a Windows machine with an iPod. In some ways WMP is a better tool than iTunes, but I’m not here to argue about that today. Nothing’s perfect. [This pops into my mind a remark by Randall Jarrell: “A novel is a prose narrative of some length that has something wrong with it.”]

In any case, my old setup wasn’t compatible with my new iPhone 4, also there are a number of other things (like apps) that you need to synch with iTunes onto your iPhone. So I’m back in iTunes. Oh well. I’ve been around this track a few times before. And iTunes does have a pretty interface, that album-flip thing is cute. And I have to use it with my iPhone. So I might as well learn how to do it right. So I can rip my vinyl.

Free Tools

Over the years, and more so in the last two weeks, I’ve learned a few tricks about managing your music in iTunes. This information is not all that easy to find online. When you look for it on Google, most of the top-page links are to sites promoting feeble, kludgy commercial software. I downloaded trial versions of a few of these, and didn’t like them. They were slow, not all that good at what they were supposed to do, and they wanted, like, $39 to keep working after 100 songs.

With a little digging, I’ve learned how to do everything I needed for free. So I thought I’d note some things here, if only so I can easily find the answers when I’ve forgotten them in a year or ten. I am not going to mention or plug any commercial software at all in my two posts. And for that matter, I plan to remove or block any mentions of commercial wares from the comments on these posts. Real info from the people and for the people.

I’ve found two key pieces of free software for the Windows platform. Note that when I say “free” I use the word in the quaint old sense of “not costing anything to get and working forever without obnoxiously begging you for money.”

Tool 1: A free iTunes plug-in for Windows called. iTsfv , an acronym that stands for “iTunes store file validator.” This is one of the best pieces of free software I’ve ever seen. I have better results when I download the 2009 version 5.61 from from Sourceforge than trying to use the 2011 version 6.** from Google Code…the new version lacks a real interface. Not sure why the development process stopped…maybe they decided it’s “done.” It’s great for cleaning up your file names and file metatags. The one-touch validation tool does a lot for you. A confusing thing is that iTsfv only works when iTunes is open in a separate window, and if you want to work on some “selected files,” you select them in the iTunes window and then go over to iTSfs to do whatever chagnes you want. Sadly iTsfv runs only on Windows. I don’t know if there’s any free software that’s comparable for the Mac—possibly , GimmieSomeTune. Finally it’s worth noting that simpler fixes can be done by hand in iTunes, you select the files whose tags you want to alter, right click and select Get Info to bring up a dialog where you can alter tags or, for that matter, paste in an album cover image. You can do this to a bunch of files at once as well.

Tool 2: A free tag editor .  I use Mp3tag, which is free, and for Windows. This software lets you look up the titles of the cuts of an album’s songs, and allows you to copy these names both to the metatag and to the file name. This editor is also pretty good at finding album art, although, as I’ll mention later, you can fix the album art pretty easily by hand using Google image search.

The iTunes Architecture

I find it useful to have a mental model of what’s going on inside my machines. I think of there as being four different kinds of information involving your music when you use iTunes.

(1) The directory structure of the audio files saved on your hard drive.

(2) The internal data base that iTunes builds. You can’t see the database directly, but you see it indirectly in terms of what’s displayed in your iTunes window.

(3) The “metadata” tags embedded in your audio files. These so-called ID3 tags hold info like the song title, the artist, and possibly an image of the album cover.

(4) The album art.

In the rest of this post, I’ll make some comments about each of these four areas.

(1) Music Directory

I’m suspicious of less-commonly used file standards like the AAC format—which generally isn’t playable on generic music players. So I use the more widespread MP3 format. A win with MP3 files is that you can find good freeware editors such as Mp3tag for tweaking their metadata fields—which we’ll get into later on.

Do note that the iPhone, iPad, and iPod play MP3 files just as well as they play audio files in the proprietary Apple AAC format. There is absolutely no downside to using MP3.

If you want to convert existing AAC files to MP3, you can often do this using iTunes, and in fact a few years ago I did that to a lot of my files. But, as Peeter points out in a comment, it’s not really a good idea to convert from one lossy format to another, as it degrades the sound quality somewhat. So you might just switch to importing future files as MP3, and plan to work with a mix of the two kinds of files.

You set the rip and import as MP3 choice on the Edit | Preferences | Import Settings. Set it to MP3, and for the Setting, choose Custom…, which opens a dialog. The kps number determines how many samples per second you make of the music stream. In the old days I used 128 kps, but now I pick 256 kps, and turn on Variable Bit rate (which saves a bit on file size by using less bits on the simple parts of the songs) and choose Medium High or High for the VBR. We’re edging towards terabyte memory storage, and we can be generous.

It’s not at all useful to have your music files hidden somewhere invisible inside My Computer’s Settings files. You want your music files in an easy-to-find location so you can look at them, copy them, and, if you’re of a tweakerish nature, edit the file structure by hand. I make, say, a C:\Music directory on my hard drive, although I can put the directory somewhere else, too. I tell iTunes about this on Edit | Preferences | Advanced | iTunes Media folder location, where I set the iTunes media folder to be me Music folder. iTunes will store a few other things in there, but that’s okay.

Still in the Edit | Preferences | Advanced dialog, I’ve decided that’s wise to remove the checkmarks on the option “Keep iTunes Media folder organized (Places files into album and artist folders, and names the files based on the…song title)” The reason I turn this off, is that, if the option is on, then, over time, iTunes will repeatedly tinker with and in some ways degrade your Music file directory structure.

Along the same lines, you should avoid the File | Library | Consolidate action, which is about the same as importing the whole Music folder with Keep iTunes Media folder organized turned on—it will change your directory and filenames and may split some directories into several pieces.

And never ever use the File | Organize Library | Reorganize files option, which will copy the contents of your Music folder to a Music\Music subfolder.

Backing up a bit, note that, even when the Keep iTunes Media folder organized option is off, iTunes will still do something useful when you use it to rip CDs. Whether or not the option is on, when you rip a CD like Joe Moon’s Howling, iTunes will store the MP3 tracks of the CD in a folder like Joe Moon\Howling that goes into the Music directory.

Normally, compilation albums, that is, albums with songs by a variety of people, are all stored in subfolders of a Compilations folder—although iTunes isn’t always reliable in doing this. Keeping only multiple-artist albums inside the Compilations folder is the kind of thing that ultimately you may need to do by hand. And if the “Keep iTunes Media folder organized” is off, then iTunes won’t slyly and robotically trash your work

If you’ve edited your Music folder by hand—perhaps adding some files yourself, or moving the entire directory—you need to tell iTunes to import it, so the information goes into the iTunes data base. This is simple. Use File | Import Folder to import the Folders that you’ve changed. Doing this is almost instantaneous. If you have not turned off the “Keep iTunes Media folder organized ,” the action of importing these files will a change the directories’ name and some of the filenames.

By way of undoing iTunes depredations on your Music directory, note that, given a chance, iTunes will mangle the name of some artists or titles, in particular the “&” and “/” symbols are often replaced bye “_”. You can correct these directory names by hand.

Occasionally, iTunes will split a single CD across several directories. You can copy all the files into a single directory and delete the extra ones. Keep in mind that every time you’ve edited your Music folder by hand, you need to tell iTunes to import the folder again.

Another way to match your iTunes database with your Music directory is to use the the iTsfv Synchroclean command, where iTsfv is the free software mentioned above. iTsfv is useful in other ways for cleaning up your file names and directories. It also has a feature for removing empty directories.

Once you get your files and directories into perfect shape, it’s wise to mark them read-only to prevent some rogue ware from trashing the file structures and the painfully perfected metadata. You can do this by right clicking on the Music directory, or by letting iTsfv do it.

As another cautionary measure, if you have plenty of room on your hard drive, make a separate directory called Music Backup and simply copy the full contents of your clean and tidy Music directory into there.

(2) Music database

As I said, you don’t directly see the iTunes database, but you see the effects of it in the display. There are two kinds of issues here. One kind of issue has to do with the database being in some way out of date. The other kind has to do with the “metadata” or ID3 tag information inside the music tracks. I’ll talk about the music metadata in section (3).

If you’ve tweaked your Music directory and re-imported it, is that some songs may appear twice in the iTunes database, but one of the entries will be a “dead track” that is, a link to a no-longer-existing directory location. Or if you hand-deleted a folder of songs, then all those references will now be “dead tracks” in iTunes.

These entries will sometimes have an exclamation point icon next to them on the left in the iTunes display. But the exclamation point tends not to appear until you try and do something with the track, so they’re not always easy to find. And deleting them by hand is a drag.

I found an easy, platform-neutral fix for finding and removing dead tracks by Paul Mayne. Scroll down in his post to the September 2009, update, where he explains how to do it with two playlists, one smart and one static.

Even easier, if you are using iTsfv, it’s Synchroclean command will automatically delete dead tracks, as well as synchronizing your folder with your iTunes database.

(3) Music metadata

This is one of the biggest time-sinks involved in managing your music files. Each audio track has some fields of non-music data to hold such things as the album name, the album artist’s name, the track name, the track artist’s name, and possibly a jpg image of the album cover. These are often called ID3 tags.

Generally you will already have some tag information in your audio files—unless you’ve ripped your file from vinyl, but I won’t get into that yet today. With tracks ripped form CDs or downloaded, you’ll normally have tag information. But you may need to adjust it.

iTunes itself lets you edit the tags, although, in some ways the free Windows tool Mp3tag is better. Within iTunes, you can highlight one more more tracks and press Ctrl + I in Windows (or Apple + I on a Mac) to open the Item Information dialog. Or you can use the File | Get Info… menu selection to open this dialog, which will look slighty different depending on whether you are editing the tags of only one file or of several files at once.

Okay, so what do we use the metadata tags for?

Sometimes you have orphan tracks that are listed as belonging to Unknown Album by Unknown Artist. You need to edit the metadata tags for these poor tracks and fill in the info. Where do you get the info? Often you will in fact know this information, or be able to deduce it from listening to the track. Or you can ask iTunes to find the track info, but often as not, it snottily refuses to do this, saying that you didn’t import this file via iTunes (meaning, I think, that you didn’t buy it from Apple). Easiest of all, for a Windows user, is to open the files in Mp3tag, which, given the album or artist name, can look up the track info in one of several online databases like MusicBrainz and discogs.

Besides orphan tracks, another common problem is that a single album is split into two or more separate albums in iTunes. I found the answer in the Apple Support forums, a well-moderated non-spammy spot to look. The secret is to make sure that all the tracks in question have the identical information regarding Album Artist and Album. It’s not enough to set the Artist field, you have to set Album artist as well.

Normally giving all the tracks the same Album and Album Artist tags immediately merges the two blocks of album listings together. If it doesn’t merge this usually means that the Compilation field is set to Yes in some files and No in the others, and your need to uniformize this.

A related problem is that a compilation album like O Brother Where Art Thou may end up listed within iTunes as if it’s a whole lot of different albums. In this case you need to tell iTunes that the tracks do belong to a compilation album. There is a setting for this in the Information Dialog that call up when you highlight some tracks with the Get Info command. Make sure that every track in a compilation album has Compilation set to Yes, and that the Album Artist field is either blank (in which case iTunes will supply the “Various Artists” name) or is, if you like, set to the name of the album’s compiler, as in Richard Scorsese’s Blue’s Collection.

In setting the tags, note that you are free to alter the names of your artists and albums. Artists sometimes use different names, and it can be useful to adopt one default spelling. Or you might want to just list a group by the name of the leader.

Another issue is that album names are often too long to view on your iPod, names like Zappa’s You Can’t Do That On Stage Anymore Volume 5 Disk 1. I like these albums, so I gave them all names like On Stage 5-1 and On Stage 5-2. While I was at it, what the hell, I changed the album names from On Stage 5-1 and On Stage 5-2 into a single “album” (as far as iTunes can perceive) name On Stage 5.

I do all this by changing the tags, you understand, it doesn’t necessarily have any direct connection to the directory names inside my Music folder.

(4) Album Art

I haven’t yet mentioned the missing piece of information that concerns us perhaps the most often: the album art. To begin with, you can ask iTunes to search for the album art. And it will do this provided you have a free iTunes store account. Running the search several times often produces slight improvements. But, at least for me, there’s usually about ten percent of the albums that don’t get covers, or that get the wrong covers. [You can also search for album art with Windows Media Player. Unfortunately the two programs don’t store the art in the same places or in the same kinds of ways.]

You can preview the presence of track art in iTunes by pressing the fourth button from the left on the bar at the bottom of the screen. This is the “show or hide item artwork” button. If you turn it on, when you highlight one or more tracks, you see a picture of the cover in the lower left corner of the screen…or a gray note. You can drag or paste missing artwork right to this box.

The free Windows tool iTsfv is good at finding the files with missing artwork, and looking for new artwork online. If anything, the one flaw of iTsfv is that it tends to find rather high resolution images for you, and sometimes you don’t want to use up quite that much disk space.

Another way to find the tracks with missing artwork is to use a Smart Playlist defined by a condition like “Art is Missing.”

There is a very easy way to fix the artwork yourself. Just do a Google Image search with the album artist and name in the search box. You’ll find hundreds of images of the cover. Pick a decent-looking one, but don’t go overboard in terms of size, about 400 or 500 pixels across is usually going to be enough. Copy the image from the Google search page—I use a right click and a Copy Image to do this, but you can do this other ways. The image is then on your (invisible to you) clipboard, and you can paste it in. Or you can drag the image.

Where do you paste or drag the image? To that preview box showing the highlighted tracks’ artwork in iTunes

It’s sometimes the case that the album cover image (or information about where to find the image) is attached as metadata to only the first track on the album. This suffices to make the album cover image appears in the iTunes browser next to the album’s tracks. But it may be that the image isn’t attached to the other tracks in a direct way.

Actually, in iTunes the situation is much more complicated that I’m saying. iTunes likes to hide the album art in a cryptic maze directory in your music file called Album Art, you can read a little about this here, although this post is a little too forgiving of this user-unfriendly iTunes behavior. Windows Media Player just saves the art in readily visible form (but with a weird names) in the album directories.

I’m still a little shaky in my understanding of all this. I found an interesting post by a person called Decipher discussing how to make iTunes store your art in your music folders.

My impression thus far is that when I copy my tracks to an iPod or an iPhone, however, the iTunes “maze of images” is often ignored by the viewer, and every track has to fend for itself in terms of providing an image of the cover of the album it came from. So often only the first track of the album will show a nice picture on the iPod or iPhone, and the other tracks will just show a gray note.

If you care about this, you can mare sure the album art is attached as metadata to each track.

If one track on an album has an image but the others don’t, you might highlight the image and copy it to your clipboard. Then highlight all of the no-artwork tracks from that album, and paste in your image from the clipboard.

Is there any cost to putting the album cover into every file as metadata? Yes, the file gets bigger. A typical album cover image of good quality is going to run you about 200 kilobytes. And you can look in your Music directory and see that the a given mp3 music file gets 200 kb larger after you add the album cover image to its metadata. Doing the math, if you have a library of, say a thousand tunes, then putting album art into each file makes your library 200,000 kilobytes larger, which is 200 megabytes, or just under a quarter of a gigabyte. In a nutshell, it costs a quarter gig per thousand files to put art in every file. If you’re loading up with four thousand files, the covers cost you a gig.

This isn’t a problem on my iPhone, which has 32 gigs of storage. But it is a problem for my 8 Gig iPod Nano. It’s a sneaky problem too. To keep the size down, I have a playlist called “Rudy’s iPod Nano,” and I only copy that to my Nano. But then iTunes might tell me that the playlist is 6 gig in size. But when I go and try and synch this playlist to my 8 gig Nano, the synch won’t work, because there’s not enough room. That’s because iTunes only told me the size of the audio part of the tracks. You used to be able to get around this by telling iTunes not to put album art on a given device, but I don’t see that option anymore. So for now, given that I do want the art on my iPhone, I just live with slightly fewer tracks on my Nano.

Not that, in reality, I often look at either music-player’s screen.

Up Next

One final tip. When you get the files in your Music directory nicely organized, and with good metatags in place, savea back-up copy of the full Music directory to another folder or to another drive. It’s really easy to lose a great deal of your hard work with an ill-considered click on tools as powerful as iTunes and iTsfv.

Okay next week or the week after, I’ll post about “Ripping Vinyl to iTunes for Free”.

Enough of this for today! Hope some of this is useful to some of you.

6 Responses to “Managing Music in iTunes”

  1. Gunn Says:

    This is great. There’s enough info at the beginning that is congruent with what I already do using iTunes & Windows that I’m confident the info about what I don’t already do will be very useful. Thanks, Rudy!

  2. Peeter Says:

    Nice and informative article for Windows iTunes users. A couple of things, though:
    1. Aac is not a proprietary apple format, it is an international standard with in many cases more open licences than mp3. See for instance its wikipedia entry. Aac is also generally thought of as a better format, at least at low bitrates.
    2. Converting from aac to mp3 or between any lossy formats is generally a bad thing which is to be avoided if you are at all interested in audio quality. You’ll be better off keeping all files in the formats they were originally encoded.

  3. emilio Says:

    Makes me wonder how many great novels, movies, paintings, great conversations, will go uncreated because of fiddling with iTunes. iTunes is one of the things I really hated about the iPhone.

    There is open source called ffmpeg that will convert between audio formates. But I’m not certain if it converts AAC, which BTW as Peeter says, is not an Apple format. AAC probably adds nothing to the audio quality you can experience on your iPhone; likewise for concerns about conversions at high bit rates. Any free tool you pick up out there is likely to use ffmpeg as its base.

  4. Rudy Says:

    Thanks, Peeter, for the info on AAC. I edited the post to reflect this info.

    Emilio, I do worry a little about the “great novels uncreated” by my spending so much time on iTunes and the iPhone. But it’s also the case that a big part of a writer’s creative process is finding non-self-destructive ways to avoid writing for days or weeks at a time. And it’s also likely that I’ll end up converting some of these experiences into source material.

    Yesterday I got the first album I ever bought (around1960, fifty years ago), “Go Bo Diddley” by Bo Diddley, onto the iPhone.

  5. Alex Says:

    Great Post, I need to tidy up my music library, so very useful.

    I use the rating feature a lot,
    I then create smart playlists based on the ratings.
    eg. my “Prog Rock best”
    Golf Girl – Caravan
    Lucifer Sam – Pink Floyd
    Before The Storm – Steve Hillage
    Still Golden – Steve Hillage
    Ether Ships – Steve Hillage
    It’s All Too Much – Steve Hillage
    New Age Synthesis (Unzipping The Zype) – Steve Hillage
    The Fish (Schindleria Praematurus) – Yes
    Siberian Khatru – Yes
    5 Per Cent for Nothing – Yes

  6. Rudy Says:

    My friend Isaac W. emailed me a comment AAC vs. MP3:

    Rudy wrote, “Do note that the iPhone, iPad, and iPod play MP3 files just as well as they play audio files in the proprietary Apple AAC format. There is absolutely no downside to using MP3.”

    The downside is file size (admittedly not much of a problem these days). It’s generally recognized that AAC provides the same quality at a lower bitrate than MP3, though you’ll only notice it if you use a low enough bitrate to stress the algorithms (maybe 96 kb/sec or less). At, say, 128 kb and up, practically nobody will be able to distinguish between them. At 256 kb, practically nobody (even “experts”) can distinguish either from the AIFF (from a CD) that was the source.


Rudy's Blog is powered by WordPress