pub struct Tuning { /* private fields */ }Implementations§
Source§impl Tuning
impl Tuning
pub fn new() -> Self
Sourcepub fn new_key_tuning(pitch: [f64; 128]) -> Self
pub fn new_key_tuning(pitch: [f64; 128]) -> Self
Create a new key-based tuning with given pitches. The array should contain the pitch of every key in cents.
Sourcepub fn new_octave_tuning(pitch: &[f64; 12]) -> Self
pub fn new_octave_tuning(pitch: &[f64; 12]) -> Self
Create a new octave-based tuning with given pitches. The array should contains derivation in cents from the well-tempered scale.
For example, if pitches[0] equals -33, then the C-keys will be tuned 33 cents below the well-tempered C.
pub fn as_slice(&self) -> &[f64; 128]
pub fn as_slice_mut(&mut self) -> &mut [f64; 128]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tuning
impl RefUnwindSafe for Tuning
impl Send for Tuning
impl Sync for Tuning
impl Unpin for Tuning
impl UnwindSafe for Tuning
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