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

    Function spelledInterval

    • The spelled interval from one note to another.

      When both notes carry octaves, the interval reflects their full signed distance (so C4 -> C5 is a perfect octave). When either lacks an octave the interval is measured within a single ascending octave from a to b.

      Parameters

      Returns SpelledInterval

      The diatonic number, quality, and semitone span.

      import { spelledInterval, parseNote } from '@libraz/libcantus';
      spelledInterval(parseNote('C4'), parseNote('G4'));
      // { number: 5, quality: 'P', semitones: 7 }