[LV2] Plugin instance ID

Iurie Nistor iur.nistor at gmail.com
Sun Sep 27 04:18:51 PDT 2020

I am implementing a sampler browser for the plugin UI. When the user will

open the sample browser it has to load the list of files from the last 
visited path.

If the user opens the UI of another plugin instance its sample browser 
might point

to a different folder of samplers (for user convenience). Where and how 
to store this

last paths for every plugin instance? How do I reuse them correctly

after the host is restarted? When the plugin instance is created the 
instance doesn't know

where to find its browser settings and more important which one belongs 
to this instance except looking into

its own saved state... but I don't think is would be good to store this 
path into the LV2 state.

On 9/27/20 1:29 PM, David Robillard wrote:
> Hosts must not mess around with plugin state itself like this.
> This conversation seems to be confusing LV2 state, as used by the
> plugin itself, and host-specific things.  Pretty much any non-trivial
> host needs to store things about a plugin instance aside from the
> plugin state itself.  This stuff is host-specific and needs to live
> somewhere else.  For example Ardour stores things about plugin
> instances in the session XML file, Ingen stores it in the graph Turtle
> file, etc.
> There is no standard identifier for a plugin instance in LV2.  Hosts
> can use whatever.  For example, Ardour uses 64-bit integers, Ingen uses
> paths, etc.  The plugin itself doesn't need to know about this.

More information about the Devel mailing list