dougscripts.com

Managing Track Info

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 harmonic-mixing.com

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

August 27 2017 - 1:20 pm

UPDATED: Proper English Title Capitalization v3.6

Proper English Title Capitalization has been updated, primarily to provide compatibility with High Sierra. But I also added a Dry Run Log window to pre-flight the changes before actually affecting the tracks' tags in iTunes.

Until now, I had logged this stuff to Console.app. Blech.

I also had a look at a problem with capitalizing words if they followed a colon (:). I think most conditions are covered. Essentially, if a word follows a colon, it's capitalized no matter what.

Proper English Title Capitalization is free to use with a donate nag and thanks for your support! More information and download is on this page.

November 13 2016 - 12:37 pm

UPDATED: CD Text to CD Info v4.3

In our recent The Next Track episode where we discussed CD Text, I brought up the script CD Text to CD Info, which will grab the CD Text from a CD (if it uses CD Text) and apply the data to the appropriate CD tags. Then I thought: "Hmm, better have a look at that to make sure it still goes good."

CD Text to CD Info

It does, but it occurred to me that I could tidy some things up. So this latest version removes a launch reminder about making sure the CD is sorted by play order; this is no longer necessary as the tracks are identified by their track number. I also added a "Export CD Text as XML" feature that will export the CD Text as a property list file. Probably not useful for most users but there it is.

This latest version is for OS X 10.10 and later only, free to use with a donate nag, and can be downloaded from this page.

September 3 2016 - 11:05 am

UPDATED: Multi-Item Edit

Multi-Item Edit v5.0 has been updated to accommodate the new Dislike, Work and Movement tags that are available in iTunes 12.5, currently in beta.

Multi-Item Edit will allow you to edit most tags (and some additional options) of the selected track(s) in a single floating window using single-edit mode (one selected track) or multi-edit mode, which emulates the pre-iTunes 12 "multiple items" format; that is, a checkbox adjacent to each tag allows you to select which changes are to be applied to the selection's tags.

