aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in/ns
diff options
context:
space:
mode:
Diffstat (limited to 'lv2/lv2plug.in/ns')
-rw-r--r--lv2/lv2plug.in/ns/ext/time/manifest.ttl2
-rw-r--r--lv2/lv2plug.in/ns/ext/time/time.h112
-rw-r--r--lv2/lv2plug.in/ns/ext/time/time.ttl123
3 files changed, 119 insertions, 118 deletions
diff --git a/lv2/lv2plug.in/ns/ext/time/manifest.ttl b/lv2/lv2plug.in/ns/ext/time/manifest.ttl
index 2657388..6d529b3 100644
--- a/lv2/lv2plug.in/ns/ext/time/manifest.ttl
+++ b/lv2/lv2plug.in/ns/ext/time/manifest.ttl
@@ -4,6 +4,6 @@
<http://lv2plug.in/ns/ext/time>
a lv2:Specification ;
lv2:minorVersion 0 ;
- lv2:microVersion 1 ;
+ lv2:microVersion 2 ;
rdfs:seeAlso <time.ttl> .
diff --git a/lv2/lv2plug.in/ns/ext/time/time.h b/lv2/lv2plug.in/ns/ext/time/time.h
index f3b2e77..3bb0614 100644
--- a/lv2/lv2plug.in/ns/ext/time/time.h
+++ b/lv2/lv2plug.in/ns/ext/time/time.h
@@ -22,107 +22,25 @@
#ifndef LV2_TIME_H
#define LV2_TIME_H
-#include <stdint.h>
-
#ifdef __cplusplus
extern "C" {
#endif
-/**
- Time states.
-*/
-typedef enum {
- LV2_TIME_STOPPED = 0, /**< Transport halted */
- LV2_TIME_ROLLING = 1, /**< Transport playing */
-} LV2_Time_State;
-
-/**
- Bits indicating properties of an LV2_Time_Position.
-*/
-typedef enum {
- LV2_TIME_HAS_BBT = 1 /**< Has Bar, Beat, Tick */
-} LV2_Time_Flags;
-
-/**
- Description of a position and/or tempo.
-
- This struct is used as the payload of an event to notify the plugin about
- time state, such as position and tempo.
-*/
-typedef struct {
- /**
- @{
- @name Mandatory Fields
- */
-
- /**
- Frame number on the timeline.
- */
- uint64_t frame;
-
- /**
- Bit field of LV2_Time_Flags values indicating which fields
- of this struct are valid.
- */
- uint32_t flags;
-
- /**
- Transport state.
- */
- LV2_Time_State state;
-
- /**
- @}
- @{
- @name LV2_TIME_BBT fields
- These fields are valid iff the LV2_TIME_BBT bit is set in @ref flags.
- */
-
- /**
- Current bar.
- The first bar is number 0 (but should be represented in a UI as bar 1).
- */
- int64_t bar;
-
- /**
- Beat within the current bar.
- The first beat is number 0.
- Always <= @ref beats_per_bar.
- */
- int32_t beat;
-
- /**
- Tick within the current beat.
- The first tick is number 0.
- Always <= @ref ticks_per_beat.
- */
- int32_t tick;
-
- /**
- Number of beats per bar (top of time signature).
- */
- int32_t beats_per_bar;
-
- /**
- Type of note that counts as one beat (bottom of time signature).
- */
- int32_t beat_type;
-
- /**
- Number of ticks per beat.
- Typically this is a large integer with many even divisors.
- */
- int32_t ticks_per_beat;
-
- /**
- Current tempo, in beats per minute.
- */
- double beats_per_minute;
-
- /**
- @}
- */
-} LV2_Time_Position;
+#define LV2_TIME_URI "http://lv2plug.in/ns/ext/time"
+
+#define LV2_TIME__Time LV2_TIME_URI "#Time"
+#define LV2_TIME__Position LV2_TIME_URI "#Position"
+#define LV2_TIME__Rate LV2_TIME_URI "#Rate"
+#define LV2_TIME__position LV2_TIME_URI "#position"
+#define LV2_TIME__barBeat LV2_TIME_URI "#barBeat"
+#define LV2_TIME__bar LV2_TIME_URI "#bar"
+#define LV2_TIME__beat LV2_TIME_URI "#beat"
+#define LV2_TIME__beatUnit LV2_TIME_URI "#beatUnit"
+#define LV2_TIME__beatsPerBar LV2_TIME_URI "#beatsPerBar"
+#define LV2_TIME__beatsPerMinute LV2_TIME_URI "#beatsPerMinute"
+#define LV2_TIME__frame LV2_TIME_URI "#frame"
+#define LV2_TIME__framesPerSecond LV2_TIME_URI "#framesPerSecond"
+#define LV2_TIME__speed LV2_TIME_URI "#speed"
#ifdef __cplusplus
} /* extern "C" */
diff --git a/lv2/lv2plug.in/ns/ext/time/time.ttl b/lv2/lv2plug.in/ns/ext/time/time.ttl
index 40bfdbb..41611ac 100644
--- a/lv2/lv2plug.in/ns/ext/time/time.ttl
+++ b/lv2/lv2plug.in/ns/ext/time/time.ttl
@@ -1,5 +1,5 @@
# LV2 Time Extension
-# Copyright 2011 David Robillard <d@drobilla.net>
+# 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
@@ -24,34 +24,117 @@
<http://lv2plug.in/ns/ext/time>
a lv2:Specification ;
doap:name "LV2 Time" ;
- doap:shortdesc "A data type for transport speed and position." ;
+ doap:shortdesc "Properties for describing time." ;
doap:maintainer [
a foaf:Person ;
foaf:name "David Robillard" ;
foaf:homepage <http://drobilla.net/> ;
- rdfs:seeAlso <http://drobilla.net/drobilla.rdf>
+ rdfs:seeAlso <http://drobilla.net/drobilla.rdf> ;
] ;
lv2:documentation """
-<p>This extension defines a structure type, LV2_Time_Position, which
-describes a tempo and position along a timeline. This can be used as
-an event payload by the host to notify plugins about the current
-tempo and position.</p>
+<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 ;
- rdfs:label "LV2 time position" ;
lv2:documentation """
-<p>Type for an LV2_Time_Position struct. This can be mapped to an integer and
-used as the type field of an event to indicate that the event payload is an
-LV2_Time_Positon struct. Plugins SHOULD indicate that a port supports time
-information using the ev:supports predicate, e.g.:</p>
-<pre class="turtle-code">
-&lt;plugin&gt; lv2:port [
- a lv2:InputPort , ev:EventPort ;
- lv2:name "control" ;
- lv2:index 0 ;
- ev:supportsEvent time:Position
-] .
-</pre>
+<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>
""" .