diff --git a/distrho/DistrhoInfo.hpp b/distrho/DistrhoInfo.hpp index 050cbd3c..b314b3fa 100644 --- a/distrho/DistrhoInfo.hpp +++ b/distrho/DistrhoInfo.hpp @@ -822,6 +822,11 @@ START_NAMESPACE_DISTRHO */ #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.effect" +/** + Whether the plugin supports and prefers the MIDI MPE dialect for MIDI input and MIDI output in the CLAP format. +*/ +#define DISTRHO_PLUGIN_CLAP_DIALECT_MIDI_MPE 0 + /** @} */ /* ------------------------------------------------------------------------------------------------------------ diff --git a/distrho/src/DistrhoPluginCLAP.cpp b/distrho/src/DistrhoPluginCLAP.cpp index eafc05d9..ea7e0be5 100644 --- a/distrho/src/DistrhoPluginCLAP.cpp +++ b/distrho/src/DistrhoPluginCLAP.cpp @@ -67,6 +67,12 @@ # define DPF_CLAP_TIMER_INTERVAL 16 /* ~60 fps */ #endif +#if defined(DISTRHO_PLUGIN_CLAP_DIALECT_MIDI_MPE) && DISTRHO_PLUGIN_CLAP_DIALECT_MIDI_MPE +# define DPF_CLAP_NOTE_DIALECT CLAP_NOTE_DIALECT_MIDI_MPE +#else +# define DPF_CLAP_NOTE_DIALECT CLAP_NOTE_DIALECT_MIDI +#endif + START_NAMESPACE_DISTRHO // -------------------------------------------------------------------------------------------------------------------- @@ -2297,8 +2303,8 @@ static bool CLAP_ABI clap_plugin_note_ports_get(const clap_plugin_t*, uint32_t, { #if DISTRHO_PLUGIN_WANT_MIDI_INPUT info->id = 0; - info->supported_dialects = CLAP_NOTE_DIALECT_MIDI; - info->preferred_dialect = CLAP_NOTE_DIALECT_MIDI; + info->supported_dialects = DPF_CLAP_NOTE_DIALECT; + info->preferred_dialect = DPF_CLAP_NOTE_DIALECT; std::strcpy(info->name, "Event/MIDI Input"); return true; #endif @@ -2307,8 +2313,8 @@ static bool CLAP_ABI clap_plugin_note_ports_get(const clap_plugin_t*, uint32_t, { #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT info->id = 0; - info->supported_dialects = CLAP_NOTE_DIALECT_MIDI; - info->preferred_dialect = CLAP_NOTE_DIALECT_MIDI; + info->supported_dialects = DPF_CLAP_NOTE_DIALECT; + info->preferred_dialect = DPF_CLAP_NOTE_DIALECT; std::strcpy(info->name, "Event/MIDI Output"); return true; #endif