MPE Emulator

A VST plugin for enhancing non-MPE MIDI streams with MPE (MIDI Polyphonic Expression) capabilities based on user-defined mappings and rules, for Linux and Windows.
MPE Emulator screenshot
MPE Emulator is a MIDI proxy: an intermediary plugin which turns non-polyphonic, single channel aftertouch (channel pressure), pitch bend, or any MIDI Control Change (CC) message into polyphonic by applying them selectively to the lowest, highest, oldest, or newest note, either across the whole keyboard or restricted to a range of keys based on a configurable keyboard split point. It can also remap and reshape controller data, and do various other tricks to increase the expressiveness of a musical performance.

Signal Chain

MPE Emulator is VST compatible - VST® is a trademark of Steinberg Media Technologies GmbH, registered in Europe and other countries.

Download (v0.0.1)

Which distribution should I download?

Windows and Linux, 64 bit and 32 bit

Windows

Linux

Source Code

What's New in v0.0.1

  • Retroactively add MPE functionality to non-MPE-capable MIDI input devices.

  • Remap controllers, e.g. turn modulation wheel data into MPE aftertouch and vice-versa.

  • Invert MIDI expression and controller data, and apply various other distortions.

  • Use the trigger velocity of notes as release velocity for synths that utilize it.

  • Split the keyboard and route polyphonic expressions to the two halves with different rules.

  • Route various expressions and controllers to the lowest, highest, oldest, or newest note globally, or across the split halves of the keyboard.

  • MIDI Learn.

Demo


Demo: MPE Emulator v0.0.1 in REAPER 7.17, with an Arturia KeyStep 37 keyboard and the Arturia CS-80 V synthesizer.
Raw MIDI | MPE Emulator settings

Table of Contents

Features

Table of Contents

Installation

Before Installing: Choosing a Distribution

If your plugin host application supports VST 2.4, then you should download and install the FST version of MPE Emulator.

If your plugin host only supports VST 3, or if you can live with a few quirks and edge case bugs due to the incomplete MIDI support in the VST 3 protocol, then you should try the VST 3 bundle on both Windows and Linux.

If you are using an older VST 3 host, or if you are running a 32 bit (also known as "i686" or "x86") VST 3 host on a 64 bit Linux system, then it might not be able to load the VST 3 bundle, so you will have to go with a VST 3 single file MPE Emulator package that matches the architecture of your host application.

The 32 bit versions are usually only needed by those who deliberately use a 32 bit plugin host application, e.g. because they want to keep using some really old plugins which are not available for 64 bit systems.

If you are in doubt, then try the 64 bit FST version, and if your plugin host application doesn't recognize it, then try the VST 3 bundle, and if that still fails to load, then try the 64 bit VST 3 single file version, then the 32 bit FST version, then the 32 bit VST 3 single file version, and so on.

Packages

These are the file names that you will find on GitHub on the "Releases" page:

Table of Contents

System Requirements

The plugin can also be compiled for RISC-V 64 from its source code.

Tested with REAPER 7.17.

Dependencies on Windows

Typical Windows systems usually have the MSVC library already installed, but in case you need it, you can download it from Microsoft's website.

(Most people need the X64 version of this library. To use the 32 bit version of the plugin, you will need the X86 version of the library. See the Before Installing: Choosing a Distribution section below for more information.)

Dependencies on Linux

On Linux, the libxcb, libxcb-render, and libcairo libraries, and either the kdialog or the zenity application are required to run MPE Emulator. To install them on Debian based distributions (e.g. Ubuntu), you can use the following command:

sudo apt-get install libxcb1 libxcb-render0 libcairo2 zenity kdialog

Note: if you want to run the 32 bit version of MPE Emulator on a 64 bit system, then you will have to install the 32 bit version of the libraries, for example:

sudo apt-get install libxcb1:i386 libxcb-render0:i386 libcairo2:i386 zenity kdialog

FST (VST 2.4) on Windows

  1. Download MPE Emulator.
  2. Extract the ZIP archive.
  3. Copy the mpe-emulator.dll file to the folder where you keep your VST 2.4 plugins.
  4. Optionally, if your host application can load .vstxml files, it is recommended to copy the mpe-emulator.vstxml file as well to the folder where you keep your VST 2.4 plugins.

Note: VST 2.4 plugins are usually put in the C:\Program Files\VstPlugins folder.

