Problems changing preset programs in Cubase 8.5 and 9.5

In Cubase 8.5 and 9.5 (both Windows and Mac) I’m seeing the following strange behavior with my VST2 plugin:

  1. put the plugin on an audio track: --> OK, plugin starts up with 1st program named “Default” and corresponding settings
  2. 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
  3. 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)?

The AUv3SynthDemo has programs but it doesn’t actually change any parameters when you change the programs.

I remember that I experienced the same problem one year ago, it seems that Cubase does not want to change to a program with ID=0.

Thanks for replying @seebk Do you remember the version of Cubase you experienced this in?

So, is what you’re saying: Cubase doesn’t make setProgram(0) calls?

From my tests, it must have done that in Cubase 5.5.3, 7.0.7, 8.0.34 because there, I didn’t have the issue.

Did you find a solution for the issue? Or had contact with Steinberg developers about this?

I think it was Cubase 9 or 9.5 and I did not contact Steinberg. If you have any updates or get feedback from steinberg, let me know :wink:


I took the AudioPluginDemo though and implemented the program-related methods (3 programs, 2 params). See attached code.

This exhibits the issue:

  1. load the plugin (shows 1st program “first” with settings of that program)
  2. switch to 2nd program (“second”) --> settings are changed as expected
  3. switch back to 1st program --> nothing changes…

This issue occurs with Cubase 9.5 (and probably 8.5 again as well, but didn’t test that), but it does not occur with Live, Reaper or Bidule.
I also tested again in (older) Cubase 8.0.35, and there the issue also doesn’t occur.

AudioPluginDemo.h (26.7 KB)

@fabian Do you have any ideas? Do you have contacts with the Steinberg devs?

I remember this bug being in Cubase since pretty much forever (at least 5 years). I’ve been trying to get to the bottom of this all morning but I think there is no real fix for this - it’s completely messed up.

For example, try changing your program names to end with a consecutive numbers (“prog 1”, “prog 2”, “prog 3”). You will see that this simple name change will actually fix the bug (program switch from the 2nd to the 1st program works), but now you won’t get any program switches from the 1st to the 2nd. So Cubase’s behaviour actually seems to depend on the program names itself?!? Seems like a big bodge of compatibility workarounds in Cubase to get some popular plug-ins to work.

I’d be really interested in how some of the more established plug-in devs deal with this. Just not use programs?

Thanks for also trying to look into this, Fabian.
I can confirm that simply changing the program names to “prog 1”, “prog 2” and “prog 3” fixes going back from 2nd to 1st, but going from 1st to 2nd is then broken.
I find this rather astonishing, especially given that Cubase should be the “gold standard” for VST plugins. Also, strange that it does work fine in Cubase 8.0.35 for example.
I wonder if @ygrabit is aware of this.