pub struct TuningRemap {
pub cents: i32,
}Expand description
Microtonal tuning offset expressed in cents.
Fields§
§cents: i32Offset in cents (100 cents to a semitone).
Implementations§
Source§impl TuningRemap
impl TuningRemap
Sourcepub fn semitone_delta(&self) -> i32
pub fn semitone_delta(&self) -> i32
Rounds the cents offset to the nearest whole semitone.
§Examples
use sim_lib_music_transform::TuningRemap;
assert_eq!(TuningRemap::new(150).semitone_delta(), 2);
assert_eq!(TuningRemap::new(40).semitone_delta(), 0);Trait Implementations§
Source§impl Clone for TuningRemap
impl Clone for TuningRemap
Source§fn clone(&self) -> TuningRemap
fn clone(&self) -> TuningRemap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TuningRemap
impl Debug for TuningRemap
impl Eq for TuningRemap
Source§impl PartialEq for TuningRemap
impl PartialEq for TuningRemap
impl StructuralPartialEq for TuningRemap
Auto Trait Implementations§
impl Freeze for TuningRemap
impl RefUnwindSafe for TuningRemap
impl Send for TuningRemap
impl Sync for TuningRemap
impl Unpin for TuningRemap
impl UnsafeUnpin for TuningRemap
impl UnwindSafe for TuningRemap
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