The LegacyMode is not MPE off, but the older MPE mode. There was an update, which allows split keyboards. Some Information is given in MPEZoneLayout:
An MPE device can have up to two zones: a lower zone with master channel 1 and allocated MIDI channels increasing from channel 2, and an upper zone with master channel 16 and allocated MIDI channels decreasing from channel 15. MPE mode is enabled on a device when one of these zones is active and disabled when both are inactive.
Thanks daniel. So the legacyMode is not what I want then to disable MPE on an MPE synth (ie. for using with an old style MIDI keyboard).
I tried the suggestion to clearAllZones as well as to set the MPE synthesiser to a default MPEZoneLayout, but neither actually seems to work. The synth does not output audio of any kind from a regular keyboard in this case.
Here’s what I have in my pluginProcessor.cpp for switching the MPE mode from a button:
Yeah thanks. Currently the only way I can get a synthesiser to be properly switchable between MPE and non-MPE mode is by building an MPESynthesiser and a regular Synthesiser and then switching them in the pluginProcessor.cpp like this:
Thanks ed! That gets me a lot closer. However, there is still one remaining problem with that. The global pitch bend this is adding will only apply to notes that have already been started before the bend occurs.
ie. If I play two notes, then bend up as much as possible, then play a third note, the third note will have no bend applied to it.
The bend in this case should be applied to all notes, as it is with a global bend in true MPE mode.
Here is my basic code for the bends in my MPE Synth Voice:
The variable currentNotePitchBendAmount is then used to calculate the output frequency of the synth. It works fine in MPE mode. So I’m not sure why the bend is not being applied properly in Legacy mode.
ie. In Legacy, bends only seem to be transmitted to voices if they occur while those voices have actively playing notes.