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

    Function spellChord

    • Spell a chord's tones, in the chord's own (tertian) order, relative to a key.

      Diatonic chords spell exactly (e.g. G7 in C major -> G B D F). Chromatic chord tones take their conventional spelling; enharmonically ambiguous altered tensions may be spelled by the general convention rather than by chord function.

      Parameters

      Returns NoteData[]

      Spelled chord tones, root first.

      import { spellChord, noteNames, parseNote, majorKey, makeChord } from '@libraz/libcantus';
      // G7 in C major
      noteNames(spellChord(makeChord(7, 'dom7'), parseNote('C'), majorKey(0)));
      // ['G', 'B', 'D', 'F']