[][src]Enum musictheory::types::Note

pub enum Note {
    A(Accidental),
    B(Accidental),
    C(Accidental),
    D(Accidental),
    E(Accidental),
    F(Accidental),
    G(Accidental),
}

Notes are names given to a specific PitchClass.

Variants

A(Accidental)
B(Accidental)
C(Accidental)
D(Accidental)
E(Accidental)
F(Accidental)
G(Accidental)

Methods

impl Note[src]

pub fn sharps() -> [Note; 12][src]

pub fn flats() -> [Note; 12][src]

pub fn sharp(&self) -> bool[src]

True if a Note is sharp or double sharp.

pub fn flat(&self) -> bool[src]

True if a Note is flat or double flat.

pub fn natural(&self) -> bool[src]

True if a Note is natural.

pub fn accidental(&self) -> Accidental[src]

Return associated Accidental.

pub fn pitch_class(&self) -> PitchClass[src]

PitchClass of this Note.

pub fn enharmonic(&self) -> bool[src]

Is this Note enharmonic.

Trait Implementations

impl Add<Interval> for Note[src]

type Output = Option<Self>

The resulting type after applying the + operator.

impl Clone for Note[src]

impl Copy for Note[src]

impl Debug for Note[src]

impl Display for Note[src]

impl Eq for Note[src]

impl Ord 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]

impl Sub<Interval> for Note[src]

type Output = Option<Self>

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Note

impl Send for Note

impl Sync for Note

impl Unpin for Note

impl UnwindSafe 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.