sonic-weave
    Preparing search index...

    Class Temperament

    Regular temperament combining multiple vals to a more optimal tuning.

    Index

    Constructors

    • Construct a new temperament from an array of svals.

      Parameters

      • mapping: number[][]

        A matrix where the rows are linearly independent subgroup vals.

      • Optionalbasis: ValBasis

        Basis of the svals.

      • Optionalweights: number[]

        Additional weights on top of Tenney weights to tweak what is considered optimal.

      • pureEquaves: boolean = false

        Boolean flag to force the tuning of the first basis element to remain pure.

      • metric: FormalPrimeMetric = 'subgroup'

      Returns Temperament

    Properties

    basis: ValBasis
    canonicalMapping: number[][]
    commaBasis: ValBasis
    preimage: ValBasis
    pureEquaves: boolean
    sgens: number[][]
    weights: number[]

    Accessors

    • get generators(): number[]

      Obtain the generators of this temperament in cents.

      Returns number[]

      An array of cents values.

    • get numberOfPeriods(): number

      Obtain the number of periods per first basis element (octave or equave).

      Returns number

    • get rank(): number

      Obtain the number of independent generators of this temperament.

      Returns number

    • get subgroupMapping(): number[]

      Tuning in cents of this temperament's subgroup basis.

      Returns number[]

    Methods

    • Produce an array of generator coefficients.

      Parameters

      Returns Interval[]

      An array representing the number of generators adding up to the value.

    • Check if this temperament is the same as another.

      Parameters

      Returns boolean

      true if this temperament is the same as the other.

    • Compute the root mean squared error against the just intonation point.

      Returns number

      The TE error.

    • Simplify a rational value based on equivalences available in this temperament.

      Parameters

      • monzo: TimeMonzo

        A rational value to simplify.

      Returns TimeMonzo

      A rational value with reduced tenney height if found. The result is tuned the same as the original by this temperament.

    • Check if this temperament is strictly the same as another.

      Parameters

      Returns boolean

      true if this temperament is strictly the same as the other.

    • Tune a value according to this temperament.

      Parameters

      Returns TimeReal

      The value retuned according this temperament's optimality criteria.

    • Produce a faithful string representation of this temperament.

      Returns string

      A string that when evaluated reproduces a value equal to this temperament.

    • Construct a temperament that tempers out the given commas.

      Parameters

      • commas: TimeMonzo[]

        Commas to temper out. The number of commas decides the co-rank of the temperament.

      • Optionalbasis: ValBasis

        Optional basis. Leave undefined to automatically infer from commas.

      • Optionalweights: number[]

        Additional weights on top of Tenney weights to tweak what is considered optimal.

      • pureEquaves: boolean = false

        Boolean flag to force the tuning of the first basis element to remain pure.

      • metric: FormalPrimeMetric = 'subgroup'
      • fullPrimeLimit: boolean = false

        If no basis is given, use the full prime limit instead of a minimal prime subgroup.

      Returns Temperament

      A higher rank temperament. Lower co-rank than just intonation.

    • Construct a temperament that retains the properties shared by all of the given vals.

      Parameters

      • vals: Val[]

        Vals to mix into a more optimal combination. The number of vals decides the rank of the temperament.

      • Optionalweights: number[]

        Additional weights on top of Tenney weights to tweak what is considered optimal.

      • pureEquaves: boolean = false

        Boolean flag to force the tuning of the first basis element to remain pure.

      • metric: FormalPrimeMetric = 'subgroup'

      Returns Temperament

      A higher rank temperament.