[LV2] Plugin instance ID

David Robillard d at drobilla.net
Tue Oct 20 05:17:33 PDT 2020


On Sun, 2020-09-27 at 13:37 +0200, Hermann Meyer wrote:
> 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.

Agreed in general, whatever your plugins wants to be its state can be
its state.

The odd thing about this situation to me is that it's really UI state,
and presumably the plugin itself doesn't care about it at all.  Is that
the weirdness that makes you hesitate?  We *could* have a mechanism for
this, but AFAIK nobody has done it.  It's sort of an offshoot of the
fact that we haven't really figured out multiple UIs for a plugin well
yet...

-- 
dr




More information about the Devel mailing list