1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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
] .
|