IMidiLearn

I have a question regarding the IMidiLearn interface. As far as I understand this interface, the actual MIDI mapping is still performed from within the host and not from within the plugin. So, the plugin still does not receive the actual MIDI control change event values, but is only notified about an incoming MIDI control change event. That means that in case of an IMidiLearn::onLiveMIDIControllerInput() call, the plugin will change its MIDI mapping and report it to the host which then calls IMidiMapping::getMidiControllerAssignment() in order to receive the current MIDI mapping. So far, so good. The question now is, is it still possible that a user might change the MIDI controller mapping in the host? Does the host report MIDI mapping changes to the plugin again?

Hi,
your description how it works is correct. Regarding the question, if a user can change the mapping in the host, is dependent on the host, and no there’s no facility to inform you about this. Why do you need this information ? What’s the use case ?

Cheers,
Arne

Hi Arne,

thanks for the quick answer. The use case is the following. We show the MIDI mapping in the UI like this:

So, the user is always able to see and manipulate the current MIDI mapping from within the plugin. As soon as the user modifies the mapping from within the host, this could potentially break this concept as long as the plugin does not get notified about the modification.

OK, that was always the problem if a plug-in likes to do this for itself.
This was already the case with VST2.x and one of the reasons why we think that this is a host responsibility.
Just think about a merged MIDI input where two or more actual hardware devices will control a plug-in. A host can make the distinction from which hardware device a MIDI CC change was sent and can map a parameter to it. A plug-in does not have a clue which device was used.
The same for other controller devices which may not work with MIDI at all, for example a Joystick. A host can map such things a plug-in not.

So, maybe a possibility would be for a plug-in to get a display string from the host with the information how a parameter is mapped, but not a MIDI-CC number.

Cheers,
Arne

Yeah, you are right, of course. I just wanted to point this out, but I agree plug-in internal MIDI learn is not a good solution from a technical point of view. But unfortunately, customers expect to have that…