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

    Type Alias SpellingContext

    The musical evidence around a pitch, used to refine an enharmonic choice the key alone cannot make.

    Every field is optional and every field is only ever advisory: a context that says nothing about the pitch leaves its key spelling untouched.

    type SpellingContext = {
        chord?: ChordData;
        chordRoot?: number;
        previous?: number;
        next?: number;
    }
    Index
    chord?: ChordData

    The chord sounding under the pitch, when the caller holds it.

    A chord names its own tones better than its root alone can: it carries the degree it writes each tone as, so a pitch that is one of its tones is spelled exactly as spellChord spells it. Supersedes chordRoot, which stays for callers holding nothing but a root pitch class.

    chordRoot?: number

    Root pitch class of the chord sounding under the pitch, when known.

    previous?: number

    The pitch immediately before this one (MIDI pitch or bare pitch class).

    next?: number

    The pitch immediately after this one (MIDI pitch or bare pitch class).