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

    Function createsVerticalDissonance

    • Whether two simultaneous voices form a dissonance.

      Given spelled notes the spelling decides, so a diminished fourth reads as the dissonance it is. Given MIDI integers only the sounding interval is available, which cannot tell that fourth from a major third; use the spelled form wherever the exercise is written in notes.

      Parameters

      • a: NoteData

        First voice.

      • b: NoteData

        Second voice.

      • twoVoice: boolean

        When true, the perfect fourth counts as dissonant.

      Returns boolean

      True when the vertical interval is dissonant.

      import { createsVerticalDissonance, parseNote } from '@libraz/libcantus';
      createsVerticalDissonance(parseNote('Fb4'), parseNote('C4'), true); // true — d4
      createsVerticalDissonance(64, 60, true); // false — the same pitches read as a major third
    • Whether two simultaneous voices form a dissonance.

      Given spelled notes the spelling decides, so a diminished fourth reads as the dissonance it is. Given MIDI integers only the sounding interval is available, which cannot tell that fourth from a major third; use the spelled form wherever the exercise is written in notes.

      Parameters

      • a: number

        First voice.

      • b: number

        Second voice.

      • twoVoice: boolean

        When true, the perfect fourth counts as dissonant.

      Returns boolean

      True when the vertical interval is dissonant.

      import { createsVerticalDissonance, parseNote } from '@libraz/libcantus';
      createsVerticalDissonance(parseNote('Fb4'), parseNote('C4'), true); // true — d4
      createsVerticalDissonance(64, 60, true); // false — the same pitches read as a major third