Chris@0: Chris@0: Chris@0: Chris@0: Chris@0:
Chris@0:Chris@0: A simple XSL for transforming the results of the Echonest Analyze API to Music Ontology RDF. Chris@0:
Chris@0: Chris@0:
Chris@0: Original file: analyze-example.xml
Chris@0: Transform: echonest.xsl
Chris@0: Results: analyze-example.rdf
Chris@0:
Chris@0:
Chris@0: Chris@0: Chris@0:Chris@0: The resulting RDF can be queried using SPARQL. Chris@0: For example, the following query Chris@0: selects starts and durations for extracted structural segments (eg. chorus, verse, etc.). Chris@0:
Chris@0: PREFIX af: <http://purl.org/ontology/af/> Chris@0: PREFIX event: <http://purl.org/NET/c4dm/event.owl#> Chris@0: PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#> Chris@0: Chris@0: SELECT ?start ?duration Chris@0: FROM <http://dbtune.org/echonest/analyze-example.rdf> Chris@0: WHERE Chris@0: { Chris@0: ?e a af:StructuralSegment; Chris@0: event:time ?time. Chris@0: ?time tl:start ?start; Chris@0: tl:duration ?duration. Chris@0: } Chris@0:Chris@0: I tested this query with Roqet and ARQ. Chris@0: Chris@0: Chris@0:
Chris@0: The outputted RDF is designed using the Chris@0: Music Ontology, the Audio Features ontology and Chris@0: a small Echonest ontology extending the latter. Chris@0:
Chris@0: Chris@0:Chris@0: RDF could be automatically extracted from the Echonest Analyze results through GRDDL, Chris@0: by adding the following: Chris@0:
Chris@0: <Analysis xmlns:grddl="http://www.w3.org/2003/g/data-view#" Chris@0: grddl:transformation="http://dbtune.org/echonest/echonest.xsl"> Chris@0: ... Chris@0: </Analysis> Chris@0:Chris@0: Chris@0: Chris@0:
Chris@0: Author: Yves Raimond Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: