[LV2] lv2 state#Dirty

Robin Gareus robin at gareus.org
Thu Oct 13 13:19:19 PDT 2016


On 10/13/2016 09:33 PM, Hanspeter Portner wrote:
> On 13.10.2016 16:42, Robin Gareus wrote:
>> Hi LV2ers,
>>
>> If an LV2 plugin has an internal state and that state changes, a host is
>> non the wiser. The host cannot mark the session as dirty (modified,
>> needs save).
>>
>> e.g. Save the session or plugin-preset (marked "clean") then load a new
>> sample into a synth (using a custom plugin GUI). On the outside nothing
>> changes. Now close the session, quit the host: The changes are lost
>> (same for presets or any state that needs saving).
>>
>> I propose http://lv2plug.in/ns/ext/state/#Dirty which allows a plugin
>> that has a state interface to notify the host about state changes using
>> an Atom message:
>>
>> state:Dirty
>>
>>
>>   a rdfs:Class ;
>>   rdfs:label "State modified message" .
> 
> Sounds great and very useful indeed.
> 
> How does this event look like?
> Is it a new atom type or set via the patch extension?
> 
> e.g.
> 
> []
>   a patch:Set ;
>   patch:property <http://lvplug.in/ns/ext/state#Dirty> ;
>   patch:value true .

It is not a property of the plugin. Hence I envisage just a message:


As jalv -d puts it these days:

## Plugin => UI (8 bytes) ##
<http://lv2plug.in/ns/ext/atom#Object>
	a <http://lvplug.in/ns/ext/state#Dirty> .


in C:
  URID state_Dirty = mapuri ("http://lvplug.in/ns/ext/state#Dirty");

  LV2_Atom_Forge_Frame frame;
  lv2_atom_forge_frame_time (&forge, 0);
  lv2_atom_forge_object (&forge, &frame, 0, state_Dirty);
  lv2_atom_forge_pop (&forge, &frame);

best,
robin


More information about the Devel mailing list