Skip to content

Commit

Permalink
Added IntParam::range() and FloatParam::range()
Browse files Browse the repository at this point in the history
  • Loading branch information
rbmj committed Oct 26, 2023
1 parent 6f975ca commit 4b7bb94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/params/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ impl FloatParam {
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
/// parameter in [`NoteEvent::PolyModulation`][crate::prelude::NoteEvent::PolyModulation]
/// events, and must thus be unique between _all_ polyphonically modulatable parameters. See the
Expand Down
6 changes: 6 additions & 0 deletions src/params/integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ impl IntParam {
pub fn value(&self) -> i32 {
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
/// parameter in [`NoteEvent::PolyModulation`][crate::prelude::NoteEvent::PolyModulation]
Expand Down

0 comments on commit 4b7bb94

Please sign in to comment.