aboutsummaryrefslogtreecommitdiffstats
path: root/ext/variables.lv2/variables.ttl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/variables.lv2/variables.ttl')
-rw-r--r--ext/variables.lv2/variables.ttl118
1 files changed, 118 insertions, 0 deletions
diff --git a/ext/variables.lv2/variables.ttl b/ext/variables.lv2/variables.ttl
new file mode 100644
index 0000000..b7d1b8c
--- /dev/null
+++ b/ext/variables.lv2/variables.ttl
@@ -0,0 +1,118 @@
+# LV2 Variables Extension
+# Copyright (C) 2008 David Robillard
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+@prefix var: <http://lv2plug.in/ns/ext/instance-var#> .
+@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> .
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+<http://lv2plug.in/ns/ext/instance-var> a lv2:Specification ;
+ doap:license <http://usefulinc.com/doap/licenses/mit> ;
+ doap:name "LV2 Instance Variables" ;
+ doap:created "2008-08-18" ;
+ doap:maintainer [
+ a foaf:Person ;
+ foaf:name "David Robillard" ;
+ foaf:homepage <http://drobilla.net/> ;
+ rdfs:seeAlso <http://drobilla.net/drobilla.rdf>
+ ] ;
+ rdfs:comment """
+An extension for setting named/typed variables on an instance of an
+LV2 Plugin (or anything else). A "variable" is really just a (reified)
+RDF statement with an implicit subject (e.g. the plugin instance).
+
+Variables serve as a portable, network transparent, and serialisable
+mechanism for clients (e.g. user interfaces, programs) to control any
+parameter of a running plugin instance. Because variables are 'keyed'
+by URI (the predicate), future extensions can define variables with
+specific meanings or restricted/extended types.
+The value (rdf:value) of a variable may be anything, but hosts or plugins
+aren't guaranteed to support anything other than simple typed literals.
+Serialisation and code access to complex variables is considered outside
+the scope of this extension.
+
+Hosts and plugins SHOULD use the following types for appropriate values:
+
+<table>
+<tr><th>RDF Type</th><th>Data Type</th></tr>
+<tr><td>xsd:string</td><td>string</td></tr>
+<tr><td>xsd:decimal</td><td>floating point number</td></tr>
+<tr><td>xsd:integer</td><td>integer number</td></tr>
+<tr><td>xsd:boolean</td><td>boolean value</td></tr>
+</table>
+
+This extension does not currently define a code mechanism for access
+to variables. A future revision, or a different extension, may.
+
+An example of a plugin with several variables:
+<pre>
+&lt;http://example.org/plugin&gt; a lv2:Plugin ;
+ lv2var:variable [
+ rdf:predicate &lt;http://example.org/greetingology#Greeting&gt; ;
+ rdf:value "Hello, cruel world."
+ ] , [
+ rdf:predicate &lt;http://example.org/matheybits#Coeff&gt; ;
+ rdf:value 1.23456
+ ] , [
+ rdf:predicate &lt;http://example.org/databits#BigValue&gt; ;
+ rdf:value [
+ a somext:Something ;
+ someext:foo "Foo?" ;
+ someext:bar "Bar." ;
+ someext:baz 1234.0
+ ]
+ ] .
+</pre>
+""" .
+
+
+var:Variable a rdfs:Class ;
+ rdfs:label "LV2 Variable" ;
+ rdfs:comment "A typed instance variable." ;
+
+ rdfs:subClassOf [
+ a owl:Restriction ;
+ rdfs:comment "Must have exactly one rdf:predicate which is a resource" ;
+ owl:onProperty rdf:predicate ;
+ owl:cardinality 1 ;
+ owl:allValuesFrom rdfs:Resource
+ ], [
+ a owl:Restriction ;
+ rdfs:comment "Must have exactly one rdf:value (of any type)" ;
+ owl:onProperty rdf:value ;
+ owl:cardinality 1
+ ] .
+
+
+var:variable a owl:ObjectProperty ;
+ rdfs:label "Has a Variable" ;
+ rdfs:range var:Variable ;
+ rdfs:comment """
+Relates an LV2 Variable to some Resource, usually a plugin instance.
+The domain of this property is not restricted, it may be used for anything.
+The range is implicitly an lv2var:Variable, the 'a lv2var:Variable' triple
+is not mandatory.
+""" .
+