Can a VST3 instrument plugin receive MIDI program changes from the host?

I am moving my VST instrument from VST2 to VST3. The process has stopped as I cannot find a way to tell the host (Cubase Element 12 or Reaper) to send the MIDI Program Change message to my new VST. All continuous controller messages are sent (and received).
Kenneth

You need to add a parameter that functions as a program change receiver and then you add a unit in your controller and set the programListId to that parameter:

		UnitInfo uinfo;
		uinfo.id = kRootUnitId;
		uinfo.parentUnitId = kNoParentUnitId;
		uinfo.programListId = kProgramChangeParamID;
		addUnit (new Unit (uinfo));

Now the kProgramChangeParamID parameter will receive parameter changes when a MIDI Program Change is triggered by the host.

1 Like

Thanks Arne,
On this page https://steinbergmedia.github.io/vst3_dev_portal/pages/Technical+Documentation/About+MIDI/Index.html there is a table that lists a few items, but it doesn’t look much like your solution. How come?

Sorry to bother, but I cannot get it to work. I have added the UnitInfo interface to my Controller class and implemented some functions like GetUnitCount, GetUnitInfo, GetProgramListCount etc. They are called and everything just looks right. But my parameter is never updated (the CC’s are though). I have looked at two samples, pitchnames and legacymidiccout but not gotten any wiser.

A piece of information to anyone else struggling with this issue: I had not implemented the function GetUnitByBus. Now, when I have it implemented I DO get back a value for my program change parameter, but it it always 0.

You can have a look in the SDK in the mda examples. There’s an implementation of it. See mdaBaseController.cpp.

Thanks! I have do everything in my code almost as in the mda example, but something is still missing. The interesting thing is that REAPER sends the correct program values but Cubase LE AI Elements 12 always sends 0. Next I need to modify one of the mda instruments to see if I can reproduce this.

One final setting that one needs to set correct for the Midi Program parameter is this: stepCount has to be 128 (or equal to the number of presets/programs your plugin supports).