Update : Fixed the code to match the new AllMusic URL scheme. (2013-07-01)
I spend quite a bit of time listening to music and, being the nerd that I am, I like to know as much as I can about the music I’m enjoying. I find myself looking up bands so often that I decided I needed a shortcut.
```
tell application "iTunes"
if player state is not stopped then
set currentArtist to artist of current track
end if
end tell
tell application "Safari"
open location "http://www.allmusic.com/search/all/ " & currentArtist
end tell
</noscript>The AppleScript itself is quite straightforward. We’re simply asking for the artist name from the currently playing track. Then we feed that into a search on all-know [AllMusic](http://allmusic.com/ "AllMusic.com"). There we’ll be able to read a bio, see the band’s complete discography, find out whether they are categorized as “psychedelic pop” or just plain old “psychedelic”, all that good stuff.
Finally, Daniel Jalkut’s [FastScripts](http://www.red-sweater.com/fastscripts/ "FastScripts") software makes it a breeze to run our script right from iTunes. We’ll name our script something descriptive and good for a menu item like “View Artist on AllMusic.scpt” and place it into ~/Library/Scripts/Applications/iTunes/ (creating any directories that aren’t already there). With iTunes open and in front, our script will appear right in the FastScripts menu. We can also use the FastScripts Preferences pane to define a keyboard shortcut: I chose ⌘⇧A.
Try it out. Being unproductive has never been so efficient.
Sound / video / computer artist and software developer.
Boston, MA