Struct Note

Source
pub struct Note(/* private fields */);
Expand description

Represents a midi note number

§Note

  • 12-tone english named note constants are calculated with 0 corresponding to C-2 and 127 to G8, C4 is 72

Implementations§

Source§

impl Note

Source

pub const C2m: Note

Source

pub const Cs2m: Note

Source

pub const D2m: Note

Source

pub const Ds2m: Note

Source

pub const E2m: Note

Source

pub const F2m: Note

Source

pub const Fs2m: Note

Source

pub const G2m: Note

Source

pub const Gs2m: Note

Source

pub const A2m: Note

Source

pub const As2m: Note

Source

pub const B2m: Note

Source

pub const C1m: Note

Source

pub const Cs1m: Note

Source

pub const D1m: Note

Source

pub const Ds1m: Note

Source

pub const E1m: Note

Source

pub const F1m: Note

Source

pub const Fs1m: Note

Source

pub const G1m: Note

Source

pub const Gs1m: Note

Source

pub const A1m: Note

Source

pub const As1m: Note

Source

pub const B1m: Note

Source

pub const C0: Note

Source

pub const Cs0: Note

Source

pub const D0: Note

Source

pub const Ds0: Note

Source

pub const E0: Note

Source

pub const F0: Note

Source

pub const Fs0: Note

Source

pub const G0: Note

Source

pub const Gs0: Note

Source

pub const A0: Note

Source

pub const As0: Note

Source

pub const B0: Note

Source

pub const C1: Note

Source

pub const Cs1: Note

Source

pub const D1: Note

Source

pub const Ds1: Note

Source

pub const E1: Note

Source

pub const F1: Note

Source

pub const Fs1: Note

Source

pub const G1: Note

Source

pub const Gs1: Note

Source

pub const A1: Note

Source

pub const As1: Note

Source

pub const B1: Note

Source

pub const C2: Note

Source

pub const Cs2: Note

Source

pub const D2: Note

Source

pub const Ds2: Note

Source

pub const E2: Note

Source

pub const F2: Note

Source

pub const Fs2: Note

Source

pub const G2: Note

Source

pub const Gs2: Note

Source

pub const A2: Note

Source

pub const As2: Note

Source

pub const B2: Note

Source

pub const C3: Note

Source

pub const Cs3: Note

Source

pub const D3: Note

Source

pub const Ds3: Note

Source

pub const E3: Note

Source

pub const F3: Note

Source

pub const Fs3: Note

Source

pub const G3: Note

Source

pub const Gs3: Note

Source

pub const A3: Note

Source

pub const As3: Note

Source

pub const B3: Note

Source

pub const C4: Note

Source

pub const Cs4: Note

Source

pub const D4: Note

Source

pub const Ds4: Note

Source

pub const E4: Note

Source

pub const F4: Note

Source

pub const Fs4: Note

Source

pub const G4: Note

Source

pub const Gs4: Note

Source

pub const A4: Note

Source

pub const As4: Note

Source

pub const B4: Note

Source

pub const C5: Note

Source

pub const Cs5: Note

Source

pub const D5: Note

Source

pub const Ds5: Note

Source

pub const E5: Note

Source

pub const F5: Note

Source

pub const Fs5: Note

Source

pub const G5: Note

Source

pub const Gs5: Note

Source

pub const A5: Note

Source

pub const As5: Note

Source

pub const B5: Note

Source

pub const C6: Note

Source

pub const Cs6: Note

Source

pub const D6: Note

Source

pub const Ds6: Note

Source

pub const E6: Note

Source

pub const F6: Note

Source

pub const Fs6: Note

Source

pub const G6: Note

Source

pub const Gs6: Note

Source

pub const A6: Note

Source

pub const As6: Note

Source

pub const B6: Note

Source

pub const C7: Note

Source

pub const Cs7: Note

Source

pub const D7: Note

Source

pub const Ds7: Note

Source

pub const E7: Note

Source

pub const F7: Note

Source

pub const Fs7: Note

Source

pub const G7: Note

Source

pub const Gs7: Note

Source

pub const A7: Note

Source

pub const As7: Note

Source

pub const B7: Note

Source

pub const C8: Note

Source

pub const Cs8: Note

Source

pub const D8: Note

Source

pub const Ds8: Note

Source

pub const E8: Note

Source

pub const F8: Note

Source

pub const Fs8: Note

Source

pub const G8: Note

Source

pub const MIN: Note = Self::C2m

The minimum note value

Source

pub const MAX: Note = Self::G8

The maximum note value

Source

pub const fn new(val: u8) -> Note

Create a new Note

§Arguments
  • val - the note number value
§Note
  • The val will be clamped so it is in the 0..127 valid range

Trait Implementations§

Source§

impl Clone for Note

Source§

fn clone(&self) -> Note

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Note

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<u8> for Note

Source§

fn from(note: u8) -> Note

Converts to this type from the input type.
Source§

impl PartialEq for Note

Source§

fn eq(&self, other: &Note) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Note

Source§

impl Eq for Note

Source§

impl StructuralPartialEq for Note

Auto Trait Implementations§

§

impl Freeze for Note

§

impl RefUnwindSafe for Note

§

impl Send for Note

§

impl Sync for Note

§

impl Unpin for Note

§

impl UnwindSafe for Note

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.