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

    Function noteToMidi

    • MIDI number of a note (middle C = C4 = 60).

      Parameters

      • note: NoteData

        The note; must carry an octave.

      Returns number

      The MIDI number.

      If the note has no octave.

      import { noteToMidi, parseNote } from '@libraz/libcantus';
      noteToMidi(parseNote('A4')); // 69