I’m in the process of adding a parameter to an already released instrument plugin. I’ve placed the new parameter after the parameters I’d already defined using parameterID versionHint, but I’m seeing that Logic adds two “Mono Mode” parameters at the very end of the list, which means their automation lanes could potentially get mixed up after a user updates.
Can anyone point me more towards info about this is or know of a way around it?
I’m able to reproduce the issue with the AudioPluginDemo in Logic 11.0.1 native on Sonoma 14.5 arm64.
Procedure:
Add the following to the AudioProcessor in AudioPluginDemo.h to enable MPE: bool supportsMPE() const override { return true; }
Build the AudioPluginDemo_AU.
Create a new Logic project and add the AudioPluginDemo to a new track. Switch the editor to “controls” mode and check that the MPE controls are visible.
On the track’s automation lane, automate the MIDI Mono Mode and Mono Mode Pitch Range parameters.
Save the project.
In the constructor of the AudioPluginDemo’s AudioProcessor, add some new parameters with a version hint of “2” and rebuild the AU.
Reopen the saved Logic project.
Expected result:
After reopening the Logic project, the recorded automation still applies to the MIDI Mono Mode and Mono Mode Pitch Range parameters.
Actual result:
The automation recorded for the MPE parameters now applies to the new plugin parameters.
Unfortunately I’m not sure there’s a workaround. Checking the implementation of GetParameterList in juce_audio_plugin_client_AU_1.mm, I see that the only parameters exported by the AudioPluginDemo are the ones we explicitly add in our AudioProcessor. The extra MPE parameters must be added by Logic itself. In order for state restoration to work as expected, we’d need to add any “new” parameters after the MPE parameters, but this isn’t possible because Logic always seems to add the MPE parameters at the very end of the parameter list.
I recommend filing a bug report with Apple. I’ll do the same. I’m also pinging @mfritze, who has provided helpful insights on other similar issues.