Added IntParam::range() and FloatParam::range()
This commit is contained in:
parent
6f975ca404
commit
bf01371009
2 changed files with 12 additions and 0 deletions
|
@ -300,6 +300,12 @@ impl FloatParam {
|
||||||
self.modulated_plain_value()
|
self.modulated_plain_value()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The range of valid plain values for this parameter.
|
||||||
|
#[inline]
|
||||||
|
pub fn range(&self) -> FloatRange {
|
||||||
|
self.range
|
||||||
|
}
|
||||||
|
|
||||||
/// Enable polyphonic modulation for this parameter. The ID is used to uniquely identify this
|
/// Enable polyphonic modulation for this parameter. The ID is used to uniquely identify this
|
||||||
/// parameter in [`NoteEvent::PolyModulation`][crate::prelude::NoteEvent::PolyModulation]
|
/// parameter in [`NoteEvent::PolyModulation`][crate::prelude::NoteEvent::PolyModulation]
|
||||||
/// events, and must thus be unique between _all_ polyphonically modulatable parameters. See the
|
/// events, and must thus be unique between _all_ polyphonically modulatable parameters. See the
|
||||||
|
|
|
@ -278,6 +278,12 @@ impl IntParam {
|
||||||
pub fn value(&self) -> i32 {
|
pub fn value(&self) -> i32 {
|
||||||
self.modulated_plain_value()
|
self.modulated_plain_value()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The range of valid plain values for this parameter.
|
||||||
|
#[inline]
|
||||||
|
pub fn range(&self) -> IntRange {
|
||||||
|
self.range
|
||||||
|
}
|
||||||
|
|
||||||
/// Enable polyphonic modulation for this parameter. The ID is used to uniquely identify this
|
/// Enable polyphonic modulation for this parameter. The ID is used to uniquely identify this
|
||||||
/// parameter in [`NoteEvent::PolyModulation`][crate::prelude::NoteEvent::PolyModulation]
|
/// parameter in [`NoteEvent::PolyModulation`][crate::prelude::NoteEvent::PolyModulation]
|
||||||
|
|
Loading…
Add table
Reference in a new issue