Struct wasm4_tracker::NotePitch
source · pub struct NotePitch {
pub key: NotePitchKey,
pub octave: i8,
}
Expand description
Note pitch.
Fields§
§key: NotePitchKey
Key.
octave: i8
Octave.
Implementations§
source§impl NotePitch
impl NotePitch
sourcepub fn new(key: NotePitchKey, octave: i8) -> Self
pub fn new(key: NotePitchKey, octave: i8) -> Self
Build a new note pitch.
sourcepub fn as_frequency(&self) -> u16
pub fn as_frequency(&self) -> u16
Compute the note frequency.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for NotePitch
impl Send for NotePitch
impl Sync for NotePitch
impl Unpin for NotePitch
impl UnwindSafe for NotePitch
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