# LV2 Presets

Presets for LV2 plugins.

ID | http://lv2plug.in/ns/ext/presets
Version | 2.8
Discuss | devel@lists.lv2plug.in (subscribe)

- Index
- API

This is a vocabulary for LV2 plugin presets, that is, named sets of control values and possibly other state. The structure of a 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:

    eg:mypreset
        a             pset:Preset ;
        lv2:appliesTo eg:myplugin ;
        rdfs:seeAlso  <mypreset.ttl> .

## Index

Classes | Properties
--- | ---
Bank Preset | bank preset value

## Classes

### Bank

Class

Label | Bank
In range of | bank

A bank of presets.

Restriction on rdfs:label
  owl:minCardinality 1
  A Bank MUST have at least one string rdfs:label.

### Preset

Class

Label | Preset
Subclass of | lv2:PluginBase
In domain of | bank
In range of | preset

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:

    @prefix eg: <http://example.org/> .

    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 value property.

Hosts SHOULD save user presets to a bundle in the user-local LV2 directory (for example `~/.lv2`) with a name like `<Plugin_Name>_<Preset_Name>.preset.lv2` (for example `LV2_Amp_At_Eleven.preset.lv2`), where names are transformed to be valid LV2 symbols for maximum compatibility.

Restriction on rdfs:label
  owl:minCardinality 1
  A Preset MUST have at least one string rdfs:label.

## Properties

### bank

Property

Label | bank
Domain | Preset
Range | Bank
Type | Object Property

The bank this preset belongs to.

### preset

Property

Label | preset
Domain | lv2:PluginBase
Range | Preset
Type | Object Property

The preset currently applied to a plugin instance.

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.

### value

Property

Label | value
Domain | lv2:PortBase
Type | Datatype Property

The value of a port in a preset.

This property is used in a similar way to lv2:default.