@libraz/libcantus - v0.9.3
    Preparing search index...

    Function spellPitchClass

    • Spell a single pitch class relative to a spelled tonic and key.

      Diatonic pitch classes take the scale's letter for their degree; the common chromatic tones (b2, b3, #4, b6, b7) and a minor key's raised degrees (#6, #7) take their conventional, key-correct accidental spelling; anything else falls back to a sharp spelling of the nearest natural.

      Parameters

      • pc: number

        The pitch class to spell.

      • tonic: NoteData

        The spelled tonic (its letter anchors the spelling).

      • key: KeyScale

        The key/scale.

      Returns NoteData

      The spelled note (without octave).