pub enum ToneValue {
Cents(f64),
Ratio(i64, i64),
}
Expand description
Value of a tone.
The value of a tone is given either as a cents value or ratio.
Variants§
Cents(f64)
Value of a tone given as cents value.
ToneValue::Cents(1200.0); // is an octave
ToneValue::Cents(700.0); // is an 12-EDO fifth
Ratio(i64, i64)
Value of a tone given as a ratio.
ToneValue::Ratio(2, 1); // is an octave as well
ToneValue::Ratio(3, 2); // is a JI fifth
Trait Implementations§
Source§impl Ord for ToneValue
impl Ord for ToneValue
Source§impl PartialOrd for ToneValue
impl PartialOrd for ToneValue
impl Copy for ToneValue
impl Eq for ToneValue
impl StructuralPartialEq for ToneValue
Auto Trait Implementations§
impl Freeze for ToneValue
impl RefUnwindSafe for ToneValue
impl Send for ToneValue
impl Sync for ToneValue
impl Unpin for ToneValue
impl UnwindSafe for ToneValue
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