Re: [LAD] RFC: LV2 state

From: David Robillard <d@email-addr-hidden>
Date: Thu Nov 24 2011 - 19:26:42 EET

On Thu, 2011-11-24 at 13:45 +0100, Philipp Überbacher wrote:
> Excerpts from David Robillard's message of 2011-11-23 20:26:49 +0100:
> > Here is the current version of the LV2 state extension, which defines
> > the model for plugin state, and a mechanism for saving and restoring it:
> >
> > http://lv2plug.in/ns/ext/state
[...]
> The obvious question is: are there plugins where the state is not
> completely described by their port values? I guess Rudolf 556 could be
> such a thing. Any lv2 sampler would likely need to store paths and
> wouldn't usually expose them (I guess). They'd simply need a different
> extension. The question is whether there are many such cases in
> existence.

... hm? That is the entire point of this extension.

From the opening paragraph:

The intention is for a plugin instance's state to be completely
described by port values (as with all LV2 plugins) *** and a simple
dictionary ***.

An extension is not needed for storing port values, hosts already have
access to those.

> Also regarding paths, what about windows paths and stuff like that? As
> far as I understand the extension, the plugin stores any kind of path,
> a host would need to handle the conversion from one path format to
> another, correct?
>
> I'm pretty much talking out of my arse here.. just to break the silence
> :)

The host gets the opportunity to map paths in any way it pleases. You
can leave them be, map them to indexes into a table of actual file
paths, etc. Sessions that contain absolute paths aren't portable to
other system anyway, since the files referred to might not be there on
somebody else's computer, even if they are running the same operating
system.

Ardour uses this facility to create symbolic links in the plugin's state
directory that point to the absolute path. e.g.

/mysession/plugins/123/sample.wav -> /home/whoever/samples/sample.wav

The nice thing about this is that any stupid tool, like tar, can be used
to archive and distribute self-contained sessions. It's also easy to
see what went wrong and fix it manually in the shell or file manager (If
you moved your samples directory, for example). I recommend this
strategy to all plugins and hosts, having absolute paths buried in some
file in who knows what syntax is evil, particularly considering the fact
that we have session storage for apps as well.

-dr

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Thu Nov 24 20:15:03 2011

This archive was generated by hypermail 2.1.8 : Thu Nov 24 2011 - 20:15:03 EET