Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Easily add lyrics to iTunes songs via AppleScript Apps
Often programs like PearLyrics or SingThatiTune just don't find the song I am looking for, and I have to find the lyrics manually. I found it tedious to find the lyrics in Safari, switch back to iTunes, highlight the song I want to add the lyrics to, open the song's info panel, paste in the lyrics, and finally, close the window. So I wrote this simple AppleScript instead:
tell application "System Events"
    set sel to (the clipboard as text)
end tell

tell application "iTunes"
    set lyrics of current track to sel
end tell
I then bound this AppleScript to a keyboard shortcut using iKeys (any macro-capable program should work just as well). It will copy any text currently in the clipboard to the currently playing song's lyrics.
    •    
  • Currently 2.00 / 5
  You rated: 1 / 5 (6 votes cast)
 
[22,764 views]  

Easily add lyrics to iTunes songs via AppleScript | 10 comments | Create New Account
Click here to return to the 'Easily add lyrics to iTunes songs via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily add lyrics to iTunes songs via AppleScript
Authored by: joshforman on Jul 16, '08 08:57:30AM
You can also use this (though it sees a bit old).

---
Josh Forman

http://www.joshforman.com/

[ Reply to This | # ]

Easily add lyrics to iTunes songs via AppleScript
Authored by: osxpounder on Jul 16, '08 09:25:02AM

It sees a bit old?

I'm sorry, I don't know what you mean. Maybe you meant, "It looks a bit old."

Anyway, thanks for that link!



[ Reply to This | # ]
Easily add lyrics to iTunes songs via AppleScript
Authored by: bpartridge on Jul 16, '08 09:16:23AM

Butler would be great for this.



[ Reply to This | # ]
Lyrics in iPod
Authored by: gibbonsb on Jul 16, '08 10:05:57AM

I recently discovered that if you have lyrics loaded for a song you can view them on your iPod when the song is playing by clicking on the center button - which cycles the display mode from jog mode to ratings, then to the lyrics.



[ Reply to This | # ]
Easily add lyrics to iTunes songs via AppleScript
Authored by: kioarthurdane on Jul 16, '08 11:36:19AM
My preferred method is to make sure the Harmonic widget from http://mindquirk.com/ is running, then use an AppleScript to step through all the songs.
Basic algorithm for the script goes (not tested for syntax, etc):

set timestep to 5 --adjust as needed depending on your internet speed.

play first track of playlist "Music"
pause

repeat from 1 to count of tracks of playlist "Music"
     next track
     delay timestep
end repeat


[ Reply to This | # ]
Easily add lyrics to iTunes songs via AppleScript
Authored by: blackxacto on Jul 16, '08 05:08:06PM

I tried to compile this into a script, but it doesn't like the word "first".
I am no expert coding, but have compiled before.
What is the problem here, me or the code you provided?

jr

---
You'll never know which way to look, which way to see us.



[ Reply to This | # ]
Easily add lyrics to iTunes songs via AppleScript
Authored by: smkolins on Jul 16, '08 12:25:50PM
I prefer Get Lyrical except that since it depends on a website contribution for lyrics and sometimes the wrong song is referenced or the lyrics posted are wrong...

---
Possess a pure, kindly, and radiant heart!

[ Reply to This | # ]

Easily add lyrics to iTunes songs via AppleScript
Authored by: sojourner on Jul 16, '08 12:34:20PM

Thanks for this script! I really needed this!



[ Reply to This | # ]
Easily add lyrics to iTunes songs via AppleScript
Authored by: garythemacguy on Jul 16, '08 01:02:54PM

I found it tedious to find the lyrics in Safari, switch back to iTunes, highlight the song I want to add the lyrics to, open the song's info panel, paste in the lyrics, and finally, close the window.

I prefer to use existing shortcuts where possible - and in this case it is possible...

0) [cmd]-tab brings iTunes to the foreground
1) [cmd]-L selects the currently playing track
2) [cmd]-I displays the Info window
3) [cmd]-6 brings the Lyrics pane to the front, if required
4) [cmd]-V I think anyone visiting this site will know what this step does! :-)
5) [Enter] requires the Enter key on the numeric keypad. The Enter key on the main part of the keyboard adds a carriage return to the text in pane 6

There - while that maybe looks complex, it requires little more than a flick of the wrists! :-)

This sequence depends on similar assumptions made in the original tip. Namely that the track in question is still playing and the text of the lyrics has already been copied to the clipboard.



[ Reply to This | # ]
Easily add lyrics to iTunes songs via AppleScript
Authored by: musselrock on Jul 19, '08 11:26:13AM
I like the concept very much. It is a good idea. To make this hint work better for me, I created two scripts - one to search for lyrics and one to add lyrics from a web page.

Search script (run from within iTunes):

tell application "iTunes"
set theName to name of current track
set arts to artist of current track
set searchTerm to arts & " " & theName & " lyrics"
end tell
set thewords to words of searchTerm
set oldtids to AppleScript's text item delimiters
set AppleScript's text item delimiters to "+"
set googstring to thewords as text
set AppleScript's text item delimiters to oldtids
set serURL to "http://www.google.com/search?client=safari&rls=en-us&q="; & googstring & "&ie=UTF-8&oe=UTF-8"
tell application "Safari"
open location serURL
activate
end tell

Get lyrics into iTunes (run from within Safari):

tell application "Safari"
set selecTxt to (do JavaScript "(getSelection())" in document 1)
end tell

tell application "iTunes"
set lyrics of current track to selecTxt
end tell


[ Reply to This | # ]