- reads my iTunes library,
- works with dual audio output, so I can preview songs in my headphones while playing a different tune over the main speakers, and
- automatically loads songs from a cue and transitions between songs.
- Play a set using Disco XT.
- When you're done, export your log to a text file.
- Open that file.
- Highlight the songs that you want to copy into iTunes and hit apple-C to copy.
- Open your iTunes and run this script.
- A new playlist called "Disco XT playlist" will be generated. Since Disco only allows you to export the title and artist of the tracks that you played, there is no way to uniquely identify a track if you happen to have multiple versions (for instance, your 6 different recordings of the Basie band playing One O'Clock Jump). The script pulls all of them, so you'll need to look through the playlist and delete the tracks that you didn't actually play.
Here's the code:
tell application "Finder" to set theClipboard to the clipboard
set saveD to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set tempList to every text item of theClipboard
set theImportList to {}
repeat with lineItem in tempList
set AppleScript's text item delimiters to {" - "}
copy every text item of lineItem to end of theImportList
end repeat
set AppleScript's text item delimiters to saveD
tell application "iTunes"
-- create a new playlist
make new user playlist with properties {name:"Disco XT playlist"}
set newPlaylist to playlist "Disco XT playlist"
set the view of the front browser window to newPlaylist
-- add tracks to new playlist
repeat with trackItem in theImportList
set copy_these to (get every track of library playlist 1 whose artist is (first item of trackItem) and name is (second item of trackItem))
repeat with thisTrack in copy_these
duplicate thisTrack to newPlaylist
end repeat
end repeat
end tell
beep