[LV2] Storing binary data chunks without duplication

Stefan Westerfeld stefan at space.twc.de
Thu May 9 08:37:03 PDT 2019


For my LV2 plugin, as a part of storing plugin state, I'd like to store one or
more large chunks of binary data containing instrument descriptions (samples +
meta data).

I tried two solutions. The first would be using LV2_STATE__makePath during my
save function. I can store my binary instrument chunks as files, but Ardour
stores a new copy of each instrument chunk each time the user saves the session
and any part of the plugin state changed. Since these binary chunks are large,
this is not desirable.

The other solution I could think of would be to use LV2_ATOM__Chunk and store
the binary data as property in the state. This also stores the chunks again and
again, making it waste much more space than strictly needed.

Is there a way to save large custom binary data chunks into the session without
duplicating data on each save?

   Cu... Stefan
Stefan Westerfeld, http://space.twc.de/~stefan

More information about the Devel mailing list