MeNow and MusicBrainz
Posted in MeNow, RDF, Semantic Web on March 28th, 2005 at 16:05:09So, 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!”