mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
plugin support for Controllable::NotAutomatable
This commit is contained in:
parent
03d2939f27
commit
86607097d6
3 changed files with 33 additions and 19 deletions
|
|
@ -140,6 +140,9 @@ AutomationControl::set_list (boost::shared_ptr<Evoral::ControlList> list)
|
||||||
void
|
void
|
||||||
AutomationControl::set_automation_state (AutoState as)
|
AutomationControl::set_automation_state (AutoState as)
|
||||||
{
|
{
|
||||||
|
if (flags() & NotAutomatable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (_list && as != alist()->automation_state()) {
|
if (_list && as != alist()->automation_state()) {
|
||||||
|
|
||||||
alist()->set_automation_state (as);
|
alist()->set_automation_state (as);
|
||||||
|
|
|
||||||
|
|
@ -2067,7 +2067,7 @@ LV2Plugin::automatable() const
|
||||||
set<Evoral::Parameter> ret;
|
set<Evoral::Parameter> ret;
|
||||||
|
|
||||||
for (uint32_t i = 0; i < parameter_count(); ++i) {
|
for (uint32_t i = 0; i < parameter_count(); ++i) {
|
||||||
if (parameter_is_input(i) && parameter_is_control(i)) {
|
if (parameter_is_input(i) && parameter_is_control(i) && !(_port_flags[i] & PORT_NOAUTO)) {
|
||||||
ret.insert(ret.end(), Evoral::Parameter(PluginAutomation, 0, i));
|
ret.insert(ret.end(), Evoral::Parameter(PluginAutomation, 0, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -409,31 +409,42 @@ PluginInsert::create_automatable_parameters ()
|
||||||
{
|
{
|
||||||
assert (!_plugins.empty());
|
assert (!_plugins.empty());
|
||||||
|
|
||||||
|
boost::shared_ptr<Plugin> plugin = _plugins.front();
|
||||||
set<Evoral::Parameter> a = _plugins.front()->automatable ();
|
set<Evoral::Parameter> a = _plugins.front()->automatable ();
|
||||||
|
|
||||||
for (set<Evoral::Parameter>::iterator i = a.begin(); i != a.end(); ++i) {
|
for (uint32_t i = 0; i < plugin->parameter_count(); ++i) {
|
||||||
if (i->type() == PluginAutomation) {
|
if (!plugin->parameter_is_control (i) || !plugin->parameter_is_input (i)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Evoral::Parameter param (PluginAutomation, 0, i);
|
||||||
|
|
||||||
Evoral::Parameter param(*i);
|
ParameterDescriptor desc;
|
||||||
|
plugin->get_parameter_descriptor(i, desc);
|
||||||
|
|
||||||
ParameterDescriptor desc;
|
const bool automatable = a.find(param) != a.end();
|
||||||
_plugins.front()->get_parameter_descriptor(i->id(), desc);
|
|
||||||
|
|
||||||
|
if (automatable) {
|
||||||
can_automate (param);
|
can_automate (param);
|
||||||
boost::shared_ptr<AutomationList> list(new AutomationList(param, desc));
|
}
|
||||||
boost::shared_ptr<AutomationControl> c (new PluginControl(this, param, desc, list));
|
boost::shared_ptr<AutomationList> list(new AutomationList(param, desc));
|
||||||
add_control (c);
|
boost::shared_ptr<AutomationControl> c (new PluginControl(this, param, desc, list));
|
||||||
_plugins.front()->set_automation_control (i->id(), c);
|
if (!automatable) {
|
||||||
} else if (i->type() == PluginPropertyAutomation) {
|
c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::NotAutomatable));
|
||||||
Evoral::Parameter param(*i);
|
}
|
||||||
const ParameterDescriptor& desc = _plugins.front()->get_property_descriptor(param.id());
|
add_control (c);
|
||||||
if (desc.datatype != Variant::NOTHING) {
|
plugin->set_automation_control (i, c);
|
||||||
boost::shared_ptr<AutomationList> list;
|
}
|
||||||
if (Variant::type_is_numeric(desc.datatype)) {
|
|
||||||
list = boost::shared_ptr<AutomationList>(new AutomationList(param, desc));
|
const Plugin::PropertyDescriptors& pdl (plugin->get_supported_properties ());
|
||||||
}
|
for (Plugin::PropertyDescriptors::const_iterator p = pdl.begin(); p != pdl.end(); ++p) {
|
||||||
add_control (boost::shared_ptr<AutomationControl> (new PluginPropertyControl(this, param, desc, list)));
|
Evoral::Parameter param (PluginPropertyAutomation, 0, p->first);
|
||||||
|
const ParameterDescriptor& desc = plugin->get_property_descriptor(param.id());
|
||||||
|
if (desc.datatype != Variant::NOTHING) {
|
||||||
|
boost::shared_ptr<AutomationList> list;
|
||||||
|
if (Variant::type_is_numeric(desc.datatype)) {
|
||||||
|
list = boost::shared_ptr<AutomationList>(new AutomationList(param, desc));
|
||||||
}
|
}
|
||||||
|
add_control (boost::shared_ptr<AutomationControl> (new PluginPropertyControl(this, param, desc, list)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue