In Cubase 8.5 and 9.5 (both Windows and Mac) I’m seeing the following strange behavior with my VST2 plugin:
- put the plugin on an audio track: --> OK, plugin starts up with 1st program named “Default” and corresponding settings
- change the program of the plugin to the 2nd one in the list of plugin programs, using the Cubase plugin program list in the Cubase interface: --> OK, settings are changed to the ones for that program, and the program name in the Cubase interface is updated correctly
- set back the plugin program to the first one (“Default”): --> NOT OK! settings are not being set to the “Default” program (they remain the same as the ones set in 2.), but the program name does change to “Default” in the Cubase GUI
My plugin is built with Juce 5.3.1 (master), but this also happens with a much older version from several years ago.
I’m using 127 programs, represented internally by a 2D array of floats, a 1D array of strings for the program names and an int member variable for the current program.
I’m implementing getNumPrograms, getCurrentProgram, setCurrentProgram, getProgramName, changeProgramName, getStateInformation, getCurrentProgramStateInformation, setStateInformation, setCurrentProgramStateInformation.
Plugin state is saving and restoring correctly.
I don’t see this problem in about 4 other VST2 hosts (Bidule, Live, Reaper, FLStudio).
I also tested with older versions of Cubase (5.5.3, 7.0.7, 8.0.34) and there, I am NOT seeing this behavior.
Has any of you experienced this issue in the latest Cubase versions (and are you also using “programs”)?
I’ve also inserted some tracing with the DBG macro, and this is what I’m seeing:
action: changing to 2nd program in list:
getCurrentProgram --> current program = 0 setCurrentProgram --> index = 1 ApplyProgram --> programNum = 1, notifyHostOfParameterChanges = true getCurrentProgram --> current program = 1 getProgramName --> index = 0 getProgramName --> index = 1 ... getProgramName --> index = 125 getProgramName --> index = 126 getCurrentProgram --> current program = 1 getCurrentProgram --> current program = 1
action: changing back to 1st program in list:
getCurrentProgram --> current program = 1
(and then setCurrentProgram is NOT being called with number 0?)
Question for Juce team: is there a plugin example in the repository that uses programs (that way I could test this with code you also have)?