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

    Function chordSpecQuality

    • The quality name a spec is reported under.

      A spec no name covers still has to answer, because quality is a required field of every Chord and of the records that travel with one. The answer is the nearest name: the largest named chord whose every tone this spec also sounds, and failing that the name of its base. Nothing is lost by it — the spec and the interval template still carry the alterations, and a symbol is written from those rather than from this name.

      Parameters

      Returns ChordQuality

      The name that fits the spec exactly, or the nearest one that fits inside it.

      If any part of the spec is not one the model defines (InvalidInputError), exactly as chordFromSpec rejects it.

      import { chordSpecQuality, parseChordSymbol } from '@libraz/libcantus';
      parseChordSymbol('C7(b9,#11)').quality; // '7b9' — the nearest name
      chordSpecQuality({ rootPc: 0, base: 'maj', seventh: 'min7', alterations: [],
      additions: [], omissions: [] }); // 'dom7'