September 25 2017 - 9:05 am

Camelot Codes to Keys

For a brief time, back when I was radio DJ, a station I worked at experimented with using “key segues”, whereby a recorded sounder would transition from a song played in one key to a song in another. Thus: Song in C fades -> sounder transitions from C to A minor -> seg next Song in A minor.

It was horrendous.

Anyway. Since I was an Actual Musician (few and far between in radio), it was my job to assign the correct key for each song we played. Which essentially meant that I sat in a studio a couple of times a week with a CD player and a Casio keyboard and diddled around until I determined the key of each song we added that week.

Nowadays, a lot of DJs use the musical key of the tracks they play to create “harmonic mixes”; tracks are mixed or segued according to harmonic rules. Some DJs probably aren’t musically inclined either, so there is software and databases and such that can supply the key for their tracks. Then all they have to do is check the Camelot chart to see what might sound good.

(This, of course, is not perfect, since pitches can vary. Which is what made my old station’s experiments with key segues so cringey. We had CD players that could adjust for pitch, but nobody wanted to spend that much time on creating perfectly harmonic segues. But, whatever.)

I heard from a Correspondent who uses this system. He has the Camelot codes in his iTunes tracks’ Comments tags. These are codes that represent 24 musical keys and look like this: 1A, 2A, 3A…10B, 11B, 12B:

Courtesy of

He wants to convert the Camelot codes to the actual key. So here is a script that will do that: (more…)

September 19 2017 - 11:18 am

NEW: Apps By Apple ID

Now that iTunes 12.7 no longer manages iOS apps, you’re left with a “Mobile Applications” folder containing the apps iTunes has been backing up for all these years. For most users this folder can be Trashed after updating to iTunes 12.7. But if your Mobile Appplications folder contains apps purchased with multiple Apple IDs, you may want to re-install the appropriate apps on the appropriate devices.

But which apps belong to which user?

Apps By Apple ID will list the apps in the “Mobile Applications” folder by app name, file name, purchaser’s Apple ID, size, version and last date modified.

Additionally, a tab-delimited text file of this information can be exported or the apps copied and sorted into “Purchased by…” folders (iTunes 12.7 and later only, see the Read Me for other important information).

Apps By Apple ID is free to use—you’ll probably only use it once—and more information and link to the download is on this page.

September 16 2017 - 11:26 am

Considerations When Updating to High Sierra

If you perform a clean install of the operating system, an “iTunes” folder will not be created in the user “Library” folder nor the local “Library” folder (the one at the top level of the startup disk). This has been the case since at least macOS 10.12.2.

Do not confuse this “iTunes” folder with the one created in “Music”, which stores iTunes support files. The “iTunes” folder in the “Library” folder originally contained an “iTunes Plug-Ins” folder as well as the “Scripts” folder. Apple no longer allows third-party visualizer plug-ins (I believe; although the built-in visualizers still work), so the plug-ins folder is apparently unnecessary. But the “Scripts” folder is still checked by iTunes for AppleScript files to display in its Script menu.

Thus, you may have to create these folders yourself. (But only after a clean install. If these folders already exist and you simply update your OS or transfer from a backup post-install then the folders will remain or be restored.) Below are listed the pertinent file paths, with the folders you may need to create emphasized:

For all users of the machine: [startup disk]/Library/iTunes/Scripts/

For a single user: [startup disk]/Users/[user name]/Library/iTunes/Scripts/

(The user Library folder is hidden by default, but most nerds I know immediately make it visible: Select your home folder and open it in a Finder window. Click View > Show View Options in the Finder Menu or press Command-J. At the bottom of the View Options panel, check-mark the “Show Library Folder” checkbox.)

Additionally, you can assign keyboard shortcuts to scripts that appear in the iTunes Script menu.

Don’t forget that the system-wide Script menu, which appears on the right side of the Menu Bar, can also be configured to display scripts that are associated with any frontmost application. Thus, when iTunes is frontmost it can display the appropriate iTunes AppleScripts:

Folders for the system-wide Script menu must be set up like so:

For all users of the machine: [startup disk]/Library/Scripts/Applications/iTunes/

For a single user: [startup disk]/Users/[user name]/Library/Scripts/Applications/iTunes/

You can create AppleScripts for many other Apple and third-party applications and place them here as long as the final folder name matches the name of the application (Photos, MarsEdit, Safari, and so on).

Now, there are essentially two kinds of scripts, compiled scripts and application scripts. Compiled scripts have this icon:

This is a Compiled Script

…and application scripts (or applets) have this icon:

This is an Applet

Compiled scripts can only be launched from the Script menu (or other third-party launcher). And while applets can be conveniently launched from the Script menu, they can just as well be launched from any location in the Finder by double-clicking them. Sometimes it may be easier to launch an applet from an easy-to-access folder or from the Finder’s Toolbar rather than from one of the Script menu locations.

September 13 2017 - 8:16 am

Drag From Audiobooks Fixed in iTunes 12.7

