[−][src]Enum midi_event::Note
A note representable in a 7 bit unsigned int. The subscript 's' to a note means sharp. The
subscript 'n' to an octave means negate, so Cs2n
= C# in octave -2.
Because it only uses the least significant 7 bits, any value can be interpreted as either an i8 or a u8 for free (as the representation is the same in both)
This implements both From
Variants
Start of 88-note piano keyboard range
Start of 5 octave synth range
Middle C
end of 5 octave synth range
end of 88-note piano keyboard range
Trait Implementations
impl Clone for Note
[src]
fn clone(&self) -> Note
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Note
[src]
impl Debug for Note
[src]
impl Eq for Note
[src]
impl From<Note> for u8
[src]
impl From<Note> for i8
[src]
impl From<Note> for usize
[src]
impl From<i8> for Note
[src]
impl From<u8> for Note
[src]
impl Hash for Note
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Note
[src]
fn cmp(&self, other: &Note) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl Parse<u8> for Note
[src]
impl PartialEq<Note> for Note
[src]
impl PartialOrd<Note> for Note
[src]
fn partial_cmp(&self, other: &Note) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Note
[src]
impl StructuralPartialEq for Note
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,