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

    Function isDiatonic

    • Whether every pitch class of a chord belongs to the key's scale.

      The test is strict against the key's own mode mask: in a natural-minor key the harmonic-minor dominant (major V) is not diatonic, since the raised leading tone lies outside the mask. Borrowing predicates treat that case as an in-key alteration separately (see isBorrowedChord).

      Parameters

      Returns boolean

      True if all chord pitch classes are scale tones.