diff options
author | Robin Gareus <robin@gareus.org> | 2018-10-31 23:32:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-10-31 23:44:04 +0100 |
commit | fd832d9d1a7eb33ff9b8b206e1b8509aef100faf (patch) | |
tree | 1ab68c7fa90877c20a8a412bfcfd317f169af436 /libs/ardour/plugin_insert.cc | |
parent | befa339d4b4ee0e288c5f5437e0017eefd0ca2fb (diff) |
Add option to limit automatable control parmaters
VCVRack VST currently exposes 9999 automatable-control parmaters.
This slows down various GUI dropdown lists and dialogs.
(even worse: those parameters are not mapped to anything by default).
This change allows to limit automatable parameters to a reasonable number,
without loosing state of already automated parameters in existing sessions.
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r-- | libs/ardour/plugin_insert.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 2537f8d232..d5056e7259 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -434,6 +434,8 @@ PluginInsert::create_automatable_parameters () boost::shared_ptr<Plugin> plugin = _plugins.front(); set<Evoral::Parameter> a = _plugins.front()->automatable (); + const uint32_t limit_automatables = Config->get_limit_n_automatables (); + for (uint32_t i = 0; i < plugin->parameter_count(); ++i) { if (!plugin->parameter_is_control (i)) { continue; @@ -452,7 +454,7 @@ PluginInsert::create_automatable_parameters () boost::shared_ptr<AutomationList> list(new AutomationList(param, desc)); boost::shared_ptr<AutomationControl> c (new PluginControl(this, param, desc, list)); - if (!automatable) { + if (!automatable || (limit_automatables > 0 && i > limit_automatables)) { c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::NotAutomatable)); } add_control (c); |