[][src]Enum midi_event::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

C1n
Cs1n
D1n
Ds1n
E1n
F1n
Fs1n
G1n
Gs1n
A1n
As1n
B1n
C0
Cs0
D0
Ds0
E0
F0
Fs0
G0
Gs0
A0

Start of 88-note piano keyboard range

As0
B0
C1
Cs1
D1
Ds1
E1
F1
Fs1
G1
Gs1
A1
As1
B1
C2

Start of 5 octave synth range

Cs2
D2
Ds2
E2
F2
Fs2
G2
Gs2
A2
As2
B2
C3
Cs3
D3
Ds3
E3
F3
Fs3
G3
Gs3
A3
As3
B3
C4

Middle C

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

end of 5 octave synth range

Cs7
D7
Ds7
E7
F7
Fs7
G7
Gs7
A7
As7
B7
C8

end of 88-note piano keyboard range

Cs8
D8
Ds8
E8
F8
Fs8
G8
Gs8
A8
As8
B8
C9
Cs9
D9
Ds9
E9
F9
Fs9
G9

Trait Implementations

impl Clone for Note[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]

impl Ord for Note[src]

impl Parse<u8> for Note[src]

impl PartialEq<Note> for Note[src]

impl PartialOrd<Note> for Note[src]

impl StructuralEq for Note[src]

impl StructuralPartialEq for Note[src]

Auto Trait Implementations

impl Send for Note

impl Sync for Note

impl Unpin for Note

Blanket Implementations

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

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

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

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

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.