diff options
author | David Robillard <d@drobilla.net> | 2020-02-15 14:54:08 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-16 12:01:54 +0100 |
commit | d5d6a9529d9ee0d5e8d8db96fb0015f0e9222bcf (patch) | |
tree | 642798fa0feee0a6aca80b7f85b90c4d582aaa15 | |
parent | 4c650dfeae00cd9af55e24b5a40feec3212c1f99 (diff) | |
download | lv2-d5d6a9529d9ee0d5e8d8db96fb0015f0e9222bcf.tar.xz |
Make parameter data validate
This is rather annoying, but unfortunately xsd:decimal is not a related type to
xsd:float. A future smarter version of the validator will be able to deal with
this, but for now we'll have to be explicit and tolerate a bit of unpleasant
syntactic noise.
-rw-r--r-- | plugins/eg-params.lv2/params.ttl | 6 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/sampler.ttl | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/plugins/eg-params.lv2/params.ttl b/plugins/eg-params.lv2/params.ttl index dbcf6aa..931c826 100644 --- a/plugins/eg-params.lv2/params.ttl +++ b/plugins/eg-params.lv2/params.ttl @@ -116,11 +116,11 @@ plug:spring state:state [ plug:int 0 ; plug:long "0"^^xsd:long ; - plug:float 0.1234 ; + plug:float "0.1234"^^xsd:float ; plug:double "0e0"^^xsd:double ; plug:bool false ; plug:string "Hello, world" ; plug:path <params.ttl> ; - plug:spring 0.0 ; - plug:lfo 0.0 + plug:spring "0.0"^^xsd:float ; + plug:lfo "0.0"^^xsd:float ] . diff --git a/plugins/eg-sampler.lv2/sampler.ttl b/plugins/eg-sampler.lv2/sampler.ttl index 92570e5..960276a 100644 --- a/plugins/eg-sampler.lv2/sampler.ttl +++ b/plugins/eg-sampler.lv2/sampler.ttl @@ -1,13 +1,14 @@ @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 rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix state: <http://lv2plug.in/ns/ext/state#> . @prefix ui: <http://lv2plug.in/ns/extensions/ui#> . @prefix urid: <http://lv2plug.in/ns/ext/urid#> . @prefix work: <http://lv2plug.in/ns/ext/worker#> . -@prefix param: <http://lv2plug.in/ns/ext/parameters#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://lv2plug.in/plugins/eg-sampler#sample> a lv2:Parameter ; @@ -57,7 +58,7 @@ ] ; state:state [ <http://lv2plug.in/plugins/eg-sampler#sample> <click.wav> ; - param:gain 1.0 + param:gain "1.0"^^xsd:float ] . <http://lv2plug.in/plugins/eg-sampler#ui> |