How should a host map program change events to a plugin that doesn’t implement getUnitByBus?
I’ve seen a number of plugins that return kNotImplemented for 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 getMidiControllerAssignment with kCtrlProgramChange is only used for mapping program changes generated by the plugin and not for sending program changes to the plugin.
Hi Brad,
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 kIsProgramChange
Plugin returns kNotImplemented for getUnitByBus
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)
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.