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

    Function detectChordBest

    • The single best chord interpretation of a pitch set, or null if none.

      Parameters

      • pitches: readonly number[]

        MIDI pitches or bare pitch classes.

      • opts: DetectChordOptions = {}

      Returns ChordData | null

      The top-ranked chord, or null when nothing matches.

      import { detectChordBest } from '@libraz/libcantus';
      detectChordBest([60, 64, 67]); // C major triad: { rootPc: 0, quality: 'maj', ... }