FST (VST 2.4) on Linux

  1. Download MPE Emulator.
  2. Extract the ZIP archive.
  3. Copy the mpe-emulator.so file to the directory where you keep your VST 2.4 plugins.
  4. Optionally, if your host application can load .vstxml files, it is recommended to copy the mpe-emulator.vstxml file as well to the directory where you keep your VST 2.4 plugins.

Note: VST 2.4 plugins are usually put in the ~/.vst directory.

VST 3 Bundle on Windows

  1. Download MPE Emulator.
  2. Extract the ZIP archive.
  3. Copy the entire mpe-emulator.vst3 folder to your VST 3 folder which is usually C:\Users\YourUserName\AppData\Local\Programs\Common\VST3.

VST 3 Bundle on Linux

  1. Download MPE Emulator.
  2. Extract the ZIP archive.
  3. Copy the entire mpe-emulator.vst3 directory to your VST 3 directory which is usually ~/.vst3.

VST 3 Single File on Windows

  1. Download MPE Emulator.
  2. Extract the ZIP archive.
  3. Copy the mpe-emulator.vst3 file to your VST 3 folder which is usually C:\Users\YourUserName\AppData\Local\Programs\Common\VST3.

VST 3 Single File on Linux

  1. Download MPE Emulator.
  2. Extract the ZIP archive.
  3. Copy the mpe-emulator.vst3 file to your VST 3 directory which is usually ~/.vst3.

Table of Contents

Usage

Place MPE Emulator in the signal chain between the raw MIDI input and a synthesizer plugin in the plugin host application. The exact steps to set up MIDI routing vary between different plugin host applications, so consult the documentation of your one.

Signal Chain

Knobs

Most of the parameters that control the settings of the MIDI signal transformations can be adjusted via virtual knobs on the screen:

Table of Contents

Zone Configuration

An MPE zone is a group of MIDI channels where one channel is used for sending global MIDI events and controller changes which apply to all active notes (manager channel), and the other channels are allocated for individual polyphonic notes and controller events (member channels). Each controller event that is sent on a member channel is applied only to the note (or notes) that is played on that MIDI channel. One of the possible zones is called the "lower" zone and the other is called "upper". This has nothing to do with note pitches, these names actually refer to the layout of MIDI channel numbers.

Currently, MPE Emulator uses only one zone which can be either the lower or the upper zone. The exact details of these are not important, what's important is that MPE Emulator and the MPE-capable synthesizer must agree on the manager and the member channel layout. This can be achieved either by manually setting up the same MPE configuration in both the synthesizer and in MPE Emulator, or alternatively, MPE Emulator can send an MPE Configuration Message (MCM), and if the synthesizer implements MPE properly, then it will automatically configure itself to match the settings in MPE Emulator. (Though in practice, even some widely used commercial synthesizers ignore MCM messages, so you will likely have to manually verify that the zone settings of MPE Emulator and the synthesizer match up.)

Import Settings, Export Settings

The two icons at the top left corner of the "Main" configuration section allow saving and loading settings as ordinary files, e.g. for transferring them across projects, different host applications, computers, etc.

Override Release Velocity With Triggered Velocity (RelVel=TrigVel, Z1ORV)

Most MIDI keyboards emit Note Off events with note velocity set to either 0%, 50%, or 100%, regardless of how slow or fast the corresponding key is released. However, some synthesizers can utilize note release velocity, for example, to set the amplitude envelope release time accordingly. MPE Emulator remembers the note velocity for each triggered note, and can override the release velocity that is sent by the MIDI device to match the trigger velocity, so that softer notes are also release softly, and high velocity notes are also released with a high velocity.

Emit MCM on Reset (MCM)

This toggle switch tells MPE Emulator to emit MPE Configuration Messages (MCM), or don't bother, because the synthesizer would just ignore them anyways.

Zone Type (ZONE, Z1TYP)

Select the channel layout used by MPE Emulator:

Channels (CHAN, Z1CHN)

The number of channels to use as member channels. This determines the number of available polyphonic voices to use (within the limits of the synthesizer).

Excess Note Handling (STEAL, Z1ENH)

Tells MPE Emulator what to do then a new note is triggered while all polyphonic voices are in use:

Anchor (ANCH, Z1ANC)

A split point for the keyboard. Expression and controller events can be applied differently to each side of the split point. For example, one may want to send channel pressure (aftertouch) events only to the newest or the highest note above A3, but not to bass notes or chords played with the left hand.

Table of Contents

Rules

Input (IN, Z1RxIN)

The input controller (MIDI CC) type for the rule. CC events that are not matched by any rule's input settings are sent globally on the manager channel, and those that are matched by one or more rules are handled as the rules specify. The possible values are:

