'Choice' parameters are not reloaded correctly in Bitwig when plugin restarts

Hello, I’m having a very weird behaviour that shows only on Bitwig 4.4.6 on Windows. Same version of Bitwig on Ubuntu 22.04.1 does not have this problem. I’m using the GenericAudioProcessorEditor to display the few Choice and Int parameters necessary to customize the plugin’s behaviour. I’m only using latest core JUCE 7.0.4 modules.

(The plugin in question is GitHub - YPares/arpligner: A multi-track & polyphonic arpeggiator plugin that takes both chords and arp patterns as live MIDI data. It’s a MIDI-effect plugin only. Code is open)

The behaviour is that my plugin AudioParameterChoice params are always reset to their default value [1] after reloading my project in Bitwig, or after deactivating/reactivating the plugin. What is weird is that the only AudioParameterInt I have is properly restored to its latest known value. After some VSCode debugger session, I noticed that setStateInformation is called with the correct values (and parameters’ values seem to be set correctly at that point) when the plugin restarts, but for some reason the Choice parameters change back to their default values immediately after (even before I open the GUI).

I still cannot pinpoint whether the problem comes from my code, JUCE or Bitwig. I tried to remain as much as possible “by the book” (ie. stuck closely to JUCE tutos) in my development and I don’t think I really did anything fancy (besides using a Singleton class that’s needed for multi-instance communication, but that’s another unrelated part of the project, it has nothing to do with the parameters).

Anybody experienced this behaviour? I searched through the forum and did not find quite the same behaviour. I read that setCurrentProgram being called after setStateInformation can (or could in the past) lead to that kind of problems, but my debugging session showed me that setCurrentProgram (which is empty anyway in my case) is never even called when the plugin reloads.

[1] The value I set for them when using addParameter, in my AudioProcessor constructor

1 Like

I tried to update to JUCE modules 7.0.5, but nothing changed here.

Also happens in Ableton

Ok… Thanks for the info! I’d really not want to have to develop a custom Editor at this point of my plugin’s development (it’s made so that it doesn’t even really need a fancy GUI at the first place). I’ll browse issues on JUCE github and link to here if there’s one open yet

Yeh not ideal, we just ended up disabling the editor and using the DAW provided interfaces for manipulating parameters.

Yes, it’s not great… And you noticed that behaviour on Ableton only on Windows too? Did you try on other OSs?

Besides, on windows, the Standalone build of my plugin reloads all parameters fine when exited/restarted. It’s only the VST3 that has that problem.

Issue opened :slight_smile: => [Bug]: GenericAudioProcessorEditor seems to always reset Choice parameters to their default values · Issue #1191 · juce-framework/JUCE · GitHub

1 Like

@heavylids Good news :slight_smile: fix has been found! => Fix dontSendNotification not being used by ChoiceParameterComponent by YPares · Pull Request #1192 · juce-framework/JUCE · GitHub

Wow that was quick. Well done!

1 Like

Thanks for reporting, fixed here: