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

    Function formatNote

    • Render a Note as a note name, in any supported notation system.

      The inverse of parseNote when both are given the same system, including double accidentals and octaves. Without one, parseNote detects the system and reads a bare B as the English B natural, so a German B flat written as 'b' does not survive a round trip that names no system.

      Parameters

      • note: NoteData

        The note to format.

      • Optionalopts: NoteNameOptions

        system writes the name in that notation system instead of English.

      Returns string

      The note name, including the octave when present.

      import { formatNote, parseNote } from '@libraz/libcantus';
      formatNote(parseNote('C#4')); // 'C#4'
      formatNote(parseNote('G#'), { system: 'german' }); // 'gis'
      formatNote(parseNote('G#'), { system: 'japanese' }); // '嬰ト'