Repository navigation
Yield every key of one hand in BrailleGrandSegment.yieldCombinedGroupingKeys - #2170
Merged
mscuthbert merged 4 commits intoNov 3, 2026
Merged
mscuthbert merged 4 commits into
mscuthbert merged 4 commits into
Conversation
…ingKeys
When two keys of the same hand came in a row, yieldCombinedGroupingKeys
replaced the stored key with the new one without yielding it, so that
grouping was never transcribed. A key and time signature in only the
right hand of a keyboard part lost the heading, and the playback-only
metronome mark of verdi/laDonnaEMobile was missing from the debug
output. The stored key is now yielded, paired with None, before the
next key of the same hand replaces it.
score = stream.Score()
for pitchName in ('C5', 'C3'):
part = stream.PartStaff()
m = stream.Measure(number=1)
if pitchName == 'C5':
m.append(key.KeySignature(2))
m.append(meter.TimeSignature('4/4'))
m.append(note.Note(pitchName, quarterLength=4.0))
part.append(m)
score.insert(0, part)
braille.translate.keyboardPartsToBraille(score)
mscuthbert
requested changes
Nov 1, 2026
mscuthbert
left a comment
Member
There was a problem hiding this comment.
Great -- just a small legibility request
# Conflicts: # music21/braille/segment.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
yieldCombinedGroupingKeysyields a stored key, paired with None, before the next key of the same hand replaces it, so a key and time signature in only the right hand of a keyboard part reach the heading.