# LV2 Time Extension
# Copyright 2011-2012 David Robillard <d@drobilla.net>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

@prefix time: <http://lv2plug.in/ns/ext/time#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2:  <http://lv2plug.in/ns/lv2core#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .

<http://lv2plug.in/ns/ext/time>
	a lv2:Specification ;
	rdfs:seeAlso <time.h> ,
		<../../people/people.ttl> ;
	doap:name "LV2 Time" ;
	doap:shortdesc "Properties for describing time." ;
	doap:release [
		doap:revision "0.2" ;
		doap:created "2012-02-28" ;
	] ;
	doap:developer <http://drobilla.net/drobilla#me> ;
	lv2:documentation """
<p>This is a vocabulary for precisely describing a position in time and the
passage of time itself, in both real and musical terms.</p>

<p>In addition to real time (e.g. seconds), two units of time are used:
<q>frames</q> and <q>beats</q>.  A frame is a numbered quantum of time.  Frame
time is related to real-time by the <q>frame rate</q> or <q>sample rate</q>, <a
href="#framesPerSecond">time:framesPerSecond</a>.  A beat is a single pulse of
musical time.  Beat time is related to real-time by the <q>tempo</q>, <a
href="#beatsPerMinute">time:beatsPerMinute</a>.</p>

<p>Musical time additionally has a <q>meter</q> which describes passage of time
in terms of musical <q>bars</q>.  A bar is a higher level grouping of beats.
The meter describes how many beats are in one bar.</p>
""" .

time:Time
	a rdfs:Class ;
    rdfs:subClassOf time:Position ;
	rdfs:label "A point in time" ;
	rdfs:comment "A point in time in some unit/dimension." .

time:Position
	a rdfs:Class ;
	lv2:documentation """
<p>A point in time and/or the speed at which time is passing.  A position is
both a point and a speed, which precisely defines a time within a timeline.</p>
""" .

time:Rate
	a rdfs:Class ;
    rdfs:subClassOf time:Position ;
	rdfs:label "Rate" ;
	lv2:documentation """
<p>The rate of passage of time in terms of one unit with respect to
another.</p> """ .

time:position
	a rdf:Property ;
	rdfs:range time:Position ;
	rdfs:label "Position in time" .

time:barBeat
	a rdf:Property ;
	rdfs:domain time:Time ;
	rdfs:range xsd:float ;
	rdfs:label "Beat within this bar" ;
	rdfs:comment "The beat number within the bar, from 0 to beatsPerBar." .

time:bar
	a rdf:Property ;
	rdfs:domain time:Time ;
	rdfs:range xsd:long ;
	rdfs:label "Global position in bars" .

time:beat
	a rdf:Property ;
	rdfs:domain time:Time ;
	rdfs:range xsd:double ;
	rdfs:label "Global position in beats" .

time:beatUnit
	a rdf:Property ;
	rdfs:domain time:Rate ;
	rdfs:range xsd:double ;
	lv2:documentation """
<p>Beat unit, the note value that counts as one beat.  This is the bottom number
in a time signature: 2 for half note, 4 for quarter note, and so on.</p>
""" .

time:beatsPerBar
	a rdf:Property ;
	rdfs:domain time:Rate ;
	rdfs:range xsd:float ;
	rdfs:label "Beats per bar" .

time:beatsPerMinute
	a rdf:Property ;
	rdfs:domain time:Rate ;
	rdfs:range xsd:float ;
	rdfs:label "Beats per minute" ;
	rdfs:comment "Tempo in beats per minute." .

time:frame
	a rdf:Property ;
	rdfs:domain time:Time ;
	rdfs:range xsd:long ;
	rdfs:label "Global position in frames" .

time:framesPerSecond
	a rdf:Property ;
	rdfs:domain time:Rate ;
	rdfs:range xsd:float ;
	rdfs:label "Frames per second" ;
	rdfs:comment "Frame rate in frames per second." .

time:speed
	a rdf:Property ;
	rdfs:domain time:Rate ;
	rdfs:range xsd:float ;
	rdfs:label "Speed" ;
	lv2:documentation """
<p>The rate of the progress of time as a fraction of normal speed.  For
example, a rate of 0.0 is stopped, 1.0 is rolling at normal speed, 0.5 is
rolling at half speed, -1.0 is reverse, and so on.
</p>
""" .