Redo issue with PluginStateValueTree. SetPropertyAction & excludeListener


#1

AudioProcessorValueTreeState::Parameter::copyValueToValueTree() calls setPropertyExcludingListener(), giving this as listener to exclude.

That creates a ValueTree SetPropertyAction() with that Parameter given as ‘excludeListener’.
In consequence, when redo is called, SetPropertyAction::perform() will be called, but the parameter won’t be notified by the change.

Note that it “sometimes” work in practice, because you often modify your parameter twice in a row (through a slider drag for instance), and that creates a CoalescedAction.
and the SetPropertyAction created by SetPropertyAction::createCoalescedAction() does not take the listenerToExclude into account at all, so then it will work.

So to sum-up :

  • To fix the redo issue, could AudioProcessorValueTreeState::Parameter::copyValueToValueTree() call setProperty() instead of setPropertyExcludingListener() ? (or would that bring up other issues?)

  • shouldnt SetPropertyAction::createCoalescedAction() takes into account the “listenerToExclude” when coalescing the SetPropertyActions?


New plugin automation examples
AudioProcessorValueTreeState & UndoManager usage
#2

If copyValueToValueTree doesn’t call setPropertyExcludingListener then you run into problems when your parameter is being modified by the host during automation.

This is a really complicated bit of code, so we’ll need to think about the best approach.


#3

I see! Thanks for looking into this Tom


#4

any chance this will get fixed before/with the juce5 release?

also SetPropertyAction::createCoalescedAction not taking listenerToExclude into account ?


#5