MeNow and MusicBrainz

So, I had a few minutes of free time earlier today, and I decided to play a bit with MusicBrainz. On my Mac right now, the only music I have is tagged by Musicbrainz, and I finally have redlandbot/julie back online after some extended DSL line problems.

So, I figured “hey, my music is tagged by musicbrainz, and they do some nifty RDF stuff, right?” So I started exploring.

I’m listening to Lou Bega’s Mambo #5, from Mastermix 160 (disc 1), according to iTunes. As I said before, all these titles are pulled from MusicBrainz. So, I go to Musicbrainz, and type in “Mastermix 160” to the Albums list, click on the correct response. I arrive at http://www.musicbrainz.org/showalbum.html?albumid=145830 , and from there, move on to Mambo #5. I’m given two RDF links: One for the Track, one for the artist.

I add these to my local RDF store via IRC:

15:43:43 < crschmidt> ^add
http://mm.musicbrainz.org/mm-2.1/track/5c29f67b-5014-40a7-a443-0de7636b26ac
15:43:44 < julie> Adding
http://mm.musicbrainz.org/mm-2.1/track/5c29f67b-5014-40a7-a443-0de7636b26ac to my database…
15:43:45 < julie> Added 14 statements from
http://mm.musicbrainz.org/mm-2.1/track/5c29f67b-5014-40a7-a443-0de7636b26ac. Model size is 2125954.
15:43:51 < crschmidt> ^add
http://mm.musicbrainz.org/mm-2.1/artist/64f9c914-74a0-4f6b-8589-6261851b0ab9
15:43:52 < julie> Adding
http://mm.musicbrainz.org/mm-2.1/artist/64f9c914-74a0-4f6b-8589-6261851b0ab9 to my database…
15:43:53 < julie> Added 8 statements from
http://mm.musicbrainz.org/mm-2.1/artist/64f9c914-74a0-4f6b-8589-6261851b0ab9. Model size is 2125962.

So, now the bot knows about the song that I’m listening to – how to tell her I’m listening to it? The MeNow schema is designed for just that. A turtle serialization stating “crschmidt, whose homepage is http://crschmidt.net, is, at time 2005-03-28T20:47Z listening to the track identified by http://musicbrainz.org/track/5c29f67b-5014-40a7-a443-0de7636b26ac” would go something like this:

[a foaf:Person; foaf:nick “crschmidt”; foaf:homepage <http://crschmidt.net>; menow:hasStatus [ a menow:Status; menow:listeningTo <http://musicbrainz.org/track/5c29f67b-5014-40a7-a443-0de7636b26ac>; dc:date “2005-03-28T20:47Z”]].

Just my luck, my IRC bot also understands Turtle, so I add some triples:

15:49:07 < crschmidt> ^addturtle [a foaf:Person; foaf:nick “crschmidt”; foaf:homepage <http://crschmidt.net>; menow:hasStatus [ a menow:Status; menow:listeningTo
<http://musicbrainz.org/track/5c29f67b-5014-40a7-a443-0de7636b26ac>; dc:date “2005-03-28T20:47Z”]].
15:49:08 < julie> Model size increased by 7 to 2125969 via turtle statements.

So, now julie knows what I’m listening to, but how do I tell other people? Using RDQL queries (I haven’t added SPARQL support yet), I can show off what I’m listening to:

15:53:16 < crschmidt> ^q select ?t, ?n, ?d where (?p foaf:nick “crschmidt”) (?p menow:hasStatus ?s) (?s dc:date ?d) (?s menow:listeningTo ?o) (?o dc:title ?t) (?o dc:creator ?a) (?a dc:title ?n)
15:53:17 < julie> 2005-03-28T20:47Z Mambo No. 5 Lou Bega, 2005-03-28T16:59Z Can’t Get Enough of You Baby Smash Mouth, 2005-03-28T16:39:08Z Electric Sleep (Original Version) sHeavy, 2005-03-28T16:47:08Z Dead Already Thomas Newman

As you can see, this shows off all the songs I’ve been listening to recently. If I want to limit them, I can add a regex onto ?d: ?d =~ /20:47/. This gives me the result I want: 2005-03-28T20:47Z Mambo No. 5 Lou Bega

Okay, so it’s the most ass backwards way of sharing what you’re listening to ever. That doesn’t mean it doesn’t have 0 merit however: one of the benefits of RDF is its extensibility. This means that I can do a lot more than just say what I’m listening to. I could, for example, offer a rating, using the review vocabulary. I could find out what license a work is under, using information from the Creative Commons Metadata project. I could find out what songs someone else is listening to, and then find out their contact information via FOAF, check their availability via MeNow information and Jabber Pub/Sub tech, and drop them a message if they’re around.

I’m stretching it, but this is why I want all this stuff which MeNow can work with. RDF is powerful, and an application people might actually use would be a cool way to share this data. Then again, for the most part, I’m preaching to the choir here. But I wanted to write about it anyway. “Now Playing information stored in RDF: Wave of the future! You heard it here first!”

4 Responses to “MeNow and MusicBrainz”

  1. Vidar Hokstad's random musings Says:

    Exploring the Semantic Web: MeNow and MusicBrainz

    crsmith.net has an interesting entry on using RDF data from MusicBrainz to export information about the music tracks he’s currently listening to, and how it’ll allow him to link that information to, for instance, license data, review information, FOA…

  2. tom Says:

    Check out Audioscrobbler. Although it might not as fun as messing around with RDF yourself, it will plug into most players (winamp, itunes, etc) and automatically upload RDF to the your profile. It will keep a “most popular” list and give you reccomendations based on what you listen to.

  3. Christopher Schmidt Says:

    Unfortunately, Audioscrobbler’s Web services are broken in all kinds of ways, although I do already use them for a number of things.

    1. FOAF is broken. It’s been broken in three different ways over the past 2 months, All PHP errors. Audioscrobbler’s code is never very well tested before it goes live, and it has a history of being broken for a long time.

    2. RDF output is bad. It’s not good RDF, and it describes all the songs you’re listening to as being the same song. Since it doesn’t use anything other than titles, it doesn’t know how to find a musicbrainz ID, doesn’t look like it will at any point in the future, and as such, the RDF output is completely broken.

    3. Web services for text output don’t split the data up, so there’s no way to be sure that a specific field is first. I’ve still done some working with this format, and created the MeNow Implementation based on it. However, this has broken on me in the past two, meaning that it breaks the tools.

    The primary concern is the fact that the artist and title aren’t described in a usable way in anything, and the fact that I need to then aggregate this data myself, which is a pain. So, I’m pretty happy with what I’ve created at a prototype level.

  4. Casey's World Says:

    My Music Tastes…

    I stumbled across a very cool little plugin yesterday: Audioscrobbler. This little service will send your music playing history to Audioscrobbler’s servers, so that other people can see what you’re listening to at any given moment…