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

    Function isPerfectInterval

    • Test whether an interval is a perfect consonance: the unison/octave or the fifth.

      The perfect fourth is deliberately excluded. This is the predicate the parallel-motion rules are written against, where the fourth behaves as a dissonance between two voices; classifyInterval is the general classifier, and it treats the fourth as context-dependent.

      Parameters

      • semitones: number

        Interval size in semitones (may be negative or compound).

      Returns boolean

      True for the unison/octave (0) and the perfect fifth (7) mod 12.