mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
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:
parent
cb8abbe8d2
commit
767c0238a3
31 changed files with 484 additions and 297 deletions
|
|
@ -22,14 +22,16 @@
|
|||
|
||||
#include "evoral/Control.hpp"
|
||||
#include "evoral/ControlList.hpp"
|
||||
#include "evoral/ParameterDescriptor.hpp"
|
||||
#include "evoral/TypeMap.hpp"
|
||||
|
||||
namespace Evoral {
|
||||
|
||||
Parameter::TypeMetadata Parameter::_type_metadata;
|
||||
|
||||
Control::Control(const Parameter& parameter, boost::shared_ptr<ControlList> list)
|
||||
Control::Control(const Parameter& parameter,
|
||||
const ParameterDescriptor& desc,
|
||||
boost::shared_ptr<ControlList> list)
|
||||
: _parameter(parameter)
|
||||
, _user_value(list ? list->default_value() : parameter.normal())
|
||||
, _user_value(list ? list->default_value() : desc.normal)
|
||||
{
|
||||
set_list (list);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue