Enum nom_midi::note::Note [] [src]

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

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

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 Debug for Note
[src]

Formats the value using the given formatter.

impl PartialEq for Note
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Copy for Note
[src]

impl Clone for Note
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl From<u8> for Note
[src]

Performs the conversion.

impl Into<u8> for Note
[src]

Performs the conversion.

impl From<i8> for Note
[src]

Performs the conversion.

impl Into<i8> for Note
[src]

Performs the conversion.