Speaking to your iTunes Library

If you’re like me, you want a freakish control of the ID3 tags of your iTunes library. I’ve been long maintaining the basic tags like name-album-artist-genre with draconian order for many years now, but looking at the Music app navigator in iPod, I was thinking for a while to give better order to rest of the tags, especially the composer names.

This might be odd for American users, but the songs in Tamil come 99%  from Tamil movies (not albums with videos), and are kinda ‘owned and identified’ with the composer as the “primary artist”. Not sure if everyone is still accepting this dated mindset, but for example – the magnanimous Ilayaraja‘s songs are simply “his” songs – at least in my mind. For want of better data about whoever sung these songs, I was always setting ‘artist’ tag to the composer’s name for my entire Tamil collection, leaving the ‘composer’ field untouched (and therefore extremely in disorder).

Today I decided to have a little conversation with iTunes, and this little Applescript dialogue got the job done:

tell application "iTunes"
set myTracks to (tracks of playlist "Pop")
repeat with x in myTracks
set artistName to artist of x
set the composer of x to artistName
end repeat
end tell

Feel free to explore Doug’s Applescript examples and play around, you can probably enjoy talking to iTunes as much as your evening bar chats.


About forrestrunning
Code Chaser

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: