[LV2] Plugin instance ID

Hermann Meyer brummer- at web.de
Tue Aug 25 10:38:00 PDT 2020


Am 25.08.20 um 19:11 schrieb Iurie Nistor:
>
> Hi,
>
> I think there would be a problem if I'll save this kind of data into
> the state (as mentioned by Hanspeter Portner).
>
> When this state is saved as a preset by the host it will become
> shareable, and this data is not relevant to be shared.
>
> Probably, also I'll have to notify the host about change of the UI
> (for example, change of file browser directory).
>
> The user may or may not save the sate when will close the host.
>
> Thus, I think is not good for settings that needs to be saved for sure.
>
> I need something the identifies the plugin instance. For example, when
> the host
>
> loads the first time the plugin state it knows somehow for which
> plugins which state to get from the
>
> disk. Thus, somewhere is kept a kind of a ID about the plugin instance.
>
>
Why? Any state is saved as part of a preset. When a host load your
plugin, and this plugin should reflect a 'special instance', the host
will load the given preset into the plugin. Given that the user want to
save this settings, or the host auto save it). So you save the state of
a instance simply as a preset and it will reflect the state of 'a
instance' which the user expect it to be.


> What I want to do is to permit users to be able to load easily sound
> samples into the plugin,
>
> and keep in a settings file at |$XDG_CONFIG_HOME/pluginname| the last
> visited path/soundsample for every plugin instance.
>
Just make your settings part of the preset and ensure that your plug
work well, when the host didn't set this settings (no preset, or preset
without those values/path or what ever)


> The next time when the user will open the sample browser it will open
> the last visited path (even if the host was restarted).
>
> Best,
>
> Iurie
>
> On 8/25/20 2:57 PM, Vladimir Sadovnikov wrote:
>> Hello Iurie!
>>
>> No, you need to use State interface to save/restore state of the plugin.
>> Probably it would be good to have the State interface for the UI to
>> separate DSP state from UI state.
>>
>> Best,
>> Vladimir
>>
>> 25.08.2020 14:28, Iurie Nistor пишет:
>>> Hi,
>>>
>>> Is there a way I can get the LV2 plugin instance ID? I mean when
>>>
>>> the user adds the plugin into the track, is there any ID associated
>>> to this added instance, and
>>>
>>> remains the same even after restarting the host?
>>>
>>>
>>> I want to use this ID to store settings about the plugin instance.
>>> Actually, this can be stored
>>>
>>> into the plugin state, but I am not sure if this is right because I
>>> want to store things like
>>>
>>> last directory visited by the user when browsing (with plugin UI)
>>> presets
>>>
>>> or samples, and this to be saved per plugin instance.
>>>
>>>
>>> Iurie
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at lists.lv2plug.in
>>> http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.lv2plug.in
>> http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
>
> _______________________________________________
> Devel mailing list
> Devel at lists.lv2plug.in
> http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20200825/cbd8833e/attachment-0001.html>


More information about the Devel mailing list