mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Unit-test: parameter ranges outside [0..1]
More updates after 3d15499cda
* set parameter-range for MIDI sequences
* set parameter-range for cubic spline
This commit is contained in:
parent
db063a6eb8
commit
beccc53bb6
2 changed files with 10 additions and 3 deletions
|
|
@ -315,6 +315,8 @@ CurveTest::constrainedCubic ()
|
||||||
int32_t type = 0;
|
int32_t type = 0;
|
||||||
Evoral::Parameter p(type);
|
Evoral::Parameter p(type);
|
||||||
Evoral::ParameterDescriptor pd;
|
Evoral::ParameterDescriptor pd;
|
||||||
|
pd.lower = 5;
|
||||||
|
pd.upper = 325;
|
||||||
Evoral::ControlList l(p,pd);
|
Evoral::ControlList l(p,pd);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
ParameterDescriptor descriptor(const Parameter& param) const {
|
ParameterDescriptor descriptor(const Parameter& param) const {
|
||||||
return ParameterDescriptor();
|
Evoral::ParameterDescriptor desc;
|
||||||
|
desc.upper = 127;
|
||||||
|
desc.rangesteps = 128;
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string to_symbol(const Parameter& /*param*/) const { return "control"; }
|
std::string to_symbol(const Parameter& /*param*/) const { return "control"; }
|
||||||
|
|
@ -57,8 +60,10 @@ public:
|
||||||
virtual bool find_next_event(double start, double end, ControlEvent& ev, bool only_active) const { return false; }
|
virtual bool find_next_event(double start, double end, ControlEvent& ev, bool only_active) const { return false; }
|
||||||
|
|
||||||
boost::shared_ptr<Control> control_factory(const Parameter& param) {
|
boost::shared_ptr<Control> control_factory(const Parameter& param) {
|
||||||
const Evoral::ParameterDescriptor desc;
|
Evoral::ParameterDescriptor desc;
|
||||||
boost::shared_ptr<ControlList> list(new ControlList(param, desc));
|
desc.upper = 127;
|
||||||
|
desc.rangesteps = 128;
|
||||||
|
boost::shared_ptr<ControlList> list(new ControlList(param, desc));
|
||||||
return boost::shared_ptr<Control>(new Control(param, desc, list));
|
return boost::shared_ptr<Control>(new Control(param, desc, list));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue