<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Am 25.08.20 um 19:11 schrieb Iurie
Nistor:<br>
</div>
<blockquote type="cite"
cite="mid:8123435c-1d3d-14da-a9fb-81a7f49a581b@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi,</p>
<p>I think there would be a problem if I'll save this kind of data
into the state (as mentioned by Hanspeter Portner).</p>
<p>When this state is saved as a preset by the host it will become
shareable, and this data is not relevant to be shared.</p>
<p>Probably, also I'll have to notify the host about change of the
UI (for example, change of file browser directory). <br>
</p>
<p>The user may or may not save the sate when will close the host.</p>
<p>Thus, I think is not good for settings that needs to be saved
for sure.</p>
<p>I need something the identifies the plugin instance. For
example, when the host</p>
<p>loads the first time the plugin state it knows somehow for
which plugins which state to get from the <br>
</p>
<p>disk. Thus, somewhere is kept a kind of a ID about the plugin
instance.</p>
<p><br>
</p>
</blockquote>
<p>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.
<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:8123435c-1d3d-14da-a9fb-81a7f49a581b@gmail.com">
<p> </p>
<p>What I want to do is to permit users to be able to load easily
sound samples into the plugin,</p>
<p> and keep in a settings file at <code class="literal">$XDG_CONFIG_HOME/pluginname</code>
the last visited path/soundsample for every plugin instance.</p>
</blockquote>
<p>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)<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:8123435c-1d3d-14da-a9fb-81a7f49a581b@gmail.com">
<p>The next time when the user will open the sample browser it
will open the last visited path (even if the host was
restarted).<br>
</p>
<p>Best,</p>
<p>Iurie<br>
</p>
<div class="moz-cite-prefix">On 8/25/20 2:57 PM, Vladimir
Sadovnikov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:eba49d30-0f61-1c23-7814-b217b1cb325b@gmail.com">Hello
Iurie! <br>
<br>
No, you need to use State interface to save/restore state of the
plugin. <br>
Probably it would be good to have the State interface for the UI
to separate DSP state from UI state. <br>
<br>
Best, <br>
Vladimir <br>
<br>
25.08.2020 14:28, Iurie Nistor пишет: <br>
<blockquote type="cite">Hi, <br>
<br>
Is there a way I can get the LV2 plugin instance ID? I mean
when <br>
<br>
the user adds the plugin into the track, is there any ID
associated to this added instance, and <br>
<br>
remains the same even after restarting the host? <br>
<br>
<br>
I want to use this ID to store settings about the plugin
instance. Actually, this can be stored <br>
<br>
into the plugin state, but I am not sure if this is right
because I want to store things like <br>
<br>
last directory visited by the user when browsing (with plugin
UI) presets <br>
<br>
or samples, and this to be saved per plugin instance. <br>
<br>
<br>
Iurie <br>
<br>
_______________________________________________ <br>
Devel mailing list <br>
<a class="moz-txt-link-abbreviated"
href="mailto:Devel@lists.lv2plug.in" moz-do-not-send="true">Devel@lists.lv2plug.in</a>
<br>
<a class="moz-txt-link-freetext"
href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in"
moz-do-not-send="true">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a>
<br>
</blockquote>
<br>
<br>
_______________________________________________ <br>
Devel mailing list <br>
<a class="moz-txt-link-abbreviated"
href="mailto:Devel@lists.lv2plug.in" moz-do-not-send="true">Devel@lists.lv2plug.in</a>
<br>
<a class="moz-txt-link-freetext"
href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in"
moz-do-not-send="true">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a>
<br>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.lv2plug.in">Devel@lists.lv2plug.in</a>
<a class="moz-txt-link-freetext" href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a>
</pre>
</blockquote>
</body>
</html>