I may be the only person who cares about this, but iTunes 12.7 fixes a very long-standing bug that prevented dragging tracks from the Audiobooks library to another app, say Join Together. Thanks!

September 13 2017 - 7:03 am

Playlist Description in iTunes 12.7

I really like that you can add a description to playlists. In iTunes 12.7, now that “Edit Playlist” is gone, it’s even less obvious how to do this than previously. In iTunes 12.7, make sure a playlist is in Playlist View (rather than Songs View or Album View, and so on). Right-click anywhere in the header of the playlist. In the contextual menu, select “Add Description” or “Edit Description”.

AppleScript has been able to access the description of a playlist since iTunes 12.4 and it doesn’t care what the current View is. Of course, the description only displays in Playlist View.

tell application "iTunes"

set thePlaylist to (get view of front browser window)

if thePlaylist's special kind is not in {none} then return

— add folder to list if/when it becomes possible


set currentText to (get thePlaylist's description)

if currentText is missing value then set currentText to ""

on error


end try


set newDescription to text returned of ¬

(display dialog "Enter description:" default answer currentText ¬

with title (get thePlaylist's name))

tell thePlaylist to set description to newDescription

on error


end try

end tell

Open this in Script Editor by clicking the little script icon. Save it named whatever you like as a Script (.scpt) in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script menu. It’s a great candidate for a keyboard shortcut.

Unfortunately, while you can manually edit the description for a Playlist Folder, AppleScript hasn’t caught up. I’m hopeful this will be added to a future version.

September 12 2017 - 8:34 pm

iTunes 12.7 Is Available

Apple has released a new version of iTunes that makes some significant changes. “The new iTunes focuses on music, movies, TV shows, podcasts, and audiobooks,” says the support page. And as a result, it no longer manages your iOS apps or Ringtones. iTunes U content has been moved to Podcasts and Internet Radio can be made available in the Sidebar. There are also accommodations for some new social features coming in iOS 11.

I suspect you’ll be hearing (or making) some complaints about the iOS apps and Ringtones changes.

September 12 2017 - 8:40 am

TrackSift 2 Updated

Over the weekend, Apple approved and posted my update to TrackSIft 2. This latest version fixes a problem some users were seeing with the “Tracks Without Lyrics” tool that prevented the tool from recognizing accessible tracks. I’ve gotten several reports from users that this is successfully patched.

You can get more information about TrackSift 2 on this page and download it from the Mac App Store.

September 8 2017 - 12:53 pm

iTunes U Moving to Podcasts

Apple has announced that iTunes U content will soon be moved to Podcasts. When that happens, iTunes U content will only be available through the iOS Podcasts app or the Podcasts section of iTunes. In iTunes, the iTunes U section will disappear.

What. You were expecting an iTunes U app?

September 5 2017 - 1:06 pm

Find Tracks with Multiple Artworks

This will corral all the tracks in the Music library that have more than one assigned artwork to a new playlist (whose name you supply; any existing playlist(s) with that name will be deleted beforehand):

tell application "iTunes"


set newPlaylistName to text returned of (display dialog ¬

"Enter a name for the playlist:" default answer "Multi-artwork tracks")

on error


end try


delete (every playlist whose name is newPlaylistName)

end try

set newPlaylist to (make new playlist with properties {name:newPlaylistName})

set musicLibrary to (get some playlist whose special kind is Music)

repeat with i from 1 to (index of last track of musicLibrary)


set aTrack to track i of musicLibrary

if (count of artworks of aTrack) > 1 then


duplicate aTrack to newPlaylist

end try

end if

end try

end repeat

display dialog "Done" buttons {"OK"} default button 1

end tell

Open this in Script Editor by clicking the little script icon. Save it named whatever you like as a Script Bundle in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script menu. Launch the script and enter a name for the playlist; the default is “Multi-artwork tracks”; press OK.

September 3 2017 - 10:05 am

Rolling Out Updates for High Sierra

Apple will be announcing new hardware and software at a September 12 Event. Most of the attention, of course, is on the sparkly mobile-oriented stuff. Those of us anchored to iMacs and Macbooks will hopefully hear a sentence or two about macOS 10.13 High Sierra which I reckon will be released in late September (Sierra was released on September 20, 2016 after a September 7 Event).

I’ve already started releasing updates to scripts and I’ll be releasing more regularly over the next few weeks. There are only minimal obligatory changes and accommodations to make. Most current scripts should run OK in High Sierra. But there are some optimizations I can take advantage of in macOS 10.13, thus the updates.

This is probably a good place to note once again that a clean install of macOS 10.12 and later may not create a “iTunes” folder in the user Library directory. Scripts installed in ~/Library/iTunes/Scripts/ will appear in the iTunes Script menu; you may have to create the intermediate folders yourself.

To stay apprised of updates—if you haven’t already—subscribe to me on Twitter, @dougscripts, or on Facebook. Bookmark the 30 Most Recent page. Or subscribe to my Most Recent RSS feed (if you still believe in RSS).

Site contents © 2001 - 2017 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
One who says "it cannot be done" should not interrupt one doing it.