aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/presets
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-22 16:36:44 +0100
committerDavid Robillard <d@drobilla.net>2020-04-10 19:46:04 +0200
commit430284545345539c9ffb31df889debac1d3888b5 (patch)
treedc9bb1f32f0d6fe34a7339221389048e199f14a5 /lv2/presets
parentc4514483da1ab4f49148f9c4fe4ff5b559323217 (diff)
downloadlv2-430284545345539c9ffb31df889debac1d3888b5.tar.xz
Move documentation to metadata files and convert it to Markdown
Diffstat (limited to 'lv2/presets')
-rw-r--r--lv2/presets/presets.meta.ttl73
-rw-r--r--lv2/presets/presets.ttl64
2 files changed, 79 insertions, 58 deletions
diff --git a/lv2/presets/presets.meta.ttl b/lv2/presets/presets.meta.ttl
index 43857f6..cc6d33a 100644
--- a/lv2/presets/presets.meta.ttl
+++ b/lv2/presets/presets.meta.ttl
@@ -1,6 +1,8 @@
@prefix dcs: <http://ontologi.es/doap-changeset#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix pset: <http://lv2plug.in/ns/ext/presets#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://lv2plug.in/ns/ext/presets>
@@ -58,5 +60,74 @@
rdfs:label "Initial release."
]
]
- ] .
+ ] ;
+ lv2:documentation """
+
+This is a vocabulary for LV2 plugin presets, that is, named sets of control
+values and possibly other state. The structure of a pset:Preset is
+deliberately identical to that of an lv2:Plugin, and can be thought of as a
+plugin template or overlay.
+
+Presets may be defined in any bundle, including the plugin's bundle, separate
+third party preset bundles, or user preset bundles saved by hosts. Since
+preset data tends to be large, it is recommended that plugins describe presets
+in a separate file(s) to avoid slowing down hosts. The `manifest.ttl` of a
+bundle containing presets should list them like so:
+
+ :::turtle
+ eg:mypreset
+ a pset:Preset ;
+ lv2:appliesTo eg:myplugin ;
+ rdfs:seeAlso &lt;mypreset.ttl&gt; .
+
+"""^^lv2:Markdown .
+
+pset:Preset
+ lv2:documentation """
+
+The structure of a Preset deliberately mirrors that of a plugin, so existing
+predicates can be used to describe any data associated with the preset. For
+example:
+
+ :::turtle
+ @prefix eg: &lt;http://example.org/&gt; .
+
+ eg:mypreset
+ a pset:Preset ;
+ rdfs:label "One louder" ;
+ lv2:appliesTo eg:myplugin ;
+ lv2:port [
+ lv2:symbol "volume1" ;
+ pset:value 11.0
+ ] , [
+ lv2:symbol "volume2" ;
+ pset:value 11.0
+ ] .
+
+A Preset SHOULD have at least one lv2:appliesTo property. Each Port on a
+Preset MUST have at least a lv2:symbol property and a pset:value property.
+
+Hosts SHOULD save user presets to a bundle in the user-local LV2 directory (for
+example `~/.lv2`) with a name like
+`&lt;Plugin_Name&gt;_&lt;Preset_Name&gt;.preset.lv2` (for example
+`LV2_Amp_At_Eleven.preset.lv2`), where names are transformed to be valid LV2
+symbols for maximum compatibility.
+
+"""^^lv2:Markdown .
+
+pset:value
+ lv2:documentation """
+
+This property is used in a similar way to lv2:default.
+
+"""^^lv2:Markdown .
+
+pset:preset
+ lv2:documentation """
+
+Specifies the preset currently applied to a plugin instance. This property may
+be useful for saving state, or notifying a plugin instance at run-time about a
+preset change.
+
+"""^^lv2:Markdown .
diff --git a/lv2/presets/presets.ttl b/lv2/presets/presets.ttl
index 4803af0..d74f4cf 100644
--- a/lv2/presets/presets.ttl
+++ b/lv2/presets/presets.ttl
@@ -8,26 +8,9 @@
<http://lv2plug.in/ns/ext/presets>
a owl:Ontology ,
lv2:Specification ;
- rdfs:seeAlso <presets.meta.ttl> ;
- lv2:documentation """
-<p>This vocabulary describes a format for presets (i.e. named sets of control
-values and possibly other state) for LV2 plugins. The structure of a
-pset:Preset is deliberately identical to that of an lv2:Plugin, and can be
-thought of as a plugin template or overlay.</p>
-
-<p>Presets may be defined in any bundle, including the plugin's bundle,
-separate third party preset bundles, or user preset bundles saved by hosts.
-Since preset data tends to be large, it is recommended that plugins describe
-presets in a separate file(s) to avoid slowing down hosts. The manifest.ttl of
-a bundle containing presets should list the presets like so:</p>
-
-<pre class="turtle-code">
-eg:mypreset
- a pset:Preset ;
- lv2:appliesTo eg:myplugin ;
- rdfs:seeAlso &lt;mypreset.ttl&gt; .
-</pre>
-""" .
+ rdfs:label "LV2 Presets" ;
+ rdfs:comment "Presets for LV2 plugins." ;
+ rdfs:seeAlso <presets.meta.ttl> .
pset:Bank
a rdfs:Class ;
@@ -44,42 +27,13 @@ pset:Preset
a rdfs:Class ;
rdfs:subClassOf lv2:PluginBase ;
rdfs:label "Preset" ;
+ rdfs:comment "A preset for an LV2 plugin." ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty rdfs:label ;
owl:someValuesFrom xsd:string ;
rdfs:comment "A Preset MUST have at least one string rdfs:label."
- ] ;
- lv2:documentation """
-<p>A Preset for an LV2 Plugin. The structure of a Preset deliberately mirrors that
-of a plugin, so existing predicates can be used to describe any data associated with
-the preset. For example:</p>
-
-<pre class="turtle-code">
-@prefix eg: &lt;http://example.org/&gt; .
-
-eg:mypreset
- a pset:Preset ;
- rdfs:label "One louder" ;
- lv2:appliesTo eg:myplugin ;
- lv2:port [
- lv2:symbol "volume1" ;
- pset:value 11.0
- ] , [
- lv2:symbol "volume2" ;
- pset:value 11.0
- ] .
-</pre>
-
-<p>A Preset SHOULD have at least one lv2:appliesTo property. Each Port on a
-Preset MUST have at least a lv2:symbol property and a pset:value property.</p>
-
-<p>Hosts SHOULD save user presets to a bundle in the user-local LV2 directory
-(e.g. ~/.lv2) with a name like
-<code>&lt;Plugin_Name&gt;_&lt;Preset_Name&gt;.preset.lv2</code>
-(e.g. <code>LV2_Amp_At_Eleven.preset.lv2</code>), where names are transformed
-to be valid LV2 symbols for maximum compatibility.</p>
-""" .
+ ] .
pset:bank
a rdf:Property ;
@@ -92,16 +46,12 @@ pset:value
a rdf:Property ;
rdfs:domain lv2:PortBase ;
rdfs:label "value" ;
- rdfs:comment "Specifies the value of a Port on some Preset. This property is used in a similar way to e.g. lv2:default." .
+ rdfs:comment "The value of a port in a preset." .
pset:preset
a rdf:Property ;
rdfs:domain lv2:PluginBase ;
rdfs:range pset:Preset ;
rdfs:label "preset" ;
- lv2:documentation """
-<p>Specifies the preset currently applied to a plugin instance. This property
-may be useful for saving state, or notifying a plugin instance at run-time
-about a preset change.</p>
-""" .
+ rdfs:comment "The preset currently applied to a plugin instance." .