From 3efe7ff05648a55b117ee84820388537f52f28aa Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 20 Jun 2024 16:32:31 +0200 Subject: [PATCH] Special case DPF VST3 MIDI CC Ports (similar to JUCE) --- libs/ardour/vst3_plugin.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 8ee813cc9f..9211a8bf43 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -16,6 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include + #include "pbd/gstdio_compat.h" #include @@ -1452,6 +1454,8 @@ VST3PI::VST3PI (std::shared_ptr m, std::string unique_ int32 n_params = _controller->getParameterCount (); DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3 parameter count: %1\n", n_params)); + std::regex dpf_midi_CC ("MIDI Ch. [0-9]+ CC [0-9]+"); + for (int32 i = 0; i < n_params; ++i) { Vst::ParameterInfo pi; if (_controller->getParameterInfo (i, pi) != kResultTrue) { @@ -1465,6 +1469,10 @@ VST3PI::VST3PI (std::shared_ptr m, std::string unique_ /* Some JUCE plugins add 16 * 128 automatable MIDI CC parameters */ continue; } + if (std::regex_search (tchar_to_utf8 (pi.title), dpf_midi_CC)) { + /* DPF plugins also adds automatable MIDI CC parameters "MIDI Ch. %d CC %d" */ + continue; + } Param p; p.id = pi.id;