Friday, May 13, 2005

iTunes Hacking


So I am still coming to terms with how iTunes works, and trying to get the "philosophy" behind its organization system. My understanding is this: iTunes can scour the hard drive, if you allow it, and maintain a nice library of tracks, no matter where on your physical disk they are located. You can then sift through by artist, etc...

In my case I have ~30 GB of music and much of it isn't in mp3 files with ID3 tags - I've got a pot pourri of mixes and a ton of podcasts I've been listening to while I work. It's too much of a pain to manually create a playlist for all the folders or try to find unlabeled music in the library. Maybe it's because of winamp but I'm used to organizing my music physically, and then grabbing tracks out of a directory that I want to play, rather than by "artist" or "genre." For example, I've got the following:

--------... and so on
-------- /Massive Attack
-------- ... and so on
-------- /Jan2005
-------- /Mar2005
--------... and so on

This scheme works well, but it doesn't seem to mesh with iTunes. So I wrote a little program using the iTunes COM SDK that takes a directory as a parameter and automatically creates a playlist for each folder that contains mp3 or other music files. In my case it worked perfectly (took seconds!) in creating playlists for all my folders and the files they contained. I put in a "Sync" button too, so it can synchronize with changes you make to file structure.

I've uploaded a *.zip along with source (it's written in VB6). I tested it with iTunes 4.7 and it works fine. I'm not sure whether this was unnecessary; perhaps iTunes has an option for doing just this, I don't know. But more deeply, I think, is an attitude, an approach of giving the user an interaction with a piece of software. In the PC world, one spends a lot more time "organizing" things than does on one on a Mac. I've heard and read often that systems should be able to manage themselves but find myself balking at the notion that the system can do as good of a job as I can. I download faster than I listen, so things must be organized, but the content of the audio is the archival attribute, not the date, artist, or genre. How this can be known outside of the user, I'm not sure.

If you do make a modification, or an improvement (many probably could be made), let me know. I'm also unaware of any plug-in architecture for iTunes, otherwise I'd try to just make it a couple of buttons or menu items in the program itself.


1 comment:

Phil said...

I have the exact same problem. I always order my music by directories and such instead of proprietary metadata. Instead of creating playlists (which will limit the solution to iTunes) my idea is to fix the id3 tags so that they include track-numbering. (That way it will work with Muine, Rhythmbox, etc.) Unfortunately WinAmp and XMMS are the only players I know that can sort by filename.

I'm working on a Ruby solution. Check in a few weeks.

As for which way of organization is superior, I think there is something to be said for the iTunes way. Organizing a 30GB collection of music is a rather mundane task; you shouldn't HAVE to do it manually.

Unfortunately, the iTunes way really only works if you've been using iTunes from the start and if you don't use your music library on other players. So it's nice in theory, but I think I'll still spend an unfortunate amount of time managing stuff myself.