Apple M1 - Problem with `AudioParameterBool`

Hello,
I’ve just discovered two serious problems with all my plugins on new Apple M1 in Logic Pro X.
Unfortunately at the moment I am not able to test it on other computer and in other DAW.
But I tested other plugins like Fabfilter, and there are not such problems.

  1. At first AudioParameterBool does not work as expected. When writing automation it looks like Logic Pro follow the changes, but it doesn’t write it properly. Please see on enclosed video file.

button_issue

Maybe I use AudioParameterBool in wrong manner.

In juce::AudioProcessor I have declared AudioProcessorValueTreeState params;

And I define params in the header of the constructor of juce::AudioProcessor like that:

params(*this , nullptr , "PARAMETERS",
{
std::make_unique<AudioParameterBool> ("ON_OFF_ID", "ON_OFF_NAME", false )
}),

And I attach that parameter with my ToggleButton by declaring in juce::AudioProcessorEditor class:

std::unique_ptr AudioProcessorValueTreeState::ButtonAttachment attachment;

And then in the constructor I do that:

attachment = std::make_uniqueAPVTS::ButtonAttachment(audioProcessor.params, ON_OFF_ID, myToggleButton);

So what could be wrong here? And why such behaviour in Logic Pro X happens?

And what is worth to mention the other parameters like AudioParameterFloat work fine.

Does anyone have similar issues with AudioParameterBool?



  1. Second problem is that my plugins capture pushing the Return button on my MacBook Pro. So every time I am focused on my plugin which is launched in Logic Pro X I can’t use Return button because it toggle buttons on my plugin and is invisible by Logic Pro. So if I have in Logic Pro some shortcut under Return key then it doesn’t work.




For any help grat thanks in advance.

Best Regards

Adnotation to issue 1)
What is worth to be mention is that if I draw automation by myself and then read it then everything is fine. So it looks like it’s some Logic Pro issue, but as I told in other plugins buttons there is not such problem.

The first issue seems to be a Logic bug where automation is only recorded if there’s a short delay between the calls to beginGesture, setValue, and endGesture. There’s some discussion of the issue in this thread.

For the second issue, you could call setWantsKeyboardFocus (false) on your toggle button.

  1. So it looks like We need to wait for Logic Pro developers to repair that. I am not sure if it’s worth to implementing 40ms delay, while it’s only temprorary solution (hopefully temporary).





  1. OK, great thanks. setWantsKeyboardFocus (false) helped me. But according to JUCE documentation it is by default false, so I wonder how it is possible I got it true while I’ve never called setWantsKeyboardFocus(true); before.

Yes, hopefully this issue will be resolved in Logic soon.

It’s the default for a plain Component. However, types derived from Component may call setWantsKeyboardFocus (true) in their constructors, and this is true for Button.

Acha…!!! Great thanks for your info.