MPESynthesizer Questions


#1

Hi, I have some questions about MPESynthesizer. I’m working on a plug-in based on the SinewaveSynth example code but using “MPESynthesizer” instead of “Synthesizer”. (Also, I’ve modified the code so ‘level’ is set to 0.5f instead of responding to afttertouch.) I don’t have any sort of MPE controller to test it with and I’m not sure exactly what behaviour to expect from a standard MIDI keyboard but I’m puzzled by the results I’m getting:

  1. If I call synth.enableLegacyMode(), my plug-in responds to MIDI notes but controller and pitch bend messages only affect the most recently-played note. Shouldn’t legacyMode emulate standard controller and pitch bend behaviour?

  2. If I don’t call synth.enableLegacyMode(), it doesn’t respond to MIDI note information on any channel.

  3. If I try adding a zone like:

    MPEZone zone (1, 15);
    MPEZoneLayout layout;
    layout.addZone (zone);
    synth.setZoneLayout (layout);

I get a working synth but it doesn’t respond on channel 1 - I thought response to notes on the base channel was supposed to work as in the normal MIDI spec? On the other channels, it works but only applies controllers and pitch bend on the most recently-played note, the same as the legacy mode - again, that seems wrong.

Are the results I’m getting expected, or am I doing something wrong? If the former, how am I supposed to make a synth which works in both ‘normal’ MIDI mode and MPE mode?`


#2

The legacy mode treats all 16 MIDI channels as note channels. So if you have a controller or pitchbend message on any MIDI channel, it will forward that message to the most recent note playing on that channel.

If you use MPEZone (1, 15) instead of the legacy mode, it will treat Channel 1 as the “master channel”, and channels 2-16 as the note channels. Which means that channels 2-16 will behave like in “legacy mode”, but channel 1 will instead forward pitchbend messages to all notes, and note-on/off messages on channel 1 will be ignored.


#3

I’m confused as to exactly what legacy mode is supposed to be for - I thought it implemented normal MIDI mode, complete with all-note pitchbend and controllers? If not, how does one produce a synth in Juce which works in both MPE and normal MIDI modes?


#4

You can make the pitchbend apply to all notes on a channel (as opposed to just the most recent one, which is the MPE default) by calling this member function:

mpeSynthesiser.setPitchbendTrackingMode (MPEInstrument::allNotesOnChannel);

You can do the same for pressure and timbre (the other MPE dimensions).


#5

I get this:

error: juce::MPESynthesiser has no member “setPitchbendTrackingMode”


#6

Yeah, sorry, I forgot to add that to the interface.

Please try again with the newest tip!


#7

Downloaded and tested, works perfectly. Thank you, Timur.


#8

Shouldn’t there be a disableLegacyMode method in MPESynthesiserBase/MPEInstrument? I’m implementing MPE in our plugin, and I’m thinking of making the legacy mode toggable, since I don’t know in advance what type of controller the user has. Or am I missing something?


#9

I WAS missing something. Seems like I can just use setZoneLayout.


#10

I’m working on my first MPE synth, it’s based on MPESynthesiser. My Seaboard Block arrived today, so this is my first time playing with MPE. I also want my synth to work with standard keyboard.

So I have a menu item to enable / disable MPE, and it does the following. Is this correct? It seems to work.

if (getMPE())
{
    MPEZone zone (1, 15);
    MPEZoneLayout zones;
    zones.addZone (zone);
    instrument->setZoneLayout (zones);
    setPitchbendTrackingMode (MPEInstrument::lastNotePlayedOnChannel);
}
else
{
    instrument->enableLegacyMode();
    setPitchbendTrackingMode (MPEInstrument::allNotesOnChannel);
}

What options do MPE users expect? Does that set it up in a good default mode?