{"id":47,"date":"2005-03-28T16:05:09","date_gmt":"2005-03-28T21:05:09","guid":{"rendered":"http:\/\/crschmidt.net\/blog\/?p=47"},"modified":"2005-03-28T16:05:09","modified_gmt":"2005-03-28T21:05:09","slug":"menow-and-musicbrainz","status":"publish","type":"post","link":"https:\/\/crschmidt.net\/blog\/archives\/47\/menow-and-musicbrainz\/","title":{"rendered":"MeNow and MusicBrainz"},"content":{"rendered":"<p>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. <\/p>\n<p>So, I figured &#8220;hey, my music is tagged by musicbrainz, and they do some nifty RDF stuff, right?&#8221; So I started exploring. <\/p>\n<p>I&#8217;m listening to Lou Bega&#8217;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 &#8220;Mastermix 160&#8221; 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 <a href=\"http:\/\/www.musicbrainz.org\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac.html\">Mambo #5<\/a>. I&#8217;m given two RDF links: One for the <a href=\"http:\/\/mm.musicbrainz.org\/mm-2.1\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac\">Track<\/a>, one for the <a href=\"http:\/\/mm.musicbrainz.org\/mm-2.1\/artist\/64f9c914-74a0-4f6b-8589-6261851b0ab9\">artist<\/a>.<\/p>\n<p>I add these to my local RDF store via IRC: <\/p>\n<p>15:43:43 &lt; crschmidt> ^add<br \/>\nhttp:\/\/mm.musicbrainz.org\/mm-2.1\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac<br \/>\n15:43:44 &lt; julie>  Adding<br \/>\nhttp:\/\/mm.musicbrainz.org\/mm-2.1\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac to my database&#8230;<br \/>\n15:43:45 &lt; julie>  Added 14 statements from<br \/>\nhttp:\/\/mm.musicbrainz.org\/mm-2.1\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac. Model size is 2125954.<br \/>\n15:43:51 &lt; crschmidt> ^add<br \/>\nhttp:\/\/mm.musicbrainz.org\/mm-2.1\/artist\/64f9c914-74a0-4f6b-8589-6261851b0ab9<br \/>\n15:43:52 &lt; julie>  Adding<br \/>\nhttp:\/\/mm.musicbrainz.org\/mm-2.1\/artist\/64f9c914-74a0-4f6b-8589-6261851b0ab9 to my database&#8230;<br \/>\n15:43:53 &lt; julie>  Added 8 statements from<br \/>\nhttp:\/\/mm.musicbrainz.org\/mm-2.1\/artist\/64f9c914-74a0-4f6b-8589-6261851b0ab9. Model size is 2125962.<\/p>\n<p>So, now the bot knows about the song that I&#8217;m listening to &#8211; how to tell her I&#8217;m listening to it? The MeNow schema is designed for just that. A turtle serialization stating &#8220;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&#8221; would go something like this:<\/p>\n<p>[a foaf:Person; foaf:nick &#8220;crschmidt&#8221;; foaf:homepage &lt;http:\/\/crschmidt.net>; menow:hasStatus [ a menow:Status; menow:listeningTo &lt;http:\/\/musicbrainz.org\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac>; dc:date &#8220;2005-03-28T20:47Z&#8221;]].<\/p>\n<p>Just my luck, my IRC bot also understands Turtle, so I add some triples:<\/p>\n<p>15:49:07 &lt; crschmidt> ^addturtle [a foaf:Person; foaf:nick &#8220;crschmidt&#8221;; foaf:homepage &lt;http:\/\/crschmidt.net>; menow:hasStatus [ a menow:Status; menow:listeningTo<br \/>\n&lt;http:\/\/musicbrainz.org\/track\/5c29f67b-5014-40a7-a443-0de7636b26ac>; dc:date &#8220;2005-03-28T20:47Z&#8221;]].<br \/>\n15:49:08 &lt; julie>  Model size increased by 7 to 2125969 via turtle statements.<\/p>\n<p>So, now julie knows what I&#8217;m listening to, but how do I tell other people? Using RDQL queries (I haven&#8217;t added SPARQL support yet), I can show off what I&#8217;m listening to:<\/p>\n<p>15:53:16 &lt; crschmidt> ^q select ?t, ?n, ?d where (?p foaf:nick &#8220;crschmidt&#8221;) (?p                       menow:hasStatus ?s) (?s dc:date ?d) (?s menow:listeningTo ?o) (?o dc:title ?t) (?o dc:creator ?a) (?a dc:title ?n)<br \/>\n15:53:17 &lt; julie>  2005-03-28T20:47Z Mambo No. 5 Lou Bega, 2005-03-28T16:59Z                   Can&#8217;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<\/p>\n<p>As you can see, this shows off all the songs I&#8217;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<\/p>\n<p>Okay, so it&#8217;s the most ass backwards way of sharing what you&#8217;re listening to ever. That doesn&#8217;t mean it doesn&#8217;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&#8217;m listening to. I could, for example, offer a rating, using the <a href=\"http:\/\/www.purl.org\/stuff\/rev#\">review vocabulary<\/a>. I could find out what license a work is under, using information from the <a href=\"http:\/\/creativecommons.org\/technology\/metadata\/\">Creative Commons Metadata<\/a> project. I could find out what songs someone else is listening to, and then find out their contact information via <a href=\"http:\/\/xmlns.com\/foaf\/0.1\/\">FOAF<\/a>, check their availability via MeNow information and Jabber Pub\/Sub tech,  and drop them a message if they&#8217;re around. <\/p>\n<p>I&#8217;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&#8217;m preaching to the choir here. But I wanted to write about it anyway. &#8220;Now Playing information stored in RDF: Wave of the future! You heard it here first!&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;hey, my music is tagged [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,8,2],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-menow","category-rdfcat","category-semantic-web"],"_links":{"self":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":0,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}