Skip to content

Instantly share code, notes, and snippets.

@ddeville
Created July 19, 2014 09:48
Show Gist options
  • Save ddeville/f9e78799cd5247f6dbfb to your computer and use it in GitHub Desktop.
Save ddeville/f9e78799cd5247f6dbfb to your computer and use it in GitHub Desktop.
Find all tracks that match a given bit rate in iTunes and create a new playlist containing them
set track_bpm to 270
set playlist_name to "My Playlist"
tell application "iTunes"
set retrieved_tracks to get tracks where bit rate is track_bpm
set created_playlist to make new user playlist with properties {name:playlist_name}
repeat with current_track in retrieved_tracks
duplicate current_track to created_playlist
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment