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

    Function toWrittenPitch

    • The note an instrument must read to sound a given concert pitch.

      The exact inverse of toSoundingPitch for every instrument: the same interval applied the other way, so the letter and the octave both come back. A concert A3 is written C4 for a clarinet in A, and a concert E flat 3 is written C4 for an alto saxophone but C5 for a baritone saxophone, which reads the same key an octave lower.

      Parameters

      • note: NoteLike

        The sounding note, at concert pitch: a note name, a MIDI number, note data, or a Note.

      • instrument: TransposingInstrument

        A built-in instrument name, or an interval naming a transposition the table does not carry.

      Returns NoteData

      The written note, as the player reads it.

      If the note is malformed, or the instrument is neither a known name nor a spelled interval.

      import { formatNote, parseNote, toWrittenPitch } from '@libraz/libcantus';
      formatNote(toWrittenPitch(parseNote('A3'), 'clarinetA')); // 'C4'
      formatNote(toWrittenPitch('Eb3', 'altoSax')); // 'C4'
      formatNote(toWrittenPitch(parseNote('Eb3'), 'baritoneSax')); // 'C5'