Skip to content

Keyboard braille: a measure wider than one line aborts the whole transcription (no measure division, unlike the single-part path) #1985

Description

@jpsmith8488

Environment: music21 10.5.0, Python 3.14, macOS.

Summary: In the keyboard (bar-over-bar) braille path, a measure whose one-hand transcription is wider than one braille line aborts the whole transcription — BrailleKeyboard.addNoteGroupings (braille/text.py) opens a fresh line pair and then calls append unconditionally, which raises BrailleTextException("Text does not fit at end of braille text line."); the exception propagates out of braille.translate.keyboardPartsToBraille and no braille is produced for the entire score.

Expected: the Braille Music Code's own device for this case — divide the measure at a beat and continue on the next line with the music hyphen (dot 5). The single-part path implements exactly this (BrailleSegment.extractNoteGroupingsplitNoteGroupingAndTranscribe in braille/segment.py); the keyboard path has no split at all (the commented-out method stubs near BrailleGrandSegment.extractNoteGrouping suggest it was left unfinished).

Impact: dense piano is untranscribable at the 40-cell embosser standard. In one test set, ~80% of the measures of a Beethoven presto movement exceed the 40-cell line, and a single ~148-cell measure in another sonata blocks the whole score at any tested width up to 100 cells.

Reproduction sketch: any two-part keyboard score with one measure of 16th notes wide enough to exceed maxLineLength (e.g. 20+ notes with accidentals and octave marks in one 4/4 measure), passed to braille.translate.keyboardPartsToBraille(score, maxLineLength=40).


Related keyboard-path findings from the same investigation (happy to split into separate issues if preferred):

  • Measure-repeat consolidation (segment.areGroupingsIdentical) compares notes with __eq__, which ignores Fingering articulations — repeated measures carrying different fingerings consolidate to the first measure's fingering.
  • BrailleGrandSegment.yieldCombinedGroupingKeys drops the first of two consecutive one-hand keys (storedLeft/storedRight is overwritten without being yielded) — whole measures of one hand vanish from the output when the other hand's measures repeat-consolidate.
  • The grand path never emits repeat signs for consolidated measures (unlike the single-part path's addRepeatSymbols), so a consolidated measure is lost rather than compressed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions