Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChordSymbols

Class containing static methods related to chord symbol interpretation. These functions make use of the Tonal.js music theory library, and are used when converting chord symbols to model inputs.

Hierarchy

  • ChordSymbols

Index

Methods

Methods

Static pitches

  • pitches(chord: string): number[]
  • Returns an array containing integers (0-11) representing the pitch classes in a chord.

    throws

    {ChordSymbolException} If the chord cannot be recognized.

    Parameters

    • chord: string

      A chord symbol string.

    Returns number[]

    An array of integer pitch classes in the chord.

Static quality

  • Returns the chord quality (major, minor, augmented, diminished, or other).

    throws

    {ChordSymbolException} If the chord cannot be recognized.

    Parameters

    • chord: string

      A chord symbol string.

    Returns ChordQuality

    The ChordQuality enum value specifying the quality.

Static root

  • root(chord: string): number
  • Returns an integer (0-11) representing the pitch class of the chord root.

    throws

    {ChordSymbolException} If the chord root cannot be determined.

    Parameters

    • chord: string

      A chord symbol string.

    Returns number

    The integer pitch class of the chord root.

Generated using TypeDoc