Fractional monzo with multiplicative residue and arbitrary cents offset.

Used to represent musical intervals like 5/3, 7\12 (N-of-EDO) or arbitrary intervals measured in cents.

Constructors

  • Construct a fractional monzo with multiplicative residue and arbitrary cents offset.

    Parameters

    • vector: FractionalMonzo

      Fractional monzo part.

    • Optional residual: Fraction

      Multiplicative residue that is too complex to fit in the vector part.

    • cents: number = 0

      Cents offset.

    Returns ExtendedMonzo

Properties

cents: number
residual: Fraction

Accessors

  • get numberOfComponents(): number
  • Number of components in the monzo vector part.

    Returns number

Methods

  • Find the closest approximation of the extended monzo in a harmonic series.

    Parameters

    • denominator: number

      Denominator of the harmonic series.

    Returns ExtendedMonzo

    The closest approximant in the series.

  • Simplify the extended monzo under the given threshold

    Parameters

    • Optional eps: number

      Error threshold, default = 0.001

    Returns ExtendedMonzo

    Simple approximant of the extended monzo.

  • Find the closest approximation of the extended monzo in a subharmonic series.

    Parameters

    • numerator: number

      Numerator of the subharmonic series.

    Returns ExtendedMonzo

    The closest approximant in the series.

  • Compare this extended monzo with another.

    Parameters

    Returns number

    Result < 0 if other is larger than this. Result > 0 if other is smaller than this. Result == 0 if other is equal to this in size.

  • Inverse rescale the extended monzo in pitch-space.

    Parameters

    • scalar: number | Fraction

      Inverse scaling factor.

    Returns ExtendedMonzo

    The rescaled extended monzo.

  • Check if this extended monzo has the same size as another.

    Parameters

    Returns boolean

    true if the extended monzos are of equal size.

  • Obtain a convergent of this extended monzo.

    Parameters

    • depth: number

      How many continued fraction coefficients to use after the whole part.

    Returns ExtendedMonzo

    Approximant of the extended monzo.

  • Check if the extended monzo is pure cents.

    Returns boolean

    true if the extended monzo has no vector or residual.

  • Check if the extended monzo is combination of fractional, equal temperament or cents parts.

    Returns boolean

    true if the extended monzo is not simply fractional, equal temperament or pure cents.

  • Check if the extended monzo represents a generic EDJI interval.

    Returns boolean

    true if the extended monzo can be interpreted as pitch-space fraction of a frequency-space fraction.

  • Check if the extended monzo represents a musical fraction.

    Returns boolean

    true if the extended monzo can be interpreted as a ratio in frequency-space.

  • Check if the extended monzo is a power of two in frequency space.

    Returns boolean | 0

    true if the extended monzo is a power of two.

  • Rescale the extended monzo in pitch-space.

    Parameters

    • scalar: number | Fraction

      Scaling factor.

    Returns ExtendedMonzo

    The rescaled extended monzo.

  • Rescale the extended monzo in pitch-space and store the offset as cents.

    Parameters

    • scalar: number

      Scaling factor.

    Returns ExtendedMonzo

    The rescaled extended monzo where only the cents offset differs from the original.

  • Check for strict equality between this and another extended monzo.

    Parameters

    Returns boolean

    true if the extended monzos share the same vector, residual and cents offset.

  • Convert the extended monzo to cents.

    Returns number

    Size of the extended monzo in cents.

  • Gets an array of the extended monzo representing a continued fraction. The first element always contains the whole part.

    Returns number[]

    Array of continued fraction coefficients.

  • Convert the extended monzo to pitch-space fraction of a frequency-space fraction.

    Returns [Fraction, Fraction]

    Pair of the pitch-space fraction and the equave as a frequency-space fraction.

    Throws

    An error if the extended monzo cannot be represented as an EDJI interval.

  • Convert the extended monzo to a fraction in frequency-space.

    Returns Fraction

    Musical ratio as a fraction in frequency-space.

    Throws

    An error if the extended monzo cannot be represented as a ratio.

  • Convert the extended monzo to a simple monzo with integer coefficients.

    Returns number[]

    Array of prime exponents.

    Throws

    An error if the extended monzo cannot be represented as sufficiently simple ratio in frequency-space.

  • Convert the extended monzo to cents.

    Returns number

    Size of the extended monzo in cents.

  • Convert the extended monzo to frequency-space ratio.

    Returns number

    The frequency-space multiplier corresponding to this extended monzo.

  • Construct an extended monzo from an interval measured in cents.

    Parameters

    • cents: number

      The amount of cents to convert. An octave (2/1) divided into 12 semitones 100 cents each.

    • numberOfComponents: number

      Number of components in the monzo vector part.

    Returns ExtendedMonzo

    Extended monzo with a zero vector part and the specified cents offset.

  • Construct an extended monzo from a pitch-space fraction of a frequency-space fraction.

    Parameters

    • fractionOfEquave: FractionValue

      Fraction of the equave measured in pitch-space.

    • Optional equave: FractionValue

      Equave measured in frequency-space. Defaults to the octave (2/1).

    • Optional numberOfComponents: number

      Number of components in the monzo vector part.

    Returns ExtendedMonzo

    Extended monzo representing N-of-EDO (default) or a generic EDJI interval.

  • Construct an extended monzo from a rational number.

    Parameters

    • fraction: FractionValue

      Rational number to convert.

    • numberOfComponents: number

      Number of components in the monzo vector part.

    Returns ExtendedMonzo

    Extended monzo representing the just intonation interval.

  • Constuct an extended monzo from a value measured in frequency-space.

    Parameters

    • value: number

      Musical ratio in frequency-space.

    • numberOfComponents: number

      Number of components in the monzo vector part.

    Returns ExtendedMonzo

    Extended monzo with a zero vector part and the specified value converted to a cents offset.

Generated using TypeDoc