[LV2] Plugin instance ID

Hermann Meyer brummer- at web.de
Sun Sep 27 04:37:17 PDT 2020


Am 27.09.20 um 13:18 schrieb Iurie Nistor:
> 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.


Again, why not. A host will load your plugin, and to reflect a special
instance, it will load a (kind of) preset into the plugin. When you make
your Path part of this preset (saved with LV2 state) you've got it back
on restart. Your plugin didn't need to know which instance it should be,
the host need to know that and which data it should send to the plugin
so that it reflect this instance.



More information about the Devel mailing list