Preferences for iTunesRater

I’m working on saved preferences for iTunesRater, after a timely hint on macosxhints.com about Applescript Studio and preferences. The program will load them fine, but just doesn’t seem to save them. Too tired now to care.

iTunesRater & Artwork Finder

Thanks to Sam Deane, and his Now Playing script, I have added the following functionality to iTunesRater. When a song with no Artwork starts playing, Amazon.com is contacted, and if the Artwork is available, then a drawer with possible artworks is opened. Eventually, when you click the Artwork you want, it will be copied to the track, (and all others from the same album). Now if only I can make it so it does this bit in the background - perhaps another script that gets called?

iTunesRater 0.5

I’ve redesigned the User Interface for iTunesRater, making it more of a controller, and upped the version number to 0.5 I’ve also included the functionality of AutoRater - but the maxRate and minRate values are (at the moment) hard-coded to -5 and +10. I need to learn how to load and save preferences before I change this. AutoRate is also turned off by default. Anyway, it is at iTunes Rater 0.5, and the source is iTunes Rater 0.5 Source. As of now, iTunes AutoRater is deprecated, since the functionality is all implemented in iTunesRater0.5 Next feature might be an image lookup, and apply (to single song and to all in same album).

iTunesRater 0.3

Okay, notification is a breeze. iTunesRater now has two new features:

  1. Doesn’t poll, waits for notification from iTunes (requires 4.7.1)
  2. Volume Adjustment

Instead of polling iTunes every 5 seconds, the information is only checked when iTunes sends a general notification to the NotificationCenter. This should mean less CPU use, not that I was using much anyway. To get this to work well, I had to notify the AppleScript that a change had been made, by ‘pressing’ one of the interface items. Slightly unorthodox, but effective. Also, a few of my CDs are softer than the rest, I now have a volume adjustment slider on the left hand side that can be used to modify the volume of the current track - don’t use this as your master iTunes volume, it writes the data into your library, so that track will become louder or softer each time you play it. I might actually make this into a fully-fledged iTunes Controller, with AutoRating features. Later. Time to sleep.

iTunesRater 0.2

I’ve done a bit of work to iTunesRater, and upped the revision number to 0.2 It’s a bit more robust, but there still seems to be an intermittent bug to do with loading the artwork from the temporary file. I’m not sure if I’ve solved it or not, since it only appeared once, but I’ve put a try…end try across where I think it was, so it should just silently fail. I’ve also added a check-box to the bottom right corner which reflects and controls the ’enabled’ flag within iTunes. So, if you find a song you really don’t like, then just un-check this box, and it won’t play again, depending on your iTunes settings. Oh, yeah, you can find it iTunes Rater 0.2.

Ratings on the Fly

So far, the program I’ve written does this: Monitor the current track, and how much of it has been played. Wait for a click on the Next (»|) button, and when it occurs, rate the song up or down according to the modifier: abs((amount played / song length) * 15) - 5 Thus, when a song is skipped immediately, it loses 5 rating points, songs that are clicked at the end receive a +10 modifier. The only problem is that this is only triggered when this program wants the next track. I need a robust method of…I’ve just thought of something. I’m getting close to getting this to work - when the song is changed, the track id is used to find the song in the library, and the last known rating modifier will be applied to the song’s rating. It just doesn’t do that yet!

AutoRater

Done! iTunes AutoRater runs in the background, monitoring the currently playing song in iTunes. When the song changes, it up- or down-rates it according to how long the song played for. What I will(may?) do is merge this code with that for iTunesRater, so that you can rate songs, and it will also Auto-Rate them. Maybe I won’t do this, since these two are separate tasks. I wonder if the current ratings are a little aggressive: -5/+10 seems like a big change. I’ll take feedback, and in a future version (perhaps I’ll make this a preferences panel, where you can choose the maximum rating changes. Anyway, version 0.1 is available. Caveat User! (Back up your iTunes Library regularly!)

iTunesRater 0.1

As much as I like to bitch and moan about AppleScript, AppleScriptStudio isn’t too bad for creating simple applications. In a couple of hours, I just wrote a simple stand-alone application that monitors the current song playing in iTunes, and allows rating to occur, independent of the iTunes window. It also allows for a larger range of values as the rating, rather than the iTunes 0-5 stars. The tick marks are on the slider so you can see what the current rating will be in terms of the iTunes display. Features:

  • Automatically updates display from iTunes when song changes
  • Automatically updates iTunes rating whenever it’s changed
  • Allows for more flexible rating than basic iTunes, and most other programs capable of changing ratings.
  • Unobtrusive, can sit in the corner of the screen while working.

Limitations:

  • Ugly icon

I take no responsibility if this toasts your iTunes library - I use it with mine, but your mileage may vary. Here’s a little screenshot, and the archive is iTunes Rater. (Only Version 0.2 is still available!) Itunesrater The AppleScript code is IMHO interesting: