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

An iTunes group randomizer script Apps
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.
    •    
  • Currently 2.75 / 5
  You rated: 5 / 5 (4 votes cast)
 
[5,055 views]  

An iTunes group randomizer script | 8 comments | Create New Account
Click here to return to the 'An iTunes group randomizer script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An iTunes group randomizer script
Authored by: jubelc on Oct 07, '04 11:39:01AM

Couldn't Preferences->Advanced->Shffule By Album accomplish the same thing?



[ Reply to This | # ]
An iTunes group randomizer script
Authored by: zepol on Oct 07, '04 08:11:01PM

I wrote the script in the hint, and thought about the things that a few of you have mentioned...

About shuffle by album: This works OK, but I want to shuffle by work, not album. For instance, I have a set that I label as one album with 14 discs. I'll never get to the last works on the set if I shuffle by album.

About joining tracks: I want to be able to hear a single movement of a work when I want, and I don't want to have to note the timings of each individual movement to accomplish this. To me, that's what tracks are for.



[ Reply to This | # ]
An iTunes group randomizer script
Authored by: kirkmc on Oct 07, '04 12:03:07PM
Yeah, my trick is to set each work as either an entire track, when ripping, or as an album (say Mahler's 3rd, for example; I set the album name to Mahler's 3rd, rather than whatever the actual album is). I've got an article here with some tips on using iTunes and the iPod with classical music. http://www.mcelhearn.com/article.php?story=20040920102349748 Kirk

---
Read my blog: Kirkville -- http://www.mcelhearn.com
Musings, Opinion and Miscellanea, on Macs, iPods and more

[ Reply to This | # ]

An iTunes group randomizer script
Authored by: skribble on Oct 07, '04 12:07:00PM

iTunes has that very useful "Join CD Tracks" option when importing a number of songs that should be played sequentially. This, I think, is really the solution to the problem, but hey, if writing AppleScripts to reinvent the wheel is what makes you happy... :)



[ Reply to This | # ]
An iTunes group randomizer script
Authored by: gidds on Oct 07, '04 12:15:36PM
That's a solution, but not the only one, nor really an ideal one.

You gain gapless playback, and easier randomising; you lose the ability to individually label movements, go to them, play them, &c. Without that, I wouldn't have been able to label (say) which sections of Mozart's requiem were his own and which were completed by Süssmayr.

Personally, I'm resigned to hearing individual movements. And I've hijacked the 'grouping' field for my own use: indicating whether tracks came from my own CD, a friend's CD, recorded off the radio, created myself, downloaded from a web site, or whatever. (This came in extremely handy when I lost my HD with all my music on; it made reconstruction much easier!)

---
Andy/

[ Reply to This | # ]

An iTunes group randomizer script
Authored by: Fofer on Oct 07, '04 02:17:00PM

Why hijack the grouping field for comments? Why not use the "comments" field for comments?



[ Reply to This | # ]
An iTunes group randomizer script
Authored by: DougAdams on Oct 07, '04 03:24:16PM

Fofer asked, "Why hijack the grouping field for comments?"

Classical tracks are the only track type (that I'm aware of) that uses the grouping tag "legitimately". Do a search for any Classical piece on the iTMS; if it has several movements you will see that they are grouped by the name of the piece.



[ Reply to This | # ]
An iTunes group randomizer script
Authored by: Baggins on Oct 07, '04 12:18:13PM

Unless, of course, you bought the album from the iTMS store.



[ Reply to This | # ]