From d5d6a9529d9ee0d5e8d8db96fb0015f0e9222bcf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 15 Feb 2020 14:54:08 +0100 Subject: 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. --- plugins/eg-params.lv2/params.ttl | 6 +++--- 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 ; - 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: . @prefix doap: . @prefix lv2: . +@prefix param: . @prefix patch: . @prefix rdfs: . @prefix state: . @prefix ui: . @prefix urid: . @prefix work: . -@prefix param: . +@prefix xsd: . a lv2:Parameter ; @@ -57,7 +58,7 @@ ] ; state:state [ ; - param:gain 1.0 + param:gain "1.0"^^xsd:float ] . -- cgit v1.2.1