aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg-params.lv2/params.ttl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/eg-params.lv2/params.ttl')
-rw-r--r--plugins/eg-params.lv2/params.ttl124
1 files changed, 124 insertions, 0 deletions
diff --git a/plugins/eg-params.lv2/params.ttl b/plugins/eg-params.lv2/params.ttl
new file mode 100644
index 0000000..9777382
--- /dev/null
+++ b/plugins/eg-params.lv2/params.ttl
@@ -0,0 +1,124 @@
+@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix param: <http://lv2plug.in/ns/ext/parameters#> .
+@prefix patch: <http://lv2plug.in/ns/ext/patch#> .
+@prefix plug: <http://lv2plug.in/plugins/eg-params#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix state: <http://lv2plug.in/ns/ext/state#> .
+@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+# An existing parameter or RDF property can be used as a parameter. The LV2
+# parameters extension <http://lv2plug.in/ns/ext/parameters> defines many
+# common audio parameters. Where possible, existing parameters should be used
+# so hosts can intelligently control plugins.
+
+# If no suitable parameter exists, one can be defined for the plugin like so:
+
+plug:int
+ a lv2:Parameter ;
+ rdfs:label "int" ;
+ rdfs:range atom:Int .
+
+plug:long
+ a lv2:Parameter ;
+ rdfs:label "long" ;
+ rdfs:range atom:Long .
+
+plug:float
+ a lv2:Parameter ;
+ rdfs:label "float" ;
+ rdfs:range atom:Float .
+
+plug:double
+ a lv2:Parameter ;
+ rdfs:label "double" ;
+ rdfs:range atom:Double .
+
+plug:bool
+ a lv2:Parameter ;
+ rdfs:label "bool" ;
+ rdfs:range atom:Bool .
+
+plug:string
+ a lv2:Parameter ;
+ rdfs:label "string" ;
+ rdfs:range atom:String .
+
+plug:path
+ a lv2:Parameter ;
+ rdfs:label "path" ;
+ rdfs:range atom:Path .
+
+plug:lfo
+ a lv2:Parameter ;
+ rdfs:label "LFO" ;
+ rdfs:range atom:Float ;
+ lv2:minimum -1.0 ;
+ lv2:maximum 1.0 .
+
+plug:spring
+ a lv2:Parameter ;
+ rdfs:label "spring" ;
+ rdfs:range atom:Float .
+
+# Most of the plugin description is similar to the others we have seen, but
+# this plugin has only two ports, for receiving and sending messages used to
+# manipulate and access parameters.
+<http://lv2plug.in/plugins/eg-params>
+ a lv2:Plugin ,
+ lv2:UtilityPlugin ;
+ doap:name "Example Parameters" ;
+ doap:license <http://opensource.org/licenses/isc> ;
+ lv2:project <http://lv2plug.in/ns/lv2> ;
+ lv2:requiredFeature urid:map ;
+ lv2:optionalFeature lv2:hardRTCapable ,
+ state:loadDefaultState ;
+ lv2:extensionData state:interface ;
+ lv2:port [
+ a lv2:InputPort ,
+ atom:AtomPort ;
+ atom:bufferType atom:Sequence ;
+ atom:supports patch:Message ;
+ lv2:index 0 ;
+ lv2:symbol "in" ;
+ lv2:name "In"
+ ] , [
+ a lv2:OutputPort ,
+ atom:AtomPort ;
+ atom:bufferType atom:Sequence ;
+ atom:supports patch:Message ;
+ lv2:index 1 ;
+ lv2:symbol "out" ;
+ lv2:name "Out"
+ ] ;
+# The plugin must list all parameters that can be written (e.g. changed by the
+# user) as patch:writable:
+ patch:writable plug:int ,
+ plug:long ,
+ plug:float ,
+ plug:double ,
+ plug:bool ,
+ plug:string ,
+ plug:path ,
+ plug:spring ;
+# Similarly, parameters that may change internally must be listed as patch:readable,
+# meaning to host should watch for changes to the parameter's value:
+ patch:readable plug:lfo ,
+ plug:spring ;
+# Parameters map directly to properties of the plugin's state. So, we can
+# specify initial parameter values with the state:state property. The
+# state:loadDefaultState feature (required above) requires that the host loads
+# the default state after instantiation but before running the plugin.
+ state:state [
+ plug:int 0 ;
+ plug:long "0"^^xsd:long ;
+ plug:float 0.1234 ;
+ plug:double "0.0"^^xsd:double ;
+ plug:bool false ;
+ plug:string "Hello, world" ;
+ plug:path <params.ttl> ;
+ plug:spring 0.0 ;
+ plug:lfo 0.0
+ ] .