[][src]Enum nom_midi::Note

#[repr(u8)]
pub enum Note {
    C1n,
    Cs1n,
    D1n,
    Ds1n,
    E1n,
    F1n,
    Fs1n,
    G1n,
    Gs1n,
    A1n,
    As1n,
    B1n,
    C0,
    Cs0,
    D0,
    Ds0,
    E0,
    F0,
    Fs0,
    G0,
    Gs0,
    A0,
    As0,
    B0,
    C1,
    Cs1,
    D1,
    Ds1,
    E1,
    F1,
    Fs1,
    G1,
    Gs1,
    A1,
    As1,
    B1,
    C2,
    Cs2,
    D2,
    Ds2,
    E2,
    F2,
    Fs2,
    G2,
    Gs2,
    A2,
    As2,
    B2,
    C3,
    Cs3,
    D3,
    Ds3,
    E3,
    F3,
    Fs3,
    G3,
    Gs3,
    A3,
    As3,
    B3,
    C4,
    Cs4,
    D4,
    Ds4,
    E4,
    F4,
    Fs4,
    G4,
    Gs4,
    A4,
    As4,
    B4,
    C5,
    Cs5,
    D5,
    Ds5,
    E5,
    F5,
    Fs5,
    G5,
    Gs5,
    A5,
    As5,
    B5,
    C6,
    Cs6,
    D6,
    Ds6,
    E6,
    F6,
    Fs6,
    G6,
    Gs6,
    A6,
    As6,
    B6,
    C7,
    Cs7,
    D7,
    Ds7,
    E7,
    F7,
    Fs7,
    G7,
    Gs7,
    A7,
    As7,
    B7,
    C8,
    Cs8,
    D8,
    Ds8,
    E8,
    F8,
    Fs8,
    G8,
    Gs8,
    A8,
    As8,
    B8,
    C9,
    Cs9,
    D9,
    Ds9,
    E9,
    F9,
    Fs9,
    G9,
}

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, Into, From and Into so the names can be completely ignored if prefered

Variants

C1nCs1nD1nDs1nE1nF1nFs1nG1nGs1nA1nAs1nB1nC0Cs0D0Ds0E0F0Fs0G0Gs0A0

Start of 88-note piano keyboard range

As0B0C1Cs1D1Ds1E1F1Fs1G1Gs1A1As1B1C2

Start of 5 octave synth range

Cs2D2Ds2E2F2Fs2G2Gs2A2As2B2C3Cs3D3Ds3E3F3Fs3G3Gs3A3As3B3C4

Middle C

Cs4D4Ds4E4F4Fs4G4Gs4A4As4B4C5Cs5D5Ds5E5F5Fs5G5Gs5A5As5B5C6Cs6D6Ds6E6F6Fs6G6Gs6A6As6B6C7

end of 5 octave synth range

Cs7D7Ds7E7F7Fs7G7Gs7A7As7B7C8

end of 88-note piano keyboard range

Cs8D8Ds8E8F8Fs8G8Gs8A8As8B8C9Cs9D9Ds9E9F9Fs9G9

Trait Implementations

impl From<u8> for Note[src]

impl From<i8> for Note[src]

impl PartialEq<Note> for Note[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Clone for Note[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Into<u8> for Note[src]

impl Into<i8> for Note[src]

impl Copy for Note[src]

impl Debug for Note[src]

Auto Trait Implementations

impl Unpin for Note

impl Sync for Note

impl Send for Note

impl RefUnwindSafe for Note

impl UnwindSafe for Note

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]