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

    Function chordScales

    • List the scales that fit over a chord, best fit first.

      Only the chord root is considered as the scale root, matching the conventional chord-scale relationship. Every entry of NAMED_SCALES whose pitch-class set is a superset of the chord's is returned once per distinct pitch-class set (aliased masks such as major/ionian report only the modal name), ranked by fewest extra scale tones beyond the chord, then by scale size (heptatonic before larger scales), then by scale name. For bare triads and smaller chords, heptatonic scales rank before pentatonics and other sizes: a pentatonic adds no modal color over a triad, so the seven-note modes are the more useful answer. The chromatic scale is only returned as a fallback when no other scale contains the chord.

      Parameters

      • chord: ChordData

        The chord to fit scales over.

      Returns ChordScaleMatch[]

      The matching scales rooted on the chord root, best fit first.

      import { makeChord, chordScales } from '@libraz/libcantus';
      const scales = chordScales(makeChord(0, 'maj7'));
      // scales for Cmaj7, best fit first; each is { name, rootPc: 0 }