As I mentioned above, this latest version adds new tags that will be available in iTunes 12.5; makes UI adjustments to accommodate those additions; removes the "Played" option (which tapped the AppleScript unplayed track property and which I'm not certain still performs a pertinent function anymore); includes minor maintenance and security fixes.

Multi-Item Edit is free to use for ten days and costs $1.99 thereafter.

August 25 2016 - 7:00 am

UPDATED: Copy Tag Info Tracks to Tracks v5.0

I've updated Copy Tag Info Tracks to Tracks so it will work with the new Work, Movement and Dislike tags that are debuting in iTunes 12.5 and which are already available in the Developer and Public beta releases.

Copy Tag Info Tracks to Tracks will copy the text of the checkmarked tags from one set of selected tracks to a second set.

This latest version also consolidates Plays, Skips and associated date tags under a single checkbox. And because there seems to be some weirdness with retreiving Sort tags—the implicit text iTunes uses as gray placeholder text is recognized even if these tags are ostensibly blank—I've removed the option to copy them.

Copy Tag Info Tracks to Tracks v5.0 is free, with appreciative payment requested, and works on OS X 10.8 and later.

August 20 2016 - 6:15 am

Copy Grouping to Work

As you probably know, the latest beta version of iTunes 12.5 includes Work and Movement track tags which Classical music listeners will appreciate. In many cases, you might want to use the text in the Grouping tag for the Work tag. While it might seem easy to just do a Multi-Edit on the tracks and copy-and-paste using the Get Info fields, you'd only be able to do this for individual batches of a single work at a time.

Here's an AppleScript that will simply copy the Grouping tag to the Work tag for any number of selected tracks:

tell application "iTunes"

set sel to selection of front browser window

if sel is {} then return

repeat with aTrack in sel

try

tell aTrack to set work to (get grouping)

end try

end repeat

end tell

Save this named whatever you like to your [home]/Library/iTunes/Scripts/ folder so that it will appear in the iTunes Script menu. Select some tracks and launch the script by selecting it from the Script menu. The text from the Grouping tag, even if it's blank, will be copied to the Work tag of each selected track.

UPDATE: This script can be downloaded as part of the Work and Movement Scripts.

August 1 2016 - 7:24 pm

Revisiting Reset Plays

The iTunes faithful may remember that iTunes 12.4 removed the "Reset Plays" option. This command would zero the Plays and Skips of a track.

AppleScript to the rescue: I posted a script, Reset Plays, that replicated this feature and additionally deleted the Last Played Date and Last Skipped Date, turned off "Remember Playback Position", and set the played property to false; essentially, rendering a track as "never played".

Whether due to user clamor or by design, the "Reset Plays" feature was restored in iTunes 12.4.1 and I figured the script was obsolete.

Today, I got around to trying iTunes' native "Reset Plays" in v12.4.3 (it is not something I would normally use at all). While the Plays and Skips are set to zero as expected, surprisingly, the Last Played Date and Last Skipped Date remain; such that a Smart Playlist filtering by the date a track was last played (or skipped) will not realise that these "reset" tracks were supposed to appear as never played.

So, Reset Plays may actually still be useful.

May 18 2016 - 7:12 am

Reset Plays MIA

[UPDATE: iTunes 12.4.1, released June 2, 2016, restores the Reset Plays feature. The "Reset" button is located in the track's Get Info window's "Details" tab adjacent to the play count entry.

Of course, the script below is still serviceable.]

Looks like the "Reset Plays" command is MIA in iTunes 12.4. Here's a script that will reset the played count of each selected track to 0 and remove its played date.

tell application "iTunes"

set sel to selection

if sel is {} then return -- nothing selected

repeat with thisTrack in sel

-- use try blocks to fail gracefully if problem

try

set thisTrack's played count to 0

end try

try

set thisTrack's played date to missing value

end try

end repeat

end tell

Click on the script icon to open this in Script Editor on your machine. From Script Editor's File menu, click "Save...". In the Save Panel, enter a name for the script, like "Reset Plays", and save it to your [username]/Library/iTunes/Scripts/ folder (if no "Scripts" folder exists, create one). Once saved to this folder, the script will appear in iTunes' Script menu. To use, select the track(s) in iTunes whose plays you want to reset and then choose the "Reset Plays" script in the Script menu.

A more advanced version of this script is available as a download from this page.

Alternatively, you can use Add or Subtract Play Count, New Last Played Date, or New Play Count. Each has some capacity to change a track's Plays.

There still seems to be a bug regarding changing the Plays of Matched/Uploaded tracks in the cloud, whereby the played count reverts to whatever it was before being "artificially" set with AppleScript (or other means). I couldn't say if that issue is related to the disappearance of "Reset Plays".

February 7 2016 - 12:44 pm

UPDATED: Album Rating Reset v2.0

Album Rating Reset will allow you to set the Album Rating and/or Album Loved for the albums of the selected tracks or the albums associated with the tracks in a selected playlist.

Album Rating Reset

I had pretty much given up on Album Ratings as just more Songs View clutter. I'd hidden the Album Rating column in Songs View. When there's no avoiding it in Album Views I prefer the computed Album Rating that averages the album's track ratings. But now that I use Apple Music fairly regularly, the Loved settings for tracks, albums and playlists in my library actually work pretty well with shaping Apple Music recommendations.

So I updated Album Rating Reset from a version last updated in 2007 to include Album Loved. The older version would only work on one track a time. But this version works on the selected tracks' albums or the albums associated with the tracks in a selected playlist. I don't think there is a way in iTunes to apply an Album Rating or Album Love to multiple albums at a time except while in Albums View.

Album Rating Reset

More information and download is on this page.

November 12 2015 - 8:40 am

NEW: Rating Notify

I used to be pretty good about maintaining my tracks' Ratings. But I have lapsed. I used to use my applet Rate Me! Rate Me! to encourage me to rate tracks as they were playing. But I haven't updated that in a few years and, really, it was conceived before Notifications became available.

And while iTunes Notifications are fine, they don't display the Rating for the track. So I had to roll my own.

Rating Notify is a simple applet that runs in the background and when iTunes plays a Music track it dispatches a Notification displaying the track's Name, Artist, Album, Artwork and Rating. The script can also be set to only show Notifications for tracks without a rating. The tracks in these Notifications, for example, have not been rated:

Clicking the Notification reveals the track in iTunes' Music library so you can work on it—or you could use the iTunes Dock menu to rate it (tracks cannot be rated from the Notification, if that's what you were wondering). Additional options can be set via System Preferences: When the alert style in System Preferences > Notifications for the applet is set to "Banners", Notifications will self-dismiss; when set to "Alerts" each Notification will remain posted until it is user-dismissed, as in the screenshot above.

For iTunes 12 and later/OS X 10.10 and later. More information and download is here.

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