Class ColorInterval

Interval of Color Notation.

Constructors

  • Construct an interval of Color Notation.

    Parameters

    • stepspan: number

      Zero indexed size class of the interval. A musical 6th has a stepspan of 5.

    • magnitude: number

      Complexity class of the interval. 0 = central, 1 = large, -1 = small etc.

    • offWhite: Monzo

      The colors of the interval as a monzo with zero twos and threes components.

    • poQu: number = 0

      Stepspan adjustment. Adds pythagorean commas.

    Returns ColorInterval

Properties

magnitude: number

Complexity class of the interval. 0 = central, 1 = large, -1 = small etc.

offWhite: Monzo

The colors of the interval as a monzo with zero twos and threes components.

poQu: number

Stepspan adjustment. Adds pythagorean commas.

stepspan: number

Zero indexed size class of the interval. A musical 6th has a stepspan of 5.

Accessors

  • get degree(): number
  • Get the (one-indexed) degree of the color interval.

    Returns number

Methods

  • Convert the interval into a monzo with integer components.

    Returns Monzo

    Array of exponents of consecutive prime numbers up to 31.

  • Check if a string can be parsed into a ColorInterval instance.

    Parameters

    • token: string

      String to check if it can be parsed.

    Returns boolean

    true if the string is valid input to ColorInterval.fromString.

  • Convert a monzo or fraction to an interval of Color Notation.

    Parameters

    Returns ColorInterval

    Color interval corresponding to the fraction.

  • Parse a string in abbreviated Color Notation into a ColorInterval instance.

    Parameters

    • token: string

      String to parse such as 'zg5'.

    Returns ColorInterval

    Instance of ColorInterval.

  • Parse a string in verbose Color Notation into a ColorInterval instance.

    Parameters

    • token: string

      String to parse such as 'Zogu Fifth'.

    • Optional degree: number

      Optional numeric degree.

    Returns ColorInterval

    Instance of ColorInterval.

Generated using TypeDoc