How should a host map program change events to a plugin that doesn’t implement
I’ve seen a number of plugins that return
getUnitByBus, but do have
ParameterInfo::kIsProgramChange set for some (maybe just one) parameters. Without
getUnitByBus there’s no way to tell which channel the program change applies to.
Should the host:
- Suppress the program change events and not forward them
- Assume the parameter applies to channel 1 only and only forward program changes received for channel 1
- Forward any program change on any channel to that parameter
- Something else?
Also, could you please confirm that
kCtrlProgramChange is only used for mapping program changes generated by the plugin and not for sending program changes to the plugin.
Any insight greatly appreciated.
if the plug-in does not implement getUnitByBus (), but providing multiple program change parameters, the plug-in is illformed. If the plug-in report multiple units, you can only change the programs per unit and not via channel. Don’t know if this makes much sense in your case.
The getMidiControllerAssignment is used for mapping MIDI CC to parameter ID’s.
Thanks for the reply. I’m still not really clear on this case:
- Plugin reports one parameter as program change
- Plugin returns
- Host receives a MIDI program change event… should it be dispatched to the plugin as a parameter change for the flagged parameter?
(I’m not sure I was clear enough in my original post that I’m specifically talking about mapping MIDI program changes when
getUnitByBus is not implemented)
In this case (one unit, or no unit), you dispatch the MIDI program change as parameter change event to the plug-in.
OK so a program change on any MIDI channel will change the plugin’s program?
Another related question for clarification…
When setting a program change parameter, it needs to be normalized by dividing by the program count. Which program count should be used:
- The info.stepCount returned from
- The info.programCount returned from
getProgramListInfo() if available otherwise
- Should they always match?
Do you send any MIDI channel note on to the plug-in?
Most likely the plug-in is a simple one channel plug-in it should report only one channel in its event bus.
The parameter info.stepCount and the program list stepCount must match, otherwise the plug-in is illformed. If the plug-in does not implement IUnitInfo it can have one parameter acting as program list and this one is then to be used.