DBTune.org

Henry - a DSP-driving SPARQL end-point

1. Introduction

Note: This service is not currently available. This page is retained for historical interest.

This server hosts a SPARQL end-point able to perform audio processing tasks to answer a particular query. It builds on top of N3 and Transaction Logic. More details to come.

Henry therefore implements a Music-related Semantic Web agent: an agent processing machine-readable web content and audio content to publish new data.

2. Details

Henry was initally intended to be a small application on top of a SWI-Prolog N3 parser, interpreting parsed N3 rules as entailment rules within the SWI-Prolog Semantic Web server.

Now, Henry provides the ability to easily register new audio processing builtin predicates (which may be discovered at querying time). Henry works on top of a quad-store m and a binary store b.

A simplistic version of the behavior of Henry is the following. When processing a SPARQL query q, Henry gets through the following steps:

  1. For every newly appearing web identifier i in q, dereference it, and then:
  2. For every triple pattern p in q, the possible solutions are:

This implementation is still in the early stages, and still a bit experimental, it may perfectly die horribly :-) A look at the issue tracker may give insights on what is still buggy. Also, the server running this service is quite.... slow :)

3. Using this service

There is a raw SPARQL end point at

http://dbtune.org/henry/sparql/
.

A web interface is also available. Get in the Query database page, make sure you choose SPARQL as your query language, and check that the entailment is set to n3 (it should be the default, anyway).

A query involving only builtins (no N3 rules) is the following. It computes MFCC models for two tracks and compute their Kullback-Leiber divergence:

select ?d
where
{
<http://dbtune.org/audio/Den-Nostalia.ogg> <http://purl.org/ontology/dsp/cache> ?local.
?local <http://purl.org/ontology/dsp/aspl_decode> ?sig.
?sig <http://purl.org/ontology/vamp/qm-mfccparameters> (?means1 ?vars1).

<http://dbtune.org/audio/Both-Axel.ogg> <http://purl.org/ontology/dsp/cache> ?local2 .
?local2 <http://purl.org/ontology/dsp/aspl_decode> ?sig2.
?sig2 <http://purl.org/ontology/vamp/qm-mfccparameters> (?means2 ?vars2).

((?means1 ?vars1) (?means2 ?vars2)) <http://purl.org/ontology/dsp/mfcc_kldiv> ?d
}

This is a pretty huge query! But, using a simple N3 rule, we can reduce that to the following query:

PREFIX sim: <http://purl.org/ontology/similarity/>
SELECT ?sim
WHERE
{
(<http://dbtune.org/audio/Den-Nostalia.ogg> <http://dbtune.org/audio/Both-Axel.ogg>) sim:div ?sim
}

Another example is the following, computing key change events as specified by the Audio Features ontology. using the key detection Vamp plugin in the Queen Mary plugin set and this N3 rule:

select ?start ?key where {
<http://dbtune.org/audio/Both-Axel.ogg> mo:encodes ?sig.
?sig mo:time ?time.
?time tl:timeline ?tl.
_:evt a af:KeyChange; 
        event:time [tl:at ?start; tl:timeline ?tl] ;
        af:new_key ?key }

4. Code

All the code is open source and available in our Google code project.