Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,985 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start in braille/text.py at BrailleKeyboard.addNoteGroupings and compare the keyboard path with BrailleSegment.extractNoteGrouping and splitNoteGroupingAndTranscribe in braille/segment.py. Reproduce with a two-part keyboard score containing a measure wider than maxLineLength, then trace the exception through braille.translate.keyboardPartsToBraille. Done means the measure is split at a beat across lines with the music hyphen, and the score transcription completes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.extractNoteGrouping → splitNoteGroupingAndTranscribe 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.
Lingua principale
Python
Stelle
2.6k
Fork
459
Merge medio
1g 7h
PR unite (30g)
40

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cuthbertLab/music21

Tutte le issue di cuthbertLab/music21

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.