pub struct Note {
pub alphabet: Alphabet,
pub accidental: Accidental,
pub octave: u8,
}Fields§
§alphabet: Alphabet§accidental: Accidental§octave: u8Implementations§
Source§impl Note
impl Note
pub const fn new(alphabet: Alphabet, accidental: Accidental, octave: u8) -> Self
Sourcepub const fn simplify(&self) -> Self
pub const fn simplify(&self) -> Self
The enharmonic equivalent of a note will be returned in a simpler form on the note.
§Compatability
This method might not return the same exact value from release to release, however, it is guaranteed to be an enharmonic equivalent to the supplied note.
pub const fn from_id(id: Pitch) -> Self
pub const fn increment_by(&self, steps: i64) -> Self
pub const fn decrement_by(&self, steps: i64) -> Self
Trait Implementations§
Source§impl Add<Note> for Accidental
impl Add<Note> for Accidental
impl Copy for Note
impl Eq 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more