pub enum TuningSystem {
Show 17 variants
EqualTemperament {
octave_size: UnsignedIntegerType,
},
RecursiveEqualTemperament {
octave_size: UnsignedIntegerType,
},
WholeTone,
QuarterTone,
JustIntonation,
JustIntonation24,
PythagoreanTuning,
FiveLimit,
ElevenLimit,
FortyThreeTone,
StepMethod,
Javanese,
Thai,
Indian,
IndianAlt,
Indian22,
IndianFull,
}Expand description
Supported tuning systems and ratio tables.
Variants§
EqualTemperament
Equal temperament with a configurable octave size.
Fields
octave_size: UnsignedIntegerTypeNumber of equal divisions in each octave.
RecursiveEqualTemperament
Recursive equal temperament with a configurable octave size.
Fields
octave_size: UnsignedIntegerTypeNumber of equal divisions in each octave.
WholeTone
Six-tone equal temperament.
QuarterTone
Twenty-four-tone equal temperament.
JustIntonation
Twelve-tone just intonation table.
JustIntonation24
Twenty-four-tone just intonation table.
PythagoreanTuning
Twelve-tone Pythagorean tuning table.
FiveLimit
Twelve-tone five-limit table.
ElevenLimit
Twenty-nine-tone eleven-limit table.
FortyThreeTone
Forty-three-tone ratio table.
StepMethod
Twelve-tone step-method equal temperament.
Javanese
Five-tone Javanese equal-temperament approximation.
Thai
Seven-tone Thai equal-temperament approximation.
Indian
Seven-tone Indian scale table.
IndianAlt
Alternate seven-tone Indian scale table.
Indian22
Twenty-two-tone Indian scale table.
IndianFull
Full twenty-two-tone Indian scale table.
Implementations§
Source§impl TuningSystem
impl TuningSystem
Sourcepub fn display_name(self) -> &'static str
pub fn display_name(self) -> &'static str
Returns a compact display name for this tuning system.
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Returns a short description of this tuning system.
Sourcepub fn label(self, index: UnsignedIntegerType) -> String
pub fn label(self, index: UnsignedIntegerType) -> String
Returns a display label for a degree index.
Sourcepub fn octave(self, index: UnsignedIntegerType) -> UnsignedIntegerType
pub fn octave(self, index: UnsignedIntegerType) -> UnsignedIntegerType
Returns the octave number containing a degree index.
Sourcepub fn frequency(self, index: UnsignedIntegerType) -> FloatType
pub fn frequency(self, index: UnsignedIntegerType) -> FloatType
Returns the frequency in hertz for a degree index.
Sourcepub fn frequency_at(self, index: FloatType) -> FloatType
pub fn frequency_at(self, index: FloatType) -> FloatType
Returns the frequency in hertz for a fractional degree index.
Sourcepub fn cents(self, index: UnsignedIntegerType) -> FloatType
pub fn cents(self, index: UnsignedIntegerType) -> FloatType
Returns cents offset from equal temperament for a degree index.
Sourcepub fn cents_at(self, index: FloatType) -> FloatType
pub fn cents_at(self, index: FloatType) -> FloatType
Returns cents offset from equal temperament for a fractional degree index.
Sourcepub fn octave_size(self) -> UnsignedIntegerType
pub fn octave_size(self) -> UnsignedIntegerType
Returns the number of degrees in one octave for this tuning system.
Trait Implementations§
Source§impl Clone for TuningSystem
impl Clone for TuningSystem
Source§fn clone(&self) -> TuningSystem
fn clone(&self) -> TuningSystem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TuningSystem
impl Debug for TuningSystem
Source§impl<'de> Deserialize<'de> for TuningSystem
impl<'de> Deserialize<'de> for TuningSystem
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>,
Source§impl Display for TuningSystem
impl Display for TuningSystem
Source§impl FromStr for TuningSystem
impl FromStr for TuningSystem
Source§impl PartialEq for TuningSystem
impl PartialEq for TuningSystem
Source§impl Serialize for TuningSystem
impl Serialize for TuningSystem
impl Copy for TuningSystem
impl Eq for TuningSystem
impl StructuralPartialEq for TuningSystem
Auto Trait Implementations§
impl Freeze for TuningSystem
impl RefUnwindSafe for TuningSystem
impl Send for TuningSystem
impl Sync for TuningSystem
impl Unpin for TuningSystem
impl UnsafeUnpin for TuningSystem
impl UnwindSafe for TuningSystem
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
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>
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>
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