Archive: September 2005
If an AppleScript can save me from making even just a single click, you know I'm on it. While I'm not the most frequent user of the Lyrics tag, having to select a song, Command-I, and click the Lyrics Tab is too many clicks for me. Lyrics to TextEdit will display the lyrics of the current or selected track(s) in a new TextEdit document and bring TextEdit to the front. Give the thing a shortcut key (Command-Option-L works well at my house) and, voila: one-click lyrics access.
I've added the script "Pretend We Played This Today" to the Missing Menu Commands page. Select some tracks and run this script; it will increase each selected track's play count and set its last played date to "now". See, I have a Smart Playlist that live updates to tracks not played in the last 8 weeks. If I see some songs I don't want in the playlist, I run this script on 'em and they vacate.
Here's one I've been sitting on for a long time. There's no way for Smart Playlist criteria to detect if a track has artwork. So I wrote a script (for my own self) that set the BPM tag to "1" if selected tracks had artwork. Then I created a Smart Playlist that uses "BPM is 1" to pull in tracks with artwork. Duh. Today I get iChatted by a user who wanted to do something similar, so I had to own up to the script and thought I might as well post it. Artwork=1 BPM. Now, if you Really Use the BPM tag for Beats Per Minute then you don't want this script. But, if you're like me and see the BPM tag as superfluous, this is a great way to use it for Something Advantageous. It may also give you ideas for other BPM settings...sort of like a secondary Genre tag or something. Whatever. It's Friday.
Import iPod Audio Files has been updated to version 1.9. This script will allow you to select tracks on the iPod and import their files to your Music folder and iTunes library. This latest version streamlines the routine to locate your designated Music folder.
Some users have recently reported that this script will cease functioning after only one file is imported. I'd like to hear more about that if you experience the same problem.
Key codes are the numeric codes representing the keys on your keyboard. You can use these numbers to emulate key presses via AppleScript with "System Events", provided you also have the "Enable access for assistive devices" option checked in the "Universal Access" System Preference. Using these key codes, you can have AppleScript perform some shortcut actions, which, on occasion, may be more advantageous than scripting the actual action. Indeed, as far as iTunes is concerned, some of these shortcut actions aren't possible with AppleScript without using key codes. For instance, opening a Get Info Window or the View Options window. Here's an article describing how to get the most from key codes, AppleScript, and iTunes.
Because I got bored today, I decided to attach a image to those scripts which have had 5000 or more downloads. This is an arbitrary number, since the total downloads of a script may not actually reflect its popularity, just how many times its various incarnations have been downloaded. But, like I said, I was bored.
Just posted AppleScripts As Automator Plug-Ins, an article that briefly describes how to use Automator's "Run AppleScript" Action to create Plug-Ins which can be accessed from a Control-click in the Finder or via the Scripts Menu.
iTunes 5 has a simple way of making tracks "bookmarkable" with the "Remember playback position" option, and I had created Selected Tracks Bookmarkable to change this setting for selected files. Previous to iTunes 5, the "Make Bookmarkable" script served this purpose by changing a file's file type. Make UN-Bookmarkable has been updated to "un-do" either of these settings on the selected tracks.
Correspondent Herwin Lans has submitted No Lyrics to Playlist which will copy tracks in the main library that don't have lyrics to a new playlist called "No Lyrics". The download also contains another script which will clear the "No Lyrics" playlist of tracks which you have added lyrics to.
I know Apple says they've made shuffle "more random" in iTunes 5.0.1 -- or less random, depending on how you view it -- but I still get separations between Artists as short as four or five songs even with the "Less Likely" slider maxxed to the right. An Option-click on the shuffle button once or five times tidies it up somewhat. I don't really care, actually. I know what "random" means, and if The Faces show up every few songs in a Smart Playlist set to live update songs not played in the last 8 weeks, well, I guess that's how it goes. Fact is, expecting Apple to accommodate our musical tastes is pretty much wishful thinking. Why be picky? iTunes can't network to the "Musical Taste" section of your brain; you can't expect a piece of software to know what you want to listen to; iTunes provides several ways of sculpting a playlist to your taste, but You Gotta Work On It. It Ain't Automatic and can't be.
Remember those old record changers? You'd drop five or six vinyl discs onto the changer (a disc from Elton John's "Goodbye Yellow Brick Road" always had to be included for some reason) and after a side played, the next disc dropped down. And I thought THAT was amazing. Ruined a lot of stylii due to the angle of the tonearm, but, MAN. Party music for hours.
We've come so far and people still aren't satisfied.
I've just updated the Missing Menu Commands page with a revised "Current Track to (Select Playlist)" and a new "Selected Tracks to (Select Playlist)". The latter evolved out of my frustration of selecting tracks in the main browser to copy to a playlist, and then having to scroll, page up and down, home, end and all that stuff in the Source column to get the target playlist in view, only to very often lose my selections. Don't forget to add Shortcut keys!
Despite iTunes 5.0.1 not fixing the multi-session bug, I have updated Join Together to version 2.1. This script will enable you to join the files of selected iTunes tracks together with Quick Time Pro and export them as a single AAC file/track. Optionally, with Apple's ChapterTool application installed, it will create a "chapterized" audio file of the exported AAC file.
This latest version supplies some timeout and error protection, restores the ability to concatenate MP3s of the same bit rate (though this type of file cannot be "chapterized), ensures files open in separate QuickTime Pro windows, prohibits the naming of the joined track using one of the selected tracks' names, and other code enhancements.
Create Archive of Selected will copy the files of the selected tracks to a new folder in a location you specify and create a .zip archive of the folder.
iTunes 5 introduced a new "Category" track tag. Unfortunately, the tag does not appear in a track's Get Info window, even though it is editable. Enter Category Text for Selected will allow you to enter some text and have it appear in the Category tag for each of the selected tracks.
Correspondent "weiriuc" came up with Delete Lyrics after some lyric-gathering software he was using grabbed the wrong lyrics. The script will clear the Lyrics tag of the selected tracks.
Apple has released iTunes 5.0.1. As of now (Tuesday afternoon) , it's only available from Software Update, but I imagine it will be available from Apple's iTunes download page shortly.
No fix for the infamous multi-edit session bug (audio files joined by QuickTime Pro using "Pass-Through" settings are incorrectly recognized by iTunes).
Hot on the heels of iTunes 5.0.1, Enter Description Text for Selected will allow you to enter text to the selected tracks' Description tag. There apparently was a bug in iTunes 5 that prohibited this.
And why not? Although the "Long Description" tag is not visible in iTunes, it is used by podcasters. So along with the other two scripts I posted today for Category and Description, here's Enter Long Description Text for Selected.
Last week I made a collection of scripts available exclusively to visitors of Playlistmag.com. Just so ya know, these Playlist-exclusive scripts have been updated. So head over there and grab 'em while their hot! And while you're there, check out what else Playlist has to offer, why don't you?
C|NET is reporting that Apple plans an update to iTunes 5 next week.
There's probably a billion apps like this around, but after the rigors of working on "Join Together", it was just fun to make. Art to iChat will use the artwork of the currently playing iTunes track as your iChat's Buddy icon while your status is "Available". Your original Buddy icon will be restored on quit, or when your status changes to "Away", or when the current track doesn't contain artwork. I use it it conjunction with iChat 2.0's "Current iTunes Track" status message.
I have updated Join Together to version 2.0. This script applet will enable you to join the files of selected iTunes tracks together with Quick Time Pro and export them as a single AAC file/track. Optionally, with Apple's "ChapterTool" application installed, you can then create a "chapterized" audio file of the exported AAC file.
This latest version accepts any combination of MP3 or AAC tracks for joining and export as AAC with QTPro; exports from QTPro using AAC-LC settings, rather than the "Pass Through" settings used in previous versions; makes final track bookmarkable (requires iTunes 5 or better); converts European time formats for ChapterTool compatability, i.e: 12:34,5678 to 12:34.5678; adds option to supply Composer tag; other minor improvements.
As you may have read in my previous posts, iTunes 5 has trouble with files created with earlier versions of Join Together, whereby only the first of the joined files is recognized. I have been told to assume that this is a bug in iTunes 5, although this hasn't been completely confirmed. As a result, the script no longer uses the "Pass Through" Audio setting in QuickTime Pro, but enables you to select a specific bit rate. This increases the time it takes QTPro to export the final file, but it's a sure-thing that the final file will play correctly in iTunes 5.
Thanks to the many Correspondents who provided excellent feedback and encouragement!
Well, I knew it wouldn't take long before someone came up with something like this. Chris Shull sent me Get Lyrical, a script that will use the track name and artist of the current or selected track as the basis for a lyric search of searchlyrics.org and store the result in the lyrics tag. iTunes 5 is required. Chris is going to continue improving it so look for updates soon.
"The iPod nano is a sham. They haven't made the iPod smaller; they've made Steve Jobs much, much larger." Details.
Correspondent Gary Wagman wants to know (as did I) where the heck the "On CD Insert" option went in iTunes 5 Preferences. It is now located under the "Importing" tab in the Advanced Preferences.
Long-time Correspondent Paul Withey sent this along, calling it "Sing Along WIth Mac":
tell application "iTunes" if player state is playing then tell current track set TheLyrics to lyrics if TheLyrics is "" then return end tell end if end tell say TheLyrics
iTunes 5 only, of course. And you need to have lyrics in there.
Since upgrading to iTunes 5, any files I created with my script "Join Together and Chapterize" play incorrectly. The effect is that only the first chapter is recognized. After investigating a little bit I have determined this:
- The selected files are joined correctly by QuickTime Pro. However, when the final joined file is exported with the "m4a" extension, iTunes 5 clearly does not recognize any portion of the file except the first file, whether the file has been "chapterized" or not.
- If the joined file is exported from QuickTime with a "mp4" extension, iTunes 5 recognizes it as a QuickTime Movie file and can access/play the entire file. However, if this "mp4" file is "chapterized", its format is set to AAC, and again, iTunes 5 does not recognize more than the first of the joined files.
I have tried various combinations of extensions but it always comes down to iTunes 5 not recognizing any more than the first of the joined files. My assumption is that iTunes 5 now is much more "fussy" about AAC files. I'll continue to investiagte the situation. Note that creating a "chapterized" file from a single AAC file still works; it's just that files joined and exported as MPEG4 from QuickTime Pro fail.
Hmmm. Some success with using new QuickTime Pro export settings. Rather than use "Pass Through", using actual AAC-LC settings seems to work. However, the export process takes an incredibly long time. More as it develops.
Apple has released an update to QuickTime.
I was hopeful that the update to QTPro (7.0.2) would update some components that made "Join Together" files work in iTunes 5. But no dice. However, I have managed to get an updated version of "Join Together" to go and work correctly. Unfortunately, exporting AAC files from QTP takes a while. I had to create export file settings files for each bit rate, which are selectable from the script. Works fine. Even makes the final file bookmarkable in iTunes 5. I'll run some more tests and try to have an update available soon.
iTunes 5.0 was released on September 7, 2005 at an Apple Special Event in San Francisco's Moscone Center, along with the Motorola ROKR iPod/cell phone and iPod nano. New features in iTunes 5 include improved search capabilities, "Smart Shuffle" to provide more control over shuffle by artist and album, and parental controls to restrict downloading of iTMS music with explicit lyrics. iTunes 5 sports a new "shinier" metallic look.
I'll be providing info on AppleScript ehancements and changes on this page.
Correspondent Sam Elowitch inspired this script to write lyrics from the current track in iTunes 5 to a file on the Desktop which will open in Text Edit:
set target_folder to (path to desktop from user domain) as string set lyric_file to "" tell application "iTunes" if player state is playing then tell current track set TheLyrics to lyrics if TheLyrics is "" then return set nom to name set art to artist end tell end if end tell set TheLyrics to (""" & nom & """ & return & art & return & return & TheLyrics) as string set lyric_file to (target_folder & "Current Lyrics") as string try set fileRef to open for access file lyric_file with write permission write TheLyrics to the fileRef starting at 0 as Unicode text close access the fileRef on error close access the fileRef end try tell application "TextEdit" open lyric_file activate end tell
Mod it if you like. Thanks, Sam.
iTunes 5 will let you set any to track to be bookmarkable, not just AACs. Selected Tracks Bookmarkable will let you select some files and make them bookmarkable. Requires iTunes 5.
My script Join Together has a problem with iTunes 5--at least, I hadn't experienced it with iTunes 4.9. After joining selected AAC tracks with QuickTime Pro the finalized file will load into iTunes. However, only the first song seems to be recognized in the joined file. If you have opted to "chapterize" the joined file the effect is such that when you select a "chapter", the next track in the playlist plays. Other joined tracks are not recognized. In fact, any file created with Join Together behaves the same way, whether I created it with iTunes 4.9 or iTunes 5. I am investigating.
Yet another...You know, those of us who have been trying to write scripts that dump a batch of artwork to the ol' hard drive have run into a "out of memory error" so many times. I finally beat that error and have come up with Save Album Art to Album Folder. This script applet will dump the artwork of the selected tracks--or tracks in the selected playlist--to each track's file's folder, or en masse to a folder you select. Each graphics file will be re-scaled (the default is 300 x 300) and the image will be used as the file's icon. Have a look at the Read Me for more info on making your own mods.
Do you suppose my copy of Script Editor is trying to tell me something?
If you have any ideas on how to fix this, let me know. Short of a re-install, I think I've tried everything.
Correspondent C. Posey writes in my response to my double-Help Menu dilemma: "I had this same exact problem of 2 Help menus in several of my apps after updating to Tiger. Finally found the solution. It involved an older, incompatible version of DivX plugin I had installed.
Remove "/Library/QuickTime/DivX 5.component" or it may be located in ~/Library/Quicktime and then restart your apps and I think that will solve your problem. Then if you want to re-enable DivX - try the DivX Fusion plugin - has been working perfect for me in Tiger. Is currently beta and free."
Worked like a charm!