pub struct PitchRangeMask {
pub bits: u128,
}Expand description
A bitmask over the 128 MIDI keys, with bit n set when MIDI key n is present.
Unlike PitchClassMask, this preserves octave, so it represents a concrete
set of sounding pitches rather than pitch classes.
Fields§
§bits: u128The packed key bits, with bit n corresponding to MIDI key n.
Implementations§
Source§impl PitchRangeMask
impl PitchRangeMask
Sourcepub fn intersection(self, other: Self) -> Self
pub fn intersection(self, other: Self) -> Self
Returns the intersection of this mask with other.
Sourcepub fn difference(self, other: Self) -> Self
pub fn difference(self, other: Self) -> Self
Returns the keys present in this mask but not in other.
Sourcepub fn to_pitches(self) -> Vec<Pitch>
pub fn to_pitches(self) -> Vec<Pitch>
Returns the set keys as concrete Pitch values in ascending order.
Trait Implementations§
Source§impl Clone for PitchRangeMask
impl Clone for PitchRangeMask
Source§fn clone(&self) -> PitchRangeMask
fn clone(&self) -> PitchRangeMask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PitchRangeMask
Source§impl Debug for PitchRangeMask
impl Debug for PitchRangeMask
Source§impl Default for PitchRangeMask
impl Default for PitchRangeMask
Source§fn default() -> PitchRangeMask
fn default() -> PitchRangeMask
Returns the “default value” for a type. Read more
impl Eq for PitchRangeMask
Source§impl Hash for PitchRangeMask
impl Hash for PitchRangeMask
Source§impl PartialEq for PitchRangeMask
impl PartialEq for PitchRangeMask
impl StructuralPartialEq for PitchRangeMask
Auto Trait Implementations§
impl Freeze for PitchRangeMask
impl RefUnwindSafe for PitchRangeMask
impl Send for PitchRangeMask
impl Sync for PitchRangeMask
impl Unpin for PitchRangeMask
impl UnsafeUnpin for PitchRangeMask
impl UnwindSafe for PitchRangeMask
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more