Output (OUT, Z1RxOU)

The output controller (MIDI CC) type for the rule. Usually it should be the same as the input, but in some cases, you might want to remap a particular controller to another. For example, if your MIDI keyboard does not have channel pressure (aftertouch) functionality, but it has some special function in a particular synthesizer, then you can remap e.g. mod wheel events to be sent as channel pressure: assign the mod wheel to the input, and select channel aftertouch for the output, and then whenever you turn the mod wheel, the synthesizer will receive an aftertouch message instead of it. (Unfortunately, aftertouch is known to have some bugs and quirks in some plugin type and host combinations.)

Initial Value (INIT, Z1RxIV)

The initial value of the rule (before distortions). See Reset for the details.

Target (TARGET, Z1RxTR)

Which polyphonic note (channel) to send the output of the rule:

Note: "above the anchor" here includes the anchor key itself.

Distortion Level (DIST, Z1RxDL)

How much to distort the flat, linear curve of the controller with the selected distortion function.

Invert (Z1RxNV)

Flip the controller: when 0% is received on the input, send 100%, and when the input is at 100%, then send 0%.

Reset (Z1RxRS)

Select note initialization and reset behaviour. A reset can occur in one of two ways:

The options for performing resets are:

Midpoint (Z1RxMP)

Move the mouse cursor over the first function graph icon at the top right corner of a rule, and start moving it while holding the left mouse button down, or start using the mouse wheel to adjust the midpoint of the rule's input. For example, if the midpoint is at 75%, then when the rule's input controller is at 50%, MPE Emulator will send 75%. Moving the controller between 0% and 50% will make MPE Emulator emit values between 0% and 75%, and moving the controller between 50% and 100% will make MPE Emulator emit values between 75% and 100%.

Together with the Invert toggle, this makes it possible to create a pair of rules which turn the two halves of the pitch bend wheel into different controllers, and to misuse it in various creative ways.

Distortion Type (Z1RxDT)

Click on the second function graph icon at the top right corner of a rule, or use the mouse wheel while holding the mouse cursor over it to select the non-linearity shape that the rule will use when its distortion level parameter is set to a value above 0%.

Table of Contents

Bugs

If you find bugs that are not mentioned in the "Known Issues and Quirks" section, please report them at https://github.com/attilammagyar/mpe-emulator/issues.

Table of Contents

Known Issues and Quirks

REAPER 7.17 lets raw MIDI control data pass through the VST 3 version

When a VST 3 plugin outputs MIDI controller messages in REAPER 7.17 and below versions, they get merged with the raw MIDI input regardless of whether the "Replaces MIDI bus" or the "Merges with MIDI bus" setting is selected. This makes the VST 3 version of MPE Emulator unusable in REAPER. This is a bug in REAPER which might get fixed in 7.18.

The FST (VST 2.4) version of MPE Emulator works fine in all versions of REAPER.

Table of Contents

Ardour 8.6 ignores Channel Pressure (Aftertouch) events emitted by plugins

There's a bug in both the VST 2 and the VST 3 implementation in Ardour which makes it drop Channel Pressure (Aftertouch) events (and Program Change events in case of VST 2). The status of the fix can be tracked here.

Table of Contents

FL Studio does not support MPE at all (as of July 2024)

In fact, MIDI is not a first-class citizen in FL Studio, and getting even basic MIDI to work with plugins (e.g. using controllers other than the mod wheel and the pitch bend wheel) requires digging through various settings dialogs and manually setting up controller links to plugin parameters. By the way, those MIDI CC helper parameters that many plugin developers and even the VST 3 standard use are not MIDI CC support, they are just workarounds to mimic MIDI CC support.

As of July 2024, MPE in FL Studio seems hopeless.

Table of Contents

VST 3 Note On and CC event ordering issues

A VST 3 plugin has no way to know the exact order of MIDI note events and controller events on its input, and has no way to communicate it on its output, because MIDI support is fundamentally broken in the VST 3 protocol.

MPE Emulator does what can be done to work around this, but since the protocol's design makes it impossible to ensure the sequentiality between note events and controller events, there might be cases where the VST 3 version of MPE Emulator cannot fully satisfy the requirements of a synthesizer which expects CC and note events to come in a particular well defined order. Note that the FST (VST 2.4) version does not suffer from this problem.

The reason for this is that the VST 3 protocol separates the continuous and consistent MIDI stream that comes out of MIDI input devices into separate streams of note-related events and controller events, and passes the latter to plugins as parameter automation.

