13 October 2006

Script Friday: Build Similar Tracks Playlist in iTunes

Use this script on the currently playing track or selection in iTunes to build a list of similar tracks. It will generate a new playlist and start with the current track (iTunes will "hiccup" briefly while switching playlists, sorry).

Similar Artist information is gained by accessing the Audioscrobbler Web Service. I am in no way affiliated with last.fm/audioscrobbler but any company that opens their APIs for scripters does get bonus points from me.

This script is very sensitive to the naming of the artists in your library, if your naming does not match the naming in audioscrobbler then you are out of luck. Take a look at the event log to track down problems.

Use the following parameters to adjust to your preferences (you will find them in the first few lines of the script as properties):

includePlaylist : "Library" -- pick only songs from this playlist, use "Library" for all your songs, podcasts and songs which are marked 'Skip when shuffling' are ignored by default
numberOfTracks : 12 -- how many tracks should be added to the new playlist
minimumRating : 20 -- only choose tracks with a rating higher or equal to this, note: 1 star in iTunes equals a rating of 20 (5 stars = 100)
minimumMatch : 40 -- Audioscrobbler has a 'match' index for the artists from 100 downwards, describing how similar two artists are rated. ignore artists with a match rating lower than this.
namePrefix : "Similar Tracks starting with " -- the new playlist will start with this string followed by the name of the artist

So without much further ado:

Build Similar Tracks Playlist

2 comments:

Timothy said...

Thanks for the script. I was looking for any example about how to use applescript for access last.fm webservices. Now I got me a folksonomy genre decider. thanks.

rubber track manufacturers said...

What started out as a BPM detection tool for DJs, runners and dancers, has become one of the finest iTunes™ library management tools around.

beaTunes' powerful inspection feature let's you clean up your iTunes track data in a way unrivaled by any other software on the market today. Easily find typos or different spellings of artists' names, automatically fill in the album artist names, and much more. No more R.E.M. and REM in your iPod's artist list!

beaTunes can even help you to find the titles of tracks that have no artist or title associated with them.

And once you have a clean collection, the built-in playlist generator works even better.