OmniGraffle Musical Taste
When I get a ping that starts with something akin to "You still like pointless but neat stuff, right?", I don't usually get my hopes up. Unless it comes from Jesper (the guy who spent a bunch of time slapping together a perl script to convert text interviews to audio), which brings us to OGMT, short for "OmniGraffle Musical Taste"...
If you have OmniGraffle, you can download and run the AppleScript below. It'll trawl through your iTunes library, map out all the artists, hi-light the most popular, and connect it all so you can arrange it as you will. I'd say that qualifies as suitably neat yet pointless...
There's two scripts, one for version 3 and 4 of OmniGraffle. Double-click so it opens in Script Editor, the click "Play." Do wait until it finishes -- depending on the size of your library it'll chug, but then arrange everything out from the center.
Comments (15)
Posted by: Kitchen_Kerner at December 22, 2005 05:02 PM
Nothing happens when I click, it opens in "Script Editor". What am I doing wrong?
Posted by: el jefe at December 22, 2005 05:06 PM
I'm guessing:
1. click the "Run" button in Script Editor, or
2. make a folder called "iTunes" in ~/Library/Scripts, and then place the script there. Quit iTunes, then relaunch it ... and next to your date and time in the upper-right corner of the menu, you'll see a Script icon -- click it and you'll see your script. Click the script and it should run.
#1 is easy. #2 is probably better and more correct, but way too much work.
Posted by: CM Harrington at December 22, 2005 05:11 PM
Oh, *wow* that looks like fun, although with over 40 GB of music (All legal, thank you), I am scared to think how long an Applescript will take to do this, and how amazingly slow OG will be once it finishes plotting. OG slows to a crawl with a few hundred items. I can't imagine 40,000 (and yes, I have gobs of ram)
Posted by: Jesper at December 22, 2005 05:14 PM
The bubbles created are those of one per named artist. If you have 40k songs, you'll probably end up with about 800 artists, and as many bubbles.
The script isn't designed to work from the script menu of any of iTunes or OmniGraffle. Basically - double click the appropriate version and click Play in Script Editor. DB might want to add this paragraph in the post.
Posted by: Jeremy Wood at December 22, 2005 06:27 PM
I take it the line weights of the Artist rects indicate the number of songs that I have of that artist?
It would be cool to see what other infographical readouts would be possible using Applescript to run the show in Omnigraffle.
Another cool graphical display of information that uses the hub and spoke layout is the Bits on Wheels BitTorrent client. www.bitsonwheels.com. It's great for describing to people how BitTorrent works.
Posted by: Jesper at December 22, 2005 06:46 PM
Jeremy: Every artist needs to cross a certain song threshold to get considered by the script - and the script ships in "five or more". The line around every artist bubble is (NUMBER_OF_SONGS_BY_THAT_ARTIST / (THRESHOLD * 2)) points thick, so the line thickness is proportional to the number of songs made by that artist, yes. (This also means that it's possible to set the threshold at 40 (it's a variable at the top of the script) and just get artists you like a whole lot.)
I was actually a bit inspired by Bits on Wheels - what a nice app! - but more than anything I was inspired by nonsensical charts and mind maps and some of the projects that are floating around that aim to map your music collection in one way or another. I thought this would be a nice mix of nonsensical and useful.
Posted by: Tom Robinson at December 22, 2005 10:32 PM
I have nearly 2000 artists in my iTunes library...I think I'll pass on this one...
Posted by: Matt at December 22, 2005 10:47 PM
I think DB *might* have a few too many URLs in his Dock. Or it may just be me.
Posted by: has at December 23, 2005 01:09 PM
> It would be cool to see what other infographical readouts would be possible using Applescript to run the show in Omnigraffle.
Here's a nice one that draws SQL schema in OG4, although it uses Python + appscript (see my site) + PyGreSQL rather than AppleScript to do the work:
http://www.visualdistortion.org/DBGraffle4/
Here's another that uses appscript + BeautifulSoup to draw website maps:
http://toys.jacobian.org/presentations/2005/appscript/
It could do with handling broken links better, but is very cool all the same. Note that an updated version of this script that supports the latest appscript & OG is available from my site.
Posted by: Sean Legassick at December 24, 2005 11:53 AM
I like this a lot, it all run surprisingly fast over my 20 gigs or so of music. One problem I spotted is that the iTunes search to determine how many songs each artist has does a partial string match. I was wondering why the artist 'M' looked like the most popular in my library by several orders of magnitude despite me only having one of their songs! Don't know if there's any easy way around this, as the iTunes search method doesn't have any option to do exact match...
Posted by: paul at December 24, 2005 07:28 PM
Any way to make it plot on a bigger page? I have a tabloid page worth of data that would like to see all on one, but I can't seem to make it print on just one.
Posted by: Abhi Beckert at December 25, 2005 06:39 PM
"Don't know if there's any easy way around this, as the iTunes search method doesn't have any option to do exact match..."
You could manually parse the search results to trim out everything that's not an exact match.
Posted by: ccs178 (Chris) at December 25, 2005 07:08 PM
My 29GB library took little time to run. About the same amount of time it took for a 13mb file to download via DSL. :)
Posted by: Jesper at December 30, 2005 08:59 AM
I wonder if there's a better way to get all artists from the iTunes data. As has been noted above, if you've got one artist named, say, "Eric", searches for him - the imperfect method used by the script - also match any other artists you may have that match that search, like "Eric Idle". A possible workaround is to check all search results and filter out anything that's not an exact match - however, that would take an insane amount of time.









Dr. Dre and Cat Stevens. Together at last.