An iTunes group randomizer script

Oct 07, '04 10:43:00AM

Contributed by: Anonymous

I use iTunes to organize my music library, and I although I generally love the program, there are a few shortcomings that bug me. One thing in particular is the fact that the shuffle function shuffles at the track level, making it useless when playing classical works that span multiple tracks. To get around this limitation, I wrote an AppleScript that randomizes playlists at the group level.

This script operates on the selected playlist in iTunes. It randomizes the tracks of the playlist, preserving the ordering within contiguous tracks with the same album and grouping. This is very useful in randomizing classical works. For example, if you want to play a group of symphonies in random order, create a playlist containing the symphonies. Make sure that no two symphonies on a single album have the same value for the grouping field. Select the playlist, run the enclosed AppleScript, and the playlist will contain the same symphonies, in random order.

Note that I am not a professional programmer. The AppleScript is slow and not very pretty, but works for me. Enjoy.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041003160613333