pub enum AnyTuningSystem {
Fixed(TuningSystem),
Adaptive(AdaptiveTuningSystem),
}Expand description
Either a normal tuning system or a context-sensitive adaptive tuning system.
Variants§
Fixed(TuningSystem)
A fixed system, which answers the same way whatever it sounds against.
Adaptive(AdaptiveTuningSystem)
An adaptive system, whose answer depends on the context it is given.
Implementations§
Source§impl AnyTuningSystem
impl AnyTuningSystem
Sourcepub fn frequency_at(
self,
context: FloatType,
index: FloatType,
size: Option<UnsignedIntegerType>,
) -> FloatType
pub fn frequency_at( self, context: FloatType, index: FloatType, size: Option<UnsignedIntegerType>, ) -> FloatType
The frequency of a degree, in Hz.
context is the frequency an adaptive system tunes against; a fixed
system ignores it.
Sourcepub fn cents_at(
self,
context: FloatType,
index: FloatType,
size: Option<UnsignedIntegerType>,
) -> FloatType
pub fn cents_at( self, context: FloatType, index: FloatType, size: Option<UnsignedIntegerType>, ) -> FloatType
The degree’s distance above the tonic, in cents.
context is the frequency an adaptive system tunes against; a fixed
system ignores it.
Sourcepub fn is_adaptive(self) -> bool
pub fn is_adaptive(self) -> bool
Whether this system’s answers depend on the context they are asked in.
Trait Implementations§
Source§impl Clone for AnyTuningSystem
impl Clone for AnyTuningSystem
Source§fn clone(&self) -> AnyTuningSystem
fn clone(&self) -> AnyTuningSystem
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 moreimpl Copy for AnyTuningSystem
Source§impl Debug for AnyTuningSystem
impl Debug for AnyTuningSystem
Source§impl<'de> Deserialize<'de> for AnyTuningSystem
Available on crate feature serde only.
impl<'de> Deserialize<'de> for AnyTuningSystem
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AnyTuningSystem
Source§impl From<AdaptiveTuningSystem> for AnyTuningSystem
impl From<AdaptiveTuningSystem> for AnyTuningSystem
Source§fn from(adaptive_tuning_system: AdaptiveTuningSystem) -> Self
fn from(adaptive_tuning_system: AdaptiveTuningSystem) -> Self
Converts to this type from the input type.
Source§impl From<TuningSystem> for AnyTuningSystem
impl From<TuningSystem> for AnyTuningSystem
Source§fn from(tuning_system: TuningSystem) -> Self
fn from(tuning_system: TuningSystem) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AnyTuningSystem
impl PartialEq for AnyTuningSystem
Source§impl Serialize for AnyTuningSystem
Available on crate feature serde only.
impl Serialize for AnyTuningSystem
Available on crate feature
serde only.impl StructuralPartialEq for AnyTuningSystem
Auto Trait Implementations§
impl Freeze for AnyTuningSystem
impl RefUnwindSafe for AnyTuningSystem
impl Send for AnyTuningSystem
impl Sync for AnyTuningSystem
impl Unpin for AnyTuningSystem
impl UnsafeUnpin for AnyTuningSystem
impl UnwindSafe for AnyTuningSystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more