13
0

Special case DPF VST3 MIDI CC Ports (similar to JUCE)

This commit is contained in:
Robin Gareus 2024-06-20 16:32:31 +02:00
parent d2fdd72bc4
commit 3efe7ff056
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -16,6 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <regex>
#include "pbd/gstdio_compat.h"
#include <glibmm.h>
@ -1452,6 +1454,8 @@ VST3PI::VST3PI (std::shared_ptr<ARDOUR::VST3PluginModule> 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<ARDOUR::VST3PluginModule> 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;