TuneTagger Using iTunes Notifications

Monday, 2006-10-30; 01:36:00


TuneTagger performance when replacing AppleScript track info-getting code with iTunes notification observing code

About a month ago, I wrote about how I was disappointed that iTunes doesn't generate distributed notifications for when the user artificially changes position in the current track, and not just for song changes and player state changes. Basically, this put me in a pickle because it meant that even if I put code into TuneTagger that would monitor for iTunes notifications, I would still have to poll iTunes via AppleScript for the track position in order to keep my automatic lyrics scrolling feature.

Well, I implemented the code to monitor the iTunes notifications, and it turns out, it's not really that big of a deal at all. Polling the track position via AppleScript isn't nearly as taxing as getting the track info from iTunes, so I can actually even do that once a second -- TuneTagger's CPU usage still doesn't go above 1%, and iTunes' CPU usage isn't appreciably changed (whereas before it spiked every time I got the track info).

I still have to get the iTunes library database IDs (I use this to transfer song info, so that info doesn't accidentally get transferred to the wrong song) and the iTunes artwork via AppleScript in addition to the player position. But the performance seems to be more than acceptable on my iMac G5.

I've also fixed a few bugs, notably the annoying problem with text fields becoming garbled because the text fields didn't clear themselves, as well as the silent crashing problem when dealing with songs that have non-ASCII characters. And of course things start updating immediately as soon as the iTunes song changes, thanks to the iTunes notification observing. :)

If you want to beta test TuneTagger, feel free to drop me a line. I'd like to hear some more feedback about the application. Here's a screenshot of the newest build:

TuneTagger Interface as of 2006-10-30

From top to bottom: the semi-automatic song info approval window, the song rating window, and the TuneTagger controller window. (Continual thanks to he-who-knows-who-he-is for the icons and for the images needed for dynamic creation of the windows.)

By the way, if you're interested in looking at the interface progression of TuneTagger, you might try searching for "CDDB Lookup Helper" instead.

Finally, if anyone is interested in working with me on some of my apps, I'm always interested in having a partner or two -- so drop me a line if you're intrigued. I continually have ideas for many of my apps, but I never have the time to look into (much less implement) all of them.


Technological Supernova   Software Development   Older   Newer   Post a Comment