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

    Function negativeHarmonyMirror

    • Reflect a chord across the tonic–dominant axis of a key (negative harmony).

      Every pitch class p maps to (2*T + 7 - p) mod 12, where T is the key tonic — the reflection that swaps the tonic with the dominant. The mirrored pitch classes (including the bass, if set) are reassembled into a chord by detectChordBest; when no chord is recognized, the mirrored root and the original quality are used as a fallback.

      Parameters

      Returns ChordData

      The negative-harmony counterpart of the chord.

      import { negativeHarmonyMirror, makeChord, majorKey } from '@libraz/libcantus';
      negativeHarmonyMirror(makeChord(7, 'maj'), majorKey(0));
      // G major reflected across C's axis => F minor (rootPc 5, quality 'min')