From e6f4f179be87758a16d4f1a11e9cd8de74970e63 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 6 Mar 2017 01:38:49 +0100 Subject: Add support for VST effSetBypass #7266 This mechanism re-uses internal abstraction (plugin-enable). Other plugin-specs designate a control-port, for VST we 'emulate' a control-port. There is still debug-output to stderr, here while testing. --- libs/ardour/plugin_insert.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libs/ardour/plugin_insert.cc') diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index c82257a4f4..8e3e138201 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -490,6 +490,21 @@ PluginInsert::create_automatable_parameters () _bypass_port = plugin->designated_bypass_port (); + /* special case VST effSetBypass */ + if (_bypass_port == UINT32_MAX -1) { + // emulate VST Bypass + Evoral::Parameter param (PluginAutomation, 0, _bypass_port); + ParameterDescriptor desc; + desc.label = _("Plugin Enable"); + desc.toggled = true; + desc.normal = 1; + desc.lower = 0; + desc.upper = 1; + boost::shared_ptr list(new AutomationList(param, desc)); + boost::shared_ptr c (new PluginControl(this, param, desc, list)); + add_control (c); + } + if (_bypass_port != UINT32_MAX) { boost::shared_ptr ac = automation_control (Evoral::Parameter (PluginAutomation, 0, _bypass_port)); if (0 == (ac->flags () & Controllable::NotAutomatable)) { -- cgit v1.2.3