@libraz/libcantus - v1.1.0
    Preparing search index...

    Function augmentedSixthFromPitchClasses

    • Read a set of sounding pitch classes over a sounding bass as an augmented sixth, or null when they are none.

      The reading a caller holding no spelling has to make for itself: pitch classes name no accidentals, so nothing downstream can tell the German sixth from the bVI7 it sounds like once the letters are gone. The chord returned is the one augmentedSixthChord builds, spelling and all, so it keeps identifying as an augmented sixth everywhere it travels.

      Not every b6-1-b3-#4 over a b6 bass is an augmented sixth, and this cannot know which one is: it answers what the tones would spell, and the caller decides whether that reading is the one the music supports.

      Parameters

      • pcs: readonly number[]

        The sounding pitch classes; duplicates and unreduced values are fine.

      • bassPc: number

        The pitch class sounding in the bass.

      • key: SpelledKeyLike

        The prevailing key, as a key name, a key/scale, or a Key.

      Returns ChordData | null

      The augmented-sixth chord, or null.

      augmentedSixthKind to read a chord that already carries its spelling.

      import { augmentedSixthFromPitchClasses, majorKey } from '@libraz/libcantus';
      // Ab C Eb Gb sounding over Ab in C: the German sixth, spelled with its F#.
      augmentedSixthFromPitchClasses([8, 0, 3, 6], 8, majorKey(0))?.quality; // 'dom7'