pub struct NamedTemperament {
pub name: &'static str,
pub page: &'static str,
pub revision: u64,
pub subgroup: &'static [IntegerType],
pub periods_per_equave: UnsignedIntegerType,
pub generator_rows: &'static [&'static [IntegerType]],
pub generator_ratios: &'static [&'static str],
pub generator_cents: &'static [FloatType],
pub optimization: &'static str,
pub titles: &'static str,
pub commas: &'static [&'static str],
pub moments: &'static [&'static str],
}Expand description
A regular temperament the Xenharmonic Wiki names and publishes a mapping for.
This is the published description; NamedTemperament::temperament
turns it into a crate::tuningsystem::Temperament that can answer
questions.
No Eq or Hash: a generator is a width in cents, and a float is not
a thing to compare exactly or to key a map by.
Fields§
§name: &'static strThe name it goes by.
page: &'static strThe wiki page it was read from.
revision: u64The revision of that page, so a later collection can diff.
subgroup: &'static [IntegerType]The primes it is written over; the first is the equave.
periods_per_equave: UnsignedIntegerTypeHow many periods there are to an equave.
generator_rows: &'static [&'static [IntegerType]]One row per generator, over the primes after the equave.
generator_ratios: &'static [&'static str]Each generator written as the ratio it approximates.
generator_cents: &'static [FloatType]Each generator’s width in cents, under optimization.
optimization: &'static strWhich optimum those widths are.
titles: &'static strThe infobox’s own Title, empty unless the page names more
than one temperament.
The constant is named after the page, not after this: which of several names goes with which of the subgroups a page lists is not something the infobox states, so it is recorded here rather than guessed at.
commas: &'static [&'static str]The commas it tempers out, as the wiki lists them.
moments: &'static [&'static str]The moment-of-symmetry scales the wiki lists for it, if any.
Empty above rank 2: a moment of symmetry comes of stacking one generator, and a rank-3 temperament has two.
Implementations§
Source§impl NamedTemperament
impl NamedTemperament
Sourcepub fn temperament(&self) -> Result<Temperament>
pub fn temperament(&self) -> Result<Temperament>
Builds the temperament this entry describes.
Errors where Temperament::from_mapping_rows does, which for a
collected entry means the wiki’s generators and its mapping disagree —
a mistranscription, or a page that has changed under us.
Trait Implementations§
Source§impl Clone for NamedTemperament
impl Clone for NamedTemperament
Source§fn clone(&self) -> NamedTemperament
fn clone(&self) -> NamedTemperament
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NamedTemperament
Source§impl Debug for NamedTemperament
impl Debug for NamedTemperament
Source§impl PartialEq for NamedTemperament
impl PartialEq for NamedTemperament
impl StructuralPartialEq for NamedTemperament
Auto Trait Implementations§
impl Freeze for NamedTemperament
impl RefUnwindSafe for NamedTemperament
impl Send for NamedTemperament
impl Sync for NamedTemperament
impl Unpin for NamedTemperament
impl UnsafeUnpin for NamedTemperament
impl UnwindSafe for NamedTemperament
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