OpenSheetMusicDisplay
    Preparing search index...

    Interface BrailleState

    State passed between measures during braille conversion. Persists across measure boundaries to maintain context.

    interface BrailleState {
        activeOctaveShift?: OctaveShift;
        activeSlurs: Set<Slur>;
        currentClef: ClefEnum;
        currentKey?: KeyInstruction;
        currentRhythm?: Fraction;
        ensembleMode?: boolean;
        facsimile: boolean;
        hadInAccord: boolean;
        melismaSlurNotes?: Set<VoiceEntry>;
        octaveTracker: BrailleOctaveTracker;
        slurLengths: Map<Slur, number>;
    }
    Index

    Properties

    activeOctaveShift?: OctaveShift

    Active ottava bracket (8va/8vb/15ma/15mb) affecting the current passage. When set in facsimile mode, note pitches are adjusted to staff (visual) pitch. Set when an OctaveShift starts, cleared when it ends.

    activeSlurs: Set<Slur>

    Active slurs being tracked across voice entries (for emitting slur signs on intermediate notes).

    currentClef: ClefEnum

    Current clef type for chord interval direction. Default: G (treble).

    currentKey?: KeyInstruction

    Current key signature (undefined = not yet encountered)

    currentRhythm?: Fraction

    Current time signature (undefined = not yet encountered)

    ensembleMode?: boolean

    When true, chord intervals are always read upward regardless of clef. Used in ensemble mode where all parts read intervals upward (Par. 33.4.2).

    facsimile: boolean

    Whether output is facsimile (mirrors print layout) or nonfacsimile (standard braille).

    hadInAccord: boolean

    Whether the previous measure used in-accord (forces octave mark on next measure).

    melismaSlurNotes?: Set<VoiceEntry>

    Set of VoiceEntries that are continuation notes in a melisma (lyrics mode). A melisma is when a single syllable is sung across multiple notes (Par. 35.2). When a VoiceEntry is in this set, a syllabic slur sign (⠉) is emitted after the note in the music line. Indicated by <extend/> in MusicXML.

    octaveTracker: BrailleOctaveTracker

    Tracks octave context for octave mark decisions

    slurLengths: Map<Slur, number>

    Pre-computed slur lengths (number of notes in each slur). Used to choose short vs bracket slurs.