While VST 2 has full support for MIDI (and extensions like MPE), the developers of VST 3 decided to take several steps backward and break MIDI by implementing controller handling based on a workaround that was used by VST 2 plugin developers to mimic MIDI CC support for host applications that don't implement it properly (like, for example, FL Studio). Then when both plugin developers and MIDI plugin users pushed them, they added another workaround (named LegacyMIDICCOutEvent) to the protocol, which makes it possible for VST 3 plugins to output MIDI CC events, but now the sequentiality of MIDI events is broken for VST 3 plugins both on the input and consequently on the output side.

Table of Contents

The mod wheel or a CC event is not handled with polyphony despite matching one of the rules

Though the MPE specification allows basically any controller event to be sent on the polyphonic channels (member channels) and to be handled individually for each note, many commercial synthesizers use only the pitch wheel, the channel pressure, and CC 74 (a.k.a. Brightness, Timbre, Sound 5, etc.) with polyphony, because these are the ones that are mandated by the standard. If you set up a rule in MPE Emulator to make e.g. the mod wheel polyphonic and the synthesizer ignores it or still applies it globally, then MPE Emulator has no influence on it, and the synthesizer is doing nothing wrong with respect to the standard.

Most DAW applications have a plugin or a special tool which lets you peek into the raw MIDI messages that are sent and received by each plugin, bus, and MIDI track. If you see something there that is clearly wrong on MPE Emulator's side, and it's not a known quirk with a particular host and plugin type combination then please report it as a bug.

Table of Contents

Frequently Asked Questions

Mac version?

Sorry, it's not likely to happen anytime soon, unless someone is willing to create and maintain a Mac fork of MPE Emulator. For me to do it, it would require quite a large investment, both in terms of effort and financially. If MacOS would be available (at a reasonable price) for installing it in a virtual machine that could be used for testing, I'd consider that. But as long as it cannot be obtained (legally) without also buying a Mac, and I'm happy with my current computer, I'm not going to invest in a new one.

Table of Contents

FL Studio: How to ...?

As of July 2024, MPE in FL Studio is not supported.

Table of Contents

Why do you say FST instead of VST 2?

VSTĀ® is a trademark of Steinberg Media Technologies GmbH, registered in Europe and other countries.

I'm not a lawyer, so I have no idea if it would count as trademark infringement if I claimed VST 2.4 compatibility for MPE Emulator without obtaining a license from Steinberg Media Technologies GmbH, so I don't do it, especially since they no longer issue new licenses for VST 2 to anybody. Instead, I use the name of an open source programming library which makes it possible to build plugins that can be loaded into VST 2.4 hosts without that license: FST.

Table of Contents

Development

This section contains information for those who downloaded the source code of MPE Emulator and want to compile it themselves.

Tools

Linux

Windows

Dependencies

The lib/ directory contains code from the following projects:

Note: the lib/ directory does not include the whole SDK packages, it only contains what's required for compiling MPE Emulator.

Linux

To compile MPE Emulator on e.g. Ubuntu Linux 22.04 for all supported platforms, the following packages need to be installed:

apt-get install \
    binutils \
    build-essential \
    g++ \
    gcc-multilib \
    g++-multilib \
    libcairo2-dev \
    libcairo2-dev:i386 \
    libx11-dev \
    libx11-dev:i386 \
    libxcb1-dev \
    libxcb1-dev:i386 \
    libxcb-render0-dev \
    libxcb-render0-dev:i386 \
    mingw-w64

Compiling

Windows

Assuming that you have installed MinGW-w64 to C:\mingw64, you can use the following commands to run tests and compile MPE Emulator for Windows:

SET PATH=C:\mingw64\bin;%PATH%
SET TARGET_PLATFORM=x86_64-w64-mingw32
SET DEV_OS=windows

mingw32-make.exe check
mingw32-make.exe all

Linux

Run make check for running tests.

The following commands (on a 64 bit Linux environment) will compile MPE Emulator for 64 bit Windows, 32 bit Windows, x86_64 Linux, x86 Linux, and RISC-V 64 Linux respectively:

TARGET_PLATFORM=x86_64-w64-mingw32 make all
TARGET_PLATFORM=i686-w64-mingw32 make all
TARGET_PLATFORM=x86_64-gpp make all
TARGET_PLATFORM=i686-gpp make all
TARGET_PLATFORM=riscv64-gpp make all

Table of Contents

This website does not use any cookies.
Copyright © 2024 Attila M. Magyar and contributors