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

    Function chordToneRole

    • Determine a pitch's harmonic role within a chord.

      The role is derived from the pitch's interval above the chord root, reduced modulo 12. A major sixth (9) reads as a sixth for sixth chords but as a seventh for a diminished-seventh chord; ninths and other tensions have no basic role and return null.

      Parameters

      • pitch: number

        MIDI pitch or bare pitch class.

      • chord: ChordData

        The chord providing the root reference.

      Returns "root" | "third" | "fifth" | "sixth" | "seventh" | null

      The chord-tone role, or null if the pitch has no basic role.