Subscribe to
Posts
Comments
NSLog(); Header Image

Free Music

This is the first free iTunes song I think I actually like:

Erik is listening to "Breathe (2AM)" by Anna Nalick from the album "Breathe (2AM) - Single" (2004). Erik has rated this song 4.0 stars and has never played this song to completion before.

Here's a link (affiliate-free) to it. It's free this week, so, you have a few more days. It's not super-duper great, but it's something I'll want to hear again.

The little "Erik is listening to" thing is part of an AppleScript I wrote about two years ago (I think) for iTunes. I use it for away messages in Adium and several other things. The script sources is in the extended entry.

This should work (except that some of the text will be too long for the lines they're on). Obviously you'll want to change "Erik" where you see it. I've placed this particular script in ~/Library/Scripts/Applications/iTunes and access it via the Script Menu.

tell application "iTunes"
    set currTrack to current track
    set ctString to "Erik is listening to "
    
    -- Name
    if name of currTrack is not "" then
        set ctString to ctString & "\"" & name of currTrack & "\" "
    else
        set ctString to ctString & "a song "
    end if
    
    -- Artist
    if artist of currTrack is not "" then
        set ctString to ctString & "by " & artist of currTrack & " "
    else
        set ctString to ctString & "by an unknown artist "
    end if
    
    -- Album
    if album of currTrack is not "" then
        set ctString to ctString & "from the album \"" & album of currTrack & "\" "
    end if
    
    -- Year
    if year of currTrack is not "" then
        set ctString to ctString & "(" & year of currTrack & "). "
    else
        set ctString to ctString & ". "
    end if
    
    -- Rating
    if rating of currTrack is not 0 then
        set ctString to (ctString & "Erik has rated this song " & (rating of currTrack) / 20) & " stars"
    else
        set ctString to ctString & "Erik has not rated this song"
    end if
    
    -- Play date
    if played date of currTrack is not missing value then
        set ctString to ctString & " and last played this song " & played date of currTrack & "."
    else
        set ctString to ctString & " and has never played this song to completion before."
    end if
    
    
    get ctString
    set the clipboard to ctString
end tell

5 Responses to "Free Music"

  1. Erik, I combined your script with another I found here (http://www.funmac.com/showthread.php?t=9939) to actually set the Adium away message instead of just adding it to the clipboard 🙂

    I've never used applescript before so there certainly could be a more elegant way to do this...but I thought it would be a good step to start learning for me! Thanks!

    If you want the script I'll post it, but really only one line from the linked script was changed so instead of prompting for an away message it just set it to the clipboard value.

  2. Actually, I was thinking the same thing about the free song this week. It's actually half decent. Metric's "Combat Baby" was half decent as well a few months back. It's way cooler when I hear it on the coolest radio station in town, CD101.

  3. It's very annoying that I can't get the free tune because I'm in the UK! Or maybe there is a way and I just don't know how to do it! Any help would be appreciated!

  4. My favorite of the freebies was Jem's "They". On the other hand, the Nelly Furtado song was quite possibly the worst waste of encoded AAC to ever spend 5 minutes on my hard drive.

  5. Hey! I didn't know there even was a thing as a free song of the week! Looks like I'll be visiting the iTunes store each week.