[LV2] how to supply a large number of factory presets with a plug-in

David Robillard d at drobilla.net
Sun Mar 31 10:31:40 PDT 2013

On Sat, 2013-03-30 at 16:02 +0000, Nick Dowell wrote:
> Hi all,
> I have been working on bringing amsynth (a software synth) to LV2.
> The standalone version of amsynth currently has around 900 presets,
> organised into banks, and I would like to make all of these accessible
> to users of the LV2 version.
> Unless I have missed something, there is no way to organise presets
> (and, as an aside; there is no way in the UI to tell whether a preset
> is a factory preset or user preset) so if I were to to ahead and supply
> all the presets, I think the preset selection UI (drop-down menu) would
> become unmanageable.
> Am I approaching this the wrong way (perhaps I should be looking into
> programs ratherthan presets?) or is LV2 not ready to handle thismany
> presets right now?
> Any guidance would be welcome!

There are no grouping predicates at this time.  Most GUIs will sanely
break up large menus, but 900 is quite a bit.

Assuming presets can describe your settings, presets is what you want.
There isn't a standard concept of "programs" to move to anyway, and
moving to a non-standard alternative certainly isn't going to make your
host support situation *better*.

We should probably a way to group presets, into what I guess would be
called a "bank".  Two options: as a predicate on the preset, or as
collections of presets.  The latter is maybe better, since you could
group presets defined elsewhere into banks without modifying their
descriptions (users could make their own banks, even), which is also
more backwards compatible (you could just add a bank file).

Something like

    a pset:Bank ;
    rdfs:label "Bank of Americon" ;
    pset:preset <http://example.org/preset1> ,
        <http://example.org/preset2> ,
        <http://example.org/preset3> .

or, if we want ordered

    a pset:Bank ;
    rdfs:label "Bank of Americon" ;
    pset:bankEntry [
        pset:preset <http://example.org/preset1> ;
        lv2:index 0 ;
    ] , [
        pset:preset <http://example.org/preset2> ;
        lv2:index 1 ;
    ] .

The latter probably will mesh better with MIDI programs in the future.
The alternative is to have a preset associated with one and only one
bank, and do

    a pset:Preset ;
    rdfs:label "Postget" ;
    lv2:appliesTo eg:myplugin ;
    pset:bank <http://example.org/somebank> ;
    lv2:index 0 ;
    lv2:port [
        lv2:symbol "volume1" ;
        pset:value 11.0
    ] , [
        lv2:symbol "volume2" ;
        pset:value 11.0
    ] .



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20130331/e209bdd2/attachment-0002.pgp>

More information about the Devel mailing list