FIX Logic && ButtonParameterAttachment && Automation

Apparently Logic does not recognise ButtonParameterAttachment in automation, and needs a delay between begin && endGesture

my first workaround was this

void ParameterAttachment::setValueAsCompleteGesture (float newDenormalisedValue)
    callIfParameterValueChanged (newDenormalisedValue, [this] (float f)
            parameter.setValueNotifyingHost (f);

(proof of concept, must be secured with safe-pointer, and it must be ensured what happens if multiple times the buttons is clicked inside the 100ms)

However, this does only work after the third click on the button. The solution was that the intial beginGesture happening on the mouse-down event.

button.setTriggeredOnMouseDown (true);

I informed apple, but it would be cool if this workaround will be adopted into juce

I think this is a regression in Logic. I’d be reluctant to merge a fix like this to work around an issue which will (hopefully) be resolved in Logic in the future.

As shown, the change would affect automation in all DAWs, which wouldn’t be ideal. Querying the host and adding a special case in the ParameterAttachment to handle Logic would add quite a lot of complexity and additionally might break custom attachments implemented using ParameterAttachment.

If this is not fixed in the next Logic release I’m happy to reconsider at that point.

1 Like