Function approximatePrimeLimit

  • Approximate a musical interval by ratios of which are within a prime limit with exponents that do not exceed the maximimum, exponent of 2 ignored.

    Parameters

    • cents: number

      Size of the musical interval measured in cents.

    • limitIndex: number

      The ordinal of the prime of the limit.

    • maxExponent: number
    • maxError: number = 600

      Maximum error from the interval for inclusion in the result.

    • maxLength: number = 100

      Maximum number of approximations to return.

    Returns Fraction[]

    All valid fractions within maxError cents of the input value sorted by closenesss.