On 03/04/11 07:25 AM, Rui Nuno Capela wrote: > On 04/03/2011 04:19 AM, David Robillard wrote: >> Hello, >> >> I have been working on resolving fragmentation among LV2 implementations >> of plugin state persistence. The most recent / hopefully best extensions >> are: >> >> http://lv2plug.in/ns/ext/persist <http://lv2plug.in/ns/ext/files/> >> http://lv2plug.in/ns/ext/files <http://lv2plug.in/ns/ext/files/> >> >> This is implemented in the latest Ardour3 SVN. >> >> Attached is a patch for LinuxSampler that works with Ardour3 (at least >> as far as I have tested, e.g. you can load the plugin, load a bunch of >> sample banks, save the session, quit ardour, and reload the session, to >> have the sampler state successfully restored). >> >> I have added a touch of API to Plugin to allow mapping of all filenames >> in the state string. This will allow the host to make a 'deep export' of >> LS plugin state for distribution/archival/etc. All other changes are >> local to PluginLv2. >> >> These extensions are still provisional, feedback on them is welcome >> (when they are implemented in at least one other plugin and host (I'll >> probably do QTractor) and any issues people bring up have been >> addressed, then they will become stable/released). >> > > hi Dave, > > please take today's qtractor svn trunk r1936+ (0.4.8.58) as a starting > point for your review. > > i have done the lv2_persist update myself on a hurry and knee-jerk > reaction--i'm not that sure whether it is compliant to your standards > :) please have a look and tell what you find wrong.
Looks more or less okay, though I don't think using a hash for the URI map is correct. You could get clashes which will mess everything up. I use a (tree-based) map (e.g. std::map) and just use the size as a new ID if the URI isn't in the map yet. > which lv2 plugins are using the new lv2_persist extension? So far, only Calf in git AFAIK. I know others have been waiting for the multiple extensions for persistence thing to be sorted out though... > otoh, how does this new lv2_files extension relate to the old (and > probably deprecated) lv2_saverestore ?? afaik, lv2_saverestore was > already implemented on linuxsampler _and_ qtractor, long ago ... > Saverestore works based on files only. Persist (originally proposed by Krysztof Foltman and Leonard Ritter) uses key/value instead. One of the nice things about this is it lets hosts work with plugin state quickly in memory, which is useful for e.g. cloning plugin instances, undo, etc. It will also mesh well with upcoming stuff to dynamically manipulate plugin state (i.e. high level message based plugin control). It's also much nicer for simple plugins that don't have or want to define a file format (and we definitely don't want to encourage people to invent half-baked file formats) The files extension lets you use files within the persist extension's key/value mechanism. It's carefully defined to allow plugin state to contain references to files (private or elsewhere on the system) while still allowing the host to do a deep export of sessions (including contained plugin state) for archival or distribution. -dr ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel