Class FreeTemperament

Temperament with an arbitrary basis represented as an element of a Clifford algebra.

Hierarchy

  • BaseTemperament
    • FreeTemperament

Constructors

  • Construct a new temperament of an arbitrary basis.

    Parameters

    • algebra: typeof AlgebraElement

      Clifford algebra of with an all-positive metric and integer components.

    • value: AlgebraElement

      Element of the Clifford algebra representing the temperament.

    • jip: Mapping

      Natural logarithms of the basis factors.

    Returns FreeTemperament

Properties

algebra: typeof AlgebraElement

The Clifford algebra where the temperament is interpreted in. All-positive metric with integer coefficients.

jip: Mapping

Natural logarithms of the basis factors.

value: AlgebraElement

An element of the Clifford algebra representing the temperament.

Accessors

  • get dimensions(): number
  • The size of the temperament's subgroup.

    Returns number

Methods

  • Calculate the change of basis mapping from primes to the generators of the temperament.

    Parameters

    • generators: number[][]

      Period and generators used as the new basis.

    • threshold: number = 1e-5

      Zero threshold used during the calculation.

    Returns number[][]

    Change of basis matrix as an array of arrays of numbers.

  • Parameters

    Returns number[]

  • Parameters

    Returns number[]

  • Canonize the temperament in-place into wedgie form. Remove a common factor and make the lexicographically first non-zero element positive.

    Returns FreeTemperament

  • Factorize the temperament into commas.

    Parameters

    • maxDivisions: number = 99

      Maximum divisions of the equave to consider.

    Returns number[][]

    An array of commas that recreates the original temperament when passed to .fromCommas.

    Throws

    An error if the search space doesn't contain the factors.

  • Check if two temperaments are the same and have the same subgroup. Only checks numerical equality, canonize your inputs beforehand.

    Parameters

    Returns boolean

    true if the temperament is equal to the other.

  • Just intonation point.

    Parameters

    Returns number[]

    Array of logarithms of the basis factors or the factors themselves if 'ratio' was specified.

  • Obtain the mapping vector for the temperament's basis factors.

    Parameters

    • Optional options: TuningOptions

      Options determining how the temperament is interpreted as a tuning and the units of the result.

    Returns Mapping

    A vector mapping basis factors to tempered versions of their logarithms in cents (default) or the specified pitch units.

  • Get the rank of the temperament i.e. the number of inpendent intervals in the tuning.

    Returns number

    The rank of the temperament.

  • Returns true if the temperament value is zero representing the trivial temperament of a single pitch only.

    Returns boolean

  • Calculate the true kernel join of two temperaments.

    Parameters

    • other: FreeTemperament

      Another temperament in the same basis.

    • persistence: number = 100

      Search range for normalizing the result.

    • threshold: number = 1e-4

      Rounding threshold.

    Returns FreeTemperament

    A temperament tempering out commas tempered out by either temperament.

  • Calculate the true kernel meet of two temperaments.

    Parameters

    • other: FreeTemperament

      Another temperament in the same basis.

    • persistence: number = 100

      Search range for normalizing the result.

    • threshold: number = 1e-4

      Rounding threshold.

    Returns FreeTemperament

    A temperament tempering out only the commas tempered out by both temperaments.

  • Obtain the number of periods per octave (or equave) and the generators in monzo form. The procedure assumes that the temperament is canonized.

    Returns [number, Monzo[]]

    A pair representing the number of periods per equave and the generators as monzos of the temperament's subgroup.

  • Obtain the period and generator of a rank 2 temperament.

    Parameters

    • Optional options: TuningOptions

      Options determining how the temperament is interpreted as a tuning and the units of the result.

    Returns number[]

    An array of [period, generators...] in cents (default) or the specified units.

  • Get a prefix of the temperament's full wedgie that may be used to reconstruct it. Potentially lossy compression.

    Parameters

    • Optional rank: number

      The rank of the temperament.

    Returns number[]

    The first few components of the temperament's wedgie that can be used to reconstruct the temperament if it's regular enough.

  • Parameters

    • value: AlgebraElement
    • persistence: number = 100
    • threshold: number = 1e-4

    Returns AlgebraElement

  • Calculate how many steps of the rank 1 temperament represents the given interval.

    Parameters

    • interval: Monzo

      Array of exponents of the basis factors.

    Returns number

    The number of steps that represents the interval.

  • Tune a musical interval according to the temperament.

    Parameters

    • interval: Monzo

      Array of exponents of the basis factors.

    • Optional options: TuningOptions

      Options determining how the temperament is interpreted as a tuning and the units of the result.

    Returns number

    The interval tuned according to the temperament in cents (default) or the specified units.

  • Factorize the temperament into vals.

    Parameters

    • minDivisions: number = 2
    • maxDivisions: number = 99

      Maximum divisions of the equave to consider.

    • wartRadius: number = 0

      Maximum deviations from closest tunings to consider.

    • strategy: FactorizationStrategy = 'patent'

      Factorization strategy.

    • Optional subgroup: Subgroup

    Returns Val[]

    An array of vals that recreates the original temperament when passed to .fromVals.

    Throws

    An error if the search space doesn't contain the factors.

  • Calculate the true val join of two temperaments.

    Parameters

    • other: FreeTemperament

      Another temperament in the same basis.

    • persistence: number = 100

      Search range for normalizing the result.

    • threshold: number = 1e-4

      Rounding threshold.

    Returns FreeTemperament

    A temperament supported by all the vals supporting either temperament.

  • Calculate the true val meet of two temperaments.

    Parameters

    • other: FreeTemperament

      Another temperament in the same basis.

    • persistence: number = 100

      Search range for normalizing the result.

    • threshold: number = 1e-4

      Rounding threshold.

    Returns FreeTemperament

    A temperament supported only by the vals shared by both temperaments.

  • Construct a temperament tempering out all of the given commas.

    Parameters

    • commas: Comma[]

      An array of small musical intervals you want to map to unison.

    • jip: Mapping

      Natural logarithms of the basis factors.

    Returns FreeTemperament

    A FreeTemperament instance mapping all of the given commas to unison.

  • Recover a temperament from its rank prefix.

    Parameters

    • rank: number

      Rank of the original temperament.

    • wedgiePrefix: number[]

      Array of integers obtained from FreeTemperament.rankPrefix().

    • jip: Mapping

      Natural logarithms of the basis factors.

    Returns FreeTemperament

    The original temperament if reconstruction was possible.

  • Construct a temperament supported by all of the given vals.

    Parameters

    • vals: (string | number | Val)[]

      An array of step mappings for the basis factors or strings in Wart Notation. In the warts the letters of the alphabet correspond to the basis, not prime numbers.

    • jip: Mapping

      Natural logarithms of the basis factors.

    Returns FreeTemperament

    A FreeTemperament instance supported by all of the given vals.

Generated using TypeDoc