Class Subgroup

Fractional just intonation subgroup.

Constructors

  • Construct a fractional just intonation subgroup.

    Parameters

    • basis: SubgroupValue

      An array of fractions or a value that can be interpreted as a basis of the new subgroup.

    Returns Subgroup

Properties

basis: Basis

Array of fractions forming the basis of the subgroup.

Methods

  • Converts the basis factors into monzos in standard prime basis.

    Returns Monzo[]

    An array of arrays of prime exponents.

  • Check equality between subgroups.

    Parameters

    • other: Subgroup

      Another subgroup instance.

    Returns boolean

    true if the subgroups are the same.

  • Parameters

    • Optional basisMonzos: Monzo[]
    • Optional limit: number

    Returns Monzo[]

  • Calculate the val corresponding to the given warts as progressive modifications to the patent val.

    Parameters

    • divisionsOrWarts: string | number

      Number of divisions of the first basis factor or a number followed by letters of the alphabet corresponding to the primes in order with formal primes represented by letters starting from 'q'.

    Returns Val

    Array of the number of steps corresponding to each basis factor.

  • Iterate over generalized patent vals.

    Parameters

    • initialDivisions: number = 1

      First edo to consider.

    • delta: number = 0.17

      Initial leap size in bisection search.

    Returns Generator<number[], void, unknown>

  • Check if the subgroup is non-composite and non-fractional.

    Returns boolean

    true if the subgroup consists of primes only.

  • Just intonation point of the subgroup.

    Parameters

    Returns Mapping

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

  • Calculate a patent val of the subgroup.

    Parameters

    • divisions: number

      Number of divisions of the first basis factor.

    Returns Val

    Array of the number of steps corresponding to each basis factor.

  • Convert a monzo in the standard prime basis to a monzo in the subgroup's basis.

    Parameters

    • primeMonzo: Monzo

      Array of prime exponents.

    • Optional basisMonzos: Monzo[]

      Precalculated array of the subgroup's basis as arrays of prime exponents.

    Returns Monzo

    Array of basis exponents.

  • Resolve a fraction into a monzo of this subgroup.

    Parameters

    • interval: MonzoValue

      Fraction or monzo to resolve.

    • primeMapping: boolean = false

      Should be set to true if the monzo is given in terms of prime exponents. Strips away excess components.

    Returns Monzo

    Monzo given in terms of the subgroup's basis.

  • Parameters

    • Optional basisMonzos: Monzo[]

    Returns number[]

  • Convert a monzo to a fraction according to the subgroup's basis.

    Parameters

    • monzo: Monzo

      Array of basis exponents.

    Returns Fraction

    The fraction corresponding to the monzo in the subgroup's basis.

  • Convert a fraction to a monzo in the subgroup's basis.

    Parameters

    • firstValue: FractionValue

      Fraction or the numerator of a fraction.

    • Optional secondValue: number

      Optional denominator of the fraction.

    Returns [Monzo, Fraction]

    An array of basis exponents and a multiplicative residue that lies outside of the basis of the subgroup.

  • Fill in or convert a subgroup mapping to a full prime mapping.

    Parameters

    • mapping: Mapping

      Mapping given in terms of the formal primes of the subgroup.

    • units: PitchUnits = 'cents'

    Returns Mapping

    The mapping given in terms of consecutive primes.

  • Convert a monzo in the subgroup's basis to the standard prime basis.

    Parameters

    • monzo: Monzo

      Array of basis exponents.

    Returns Monzo

    Array of prime exponents.

  • Convert the subgroup to a string.

    Returns string

    The basis as a period-joined string.

  • Convert a val (step mapping) to a wart string.

    Parameters

    • val: Val

      Array of the number of steps corresponding to each basis factor.

    Returns string

    The val as wart string such as '17c'.

  • List all of the letters used to notate warts in the subgroup.

    Returns string[]

    An array of single letter strings that are valid in wart notation for the subgroup.

  • Infer a prime subgroup based on an array of commas.

    Parameters

    • commas: MonzoValue[]

      Array of commas as fractions or monzos.

    Returns Subgroup

    Smallest prime subgroup containing the commas.

Generated using TypeDoc