chordsheetjs
    Preparing search index...

    Class Key

    Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral).

    The only function considered public API is Key.distance

    Implements

    • KeyProperties
    Index

    Accessors

    • get modifier(): Accidental | null

      Returns Accidental | null

      Use accidental instead

    • get preferredModifier(): Accidental | null

      Returns Accidental | null

      Use preferredAccidental instead

    • get unicodeModifier(): string | null

      Returns string | null

      Use unicodeAccidental instead

    Methods

    • Returns a string representation of an object.

      Parameters

      • __namedParameters: { showMinor?: boolean; useUnicodeModifier?: boolean } = {}

      Returns string

    • Parameters

      • newAccidental: Accidental | null

      Returns Key

      Use useAccidental instead

    • Calculates the distance in semitones between one key and another.

      Parameters

      • oneKey: string | Key

        the key

      • otherKey: string | Key

        the other key

      Returns number

      the distance in semitones

    • Parameters

      • key: string
      • accidental: Accidental | null
      • type: ChordType

      Returns string

      Use keyWithAccidental instead