Questions related to building a VST3 host

This is my first post to the Steinberg forum - so apologies for possibly rehashing old ground, or missing the correct forum.

I am developing a simple VST3 host using the VST3SDK on macos. I am loading the VST3 Halion Sonic SE3 plugin which came as part of a Dorico Pro installation. I have had some success generating audio. However I have the following persistent issues, and could use some guidance.

  1. What is the definitive way for the host to programmatically generate a program change? Based on searches, this is a very confusing topic. Iā€™ve tried using LegacyMIDICCOutEvent using kCtrlProgramChange for the controller, and have tried input parameter changes, using a ParamID given by midiMapping->getMidiControllerAssignment(ā€¦, ControllerNumbers::kCtrlProgramChange, ā€¦). But these approaches are not working for me.

  2. For instruments with keyswitches, such as ā€œViolins 1 A Combiā€, as I iterate through ProcessData blocks, I note that:
    a) For the first process block, all input NoteOn events are effectively ignored.
    b) On the second process block, new NoteOn events are accepted, but the first (lowest) keyswitch seems to be activated - in the case above for example, ā€œTrills WTā€.
    c) On subsequent process blocks, that mentioned keyswitch is set off, new NoteOn events are accepted, and sounds seem to play normally, although I donā€™t know which keyswitch is active. Also, channel volume seems to work fine, using input param changes.

I donā€™t seem to have issues with instruments without keyswitches.

Any thoughts/suggestions?

Also, does anyone have a reference point to relevant documentation (outside of that in the sdk) or host (code) examples?

As there was no response and much time has passed - I thought I would post what I found out.

  1. On two VST3 plugins, I found that issuing a ā€˜note onā€™ against the program changeā€™s id pitch produced the desired program change. More formally, program change midi events could be intercepted (by the host) and changed to a ā€˜note onā€™ event.
  2. My guess is that some kind of initialization is required at start. When I issued a program change, as noted above, at the start, successive generated sound was fine.
1 Like