comparison feature-description-example.n3 @ 0:581b1b150a4d

* copy to sonic-annotator
author Chris Cannam
date Thu, 11 Dec 2008 10:22:33 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:581b1b150a4d
1
2 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4 @prefix dc: <http://purl.org/dc/elements/1.1/> .
5 @prefix mo: <http://purl.org/ontology/mo/> .
6 @prefix af: <http://purl.org/ontology/af/> .
7 @prefix event: <http://purl.org/NET/c4dm/event.owl#> .
8 @prefix tl: <http://purl.org/NET/c4dm/timeline.owl#> .
9 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
10 @prefix : <#> .
11
12
13 # Describe the signal we're annotating, and associate it with a
14 # timeline (the timeline is named as :base_timeline but never given
15 # any attributes in this document). Any feature that is associated
16 # with the same timeline will be taken as derived from this signal.
17
18 :audio_signal a mo:Signal ;
19 mo:available_as <file:///path/to/myfile.wav> ;
20 mo:time :signal_interval .
21
22 :signal_interval a tl:Interval ;
23 tl:onTimeLine :base_timeline ;
24 tl:beginsAt "PT0"^^xsd:duration .
25
26
27 # A sparse feature event.
28
29 :event0 a af:Onset ;
30 event:time :time0 .
31
32 :time0 a tl:Instant ;
33 tl:onTimeLine :base_timeline ;
34 tl:at "PT0.185759637S"^^xsd:duration .
35
36 # Alternatively we could write that with a blank node.
37
38 :event1 a af:Onset ;
39 event:time [
40 a tl:Instant ;
41 tl:onTimeLine :base_timeline ;
42 tl:at "PT0.510839002S"^^xsd:duration ;
43 ] .
44
45
46 # For a dense feature, we need an appropriately sampled, windowed timeline.
47
48 :feature_timeline a tl:DiscreteTimeLine .
49
50 :feature_timeline_map a tl:UniformSamplingWindowingMap ;
51 tl:rangeTimeLine :feature_timeline ;
52 tl:domainTimeLine :base_timeline ;
53 tl:sampleRate "44100"^^xsd:int ;
54 tl:windowLength "1024"^^xsd:int ;
55 tl:hopSize "512"^^xsd:int .
56
57
58 # ... and an interval, defined in terms of hops (the discrete steps of
59 # the windowed timeline).
60
61 :feature_interval a tl:Interval ;
62 tl:onTimeLine :feature_timeline ;
63 tl:beginsAt "0"^^xsd:int ;
64 tl:duration "5634"^^xsd:int .
65
66
67 # Then our feature is a signal that is on the interval we just
68 # described. We associate it explicitly with the original audio
69 # signal, although presumably we could leave the association implicit,
70 # to be derived from the relationships between timelines, just as it
71 # is for the sparse features above.
72
73 :audio_signal af:signal_feature :feature1 .
74
75 :feature_signal_type rdfs:subClassOf af:DetectionFunction ;
76 dc:title "Detection Function from Simple Percussion Onset Detector" .
77
78 :feature1 a :feature_signal_type ;
79 mo:time :feature_interval ;
80 af:dimensions "12 12345" ;
81 af:value "0 0 0 0 0 0 0 1 2 3 1 24 236 123213 (etc)" .
82