mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +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
|
|
@ -35,6 +35,7 @@
|
|||
#include "evoral/ControlList.hpp"
|
||||
#include "evoral/ControlSet.hpp"
|
||||
#include "evoral/EventSink.hpp"
|
||||
#include "evoral/ParameterDescriptor.hpp"
|
||||
#include "evoral/Sequence.hpp"
|
||||
#include "evoral/TypeMap.hpp"
|
||||
#include "evoral/midi_util.h"
|
||||
|
|
@ -140,9 +141,10 @@ Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t
|
|||
|
||||
assert(x >= 0);
|
||||
|
||||
if (y < i->first.min() || y > i->first.max()) {
|
||||
const ParameterDescriptor& desc = seq.type_map().descriptor(i->first);
|
||||
if (y < desc.lower || y > desc.upper) {
|
||||
cerr << "ERROR: Controller value " << y
|
||||
<< " out of range [" << i->first.min() << "," << i->first.max()
|
||||
<< " out of range [" << desc.lower << "," << desc.upper
|
||||
<< "], event ignored" << endl;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue