Replace half-baked param metadata with descriptor.

Among other things, this means that automation controls/lists have the actual
min/max/normal/toggled of parameters, and not those inferred from the Parameter
ID, which is not correct for things like plugin parameters.

Pushing things down to the Evoral::ParmeterDescriptor may be useful in the
future to have lists do smarter things based on parameter range, but currently
I have just pushed down the above-mentioned currently used attributes.
This commit is contained in:
David Robillard
2014-12-01 14:28:03 -05:00
parent cb8abbe8d2
commit 767c0238a3
31 changed files with 484 additions and 297 deletions

View File

@@ -248,13 +248,8 @@ PluginInsert::create_automatable_parameters ()
ParameterDescriptor desc;
_plugins.front()->get_parameter_descriptor(i->id(), desc);
/* the Parameter belonging to the actual plugin doesn't have its range set
but we want the Controllable related to this Parameter to have those limits.
*/
param.set_range (desc.lower, desc.upper, _plugins.front()->default_value(i->id()), desc.toggled);
can_automate (param);
boost::shared_ptr<AutomationList> list(new AutomationList(param));
boost::shared_ptr<AutomationList> list(new AutomationList(param, desc));
add_control (boost::shared_ptr<AutomationControl> (new PluginControl(this, param, desc, list)));
} else if (i->type() == PluginPropertyAutomation) {
Evoral::Parameter param(*i);
@@ -262,7 +257,7 @@ PluginInsert::create_automatable_parameters ()
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));
list = boost::shared_ptr<AutomationList>(new AutomationList(param, desc));
}
add_control (boost::shared_ptr<AutomationControl> (new PluginPropertyControl(this, param, desc, list)));
}