From fc4b2441dd98f13f540ab0fb6fe48d4837576735 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 8 Dec 2020 17:01:25 +0100 Subject: [PATCH] VST2: relax MIDI port detection Apparently the official spec suggests singular for canDo "receiveVstMidiEvent", "sendVstMidiEvent" requests. However with "receiveVstEvents", "sendVstEvents" the plural form is used. confusion ensued. might fix: https://discourse.ardour.org/t/no-midi-input-for-plugin-which-support-it-littlealterboy-vst/105126 --- libs/ardour/vst_info_file.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc index 74e6cee4f7..68c43d959a 100644 --- a/libs/ardour/vst_info_file.cc +++ b/libs/ardour/vst_info_file.cc @@ -535,6 +535,7 @@ bool vstfx_midi_input (VSTState* vstfx) if ((plugin->flags & effFlagsIsSynth) || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast ("receiveVstEvents"), 0.0f) > 0) + || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast ("receiveVstMidiEvent"), 0.0f) > 0) || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast ("receiveVstMidiEvents"), 0.0f) > 0) ) { return true; @@ -555,6 +556,7 @@ bool vstfx_midi_output (VSTState* vstfx) if ( (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast ("sendVstEvents"), 0.0f) > 0) || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast ("sendVstMidiEvent"), 0.0f) > 0) + || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast ("sendVstMidiEvents"), 0.0f) > 0) ) { return true; } @@ -578,7 +580,8 @@ simple_master_callback (AEffect *, int32_t opcode, int32_t, intptr_t, void *ptr, "receiveVstMidiEvent", "supportShell", "shellCategory", - "shellCategorycurID" + "shellCategorycurID", + "sizeWindow" }; const int vstfx_can_do_string_count = 9;