pub enum AdaptiveTuningSystem {
Recursive {
root_tuning_system: TuningSystem,
local_tuning_system: TuningSystem,
},
}Expand description
Adaptive tuning systems whose note frequencies depend on harmonic context.
Variants§
Recursive
A recursive tuning system:
frequency = base * root_tuning[context] * local_tuning[index]context is the absolute root index, such as E above C.
index is the local interval above that root, such as a major third.
Fields
§
root_tuning_system: TuningSystemTuning system used to place the chord root.
§
local_tuning_system: TuningSystemTuning system used inside the chord root.
Implementations§
Source§impl AdaptiveTuningSystem
impl AdaptiveTuningSystem
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
Returns the frequency in hertz for a local degree inside a harmonic context.
For example, in recursive JI:
context = 4 // E above C
index = 4 // major third above E
frequency = C * 5/4 * 5/4
= C * 25/16Sourcepub 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
Returns cents offset against equal temperament for the resulting absolute pitch.
This assumes index is a local interval above context, so the equal-tempered
comparison pitch is context + index.
Sourcepub fn cents_vs_fixed_at(
self,
fixed_tuning_system: TuningSystem,
context: FloatType,
index: FloatType,
size: Option<UnsignedIntegerType>,
) -> FloatType
pub fn cents_vs_fixed_at( self, fixed_tuning_system: TuningSystem, context: FloatType, index: FloatType, size: Option<UnsignedIntegerType>, ) -> FloatType
Returns cents offset against a fixed tuning table for the same absolute pitch.
Useful for comparing recursive JI against fixed-C JI.
Trait Implementations§
Source§impl Clone for AdaptiveTuningSystem
impl Clone for AdaptiveTuningSystem
Source§fn clone(&self) -> AdaptiveTuningSystem
fn clone(&self) -> AdaptiveTuningSystem
Returns a duplicate of the value. Read more
1.0.0 · 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 AdaptiveTuningSystem
impl Debug for AdaptiveTuningSystem
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 PartialEq for AdaptiveTuningSystem
impl PartialEq for AdaptiveTuningSystem
impl Copy for AdaptiveTuningSystem
impl Eq for AdaptiveTuningSystem
impl StructuralPartialEq for AdaptiveTuningSystem
Auto Trait Implementations§
impl Freeze for AdaptiveTuningSystem
impl RefUnwindSafe for AdaptiveTuningSystem
impl Send for AdaptiveTuningSystem
impl Sync for AdaptiveTuningSystem
impl Unpin for AdaptiveTuningSystem
impl UnsafeUnpin for AdaptiveTuningSystem
impl UnwindSafe for AdaptiveTuningSystem
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,
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