@tspro/web-music-score
    Preparing search index...

    Class KeySignature

    Hierarchy (View Summary)

    Index

    Properties

    mode: Mode

    Mode: Ionian/Major = 1, Dorian = 2, ..., Locrian = 7

    tonic: string

    Tonic/root note.

    Methods

    • Get accidental for given diatonic id.

      Parameters

      • diatonicId: number

        Diatonic id.

      Returns Accidental

      • Accidental -2, -1, 0, 1 or 2.
    • Get accidental type sharps, flats, or natural (without accidentals).

      Returns AccidentalType

      • Accidental type.
    • Get natural scale notes of this key signature, natural scale has 7 steps (e.g. Major scale: W, W, H, W, W, W, H).

      Returns readonly Note[]

      • Array of notes.
    • Get note of key signature by degree value.

      Parameters

      • degree: string | number

        Degree number in range [1, 7] or string e.g "b5" or "#4".

      Returns Note

      • Note.
    • Get number of accidentals this key signature has.

      Returns number

      • Number of accidentals.
    • Get accidental notes in correct order.

      Returns readonly Note[]

      • Array of accidental notes.
    • Test equality of given key signatures.

      Parameters

      Returns boolean

      • True/false.