Repository navigation
Conversation
A MIDI file may omit the status byte when it repeats the previous one, so a run of notes on the same channel is encoded as data bytes alone. The decoder read each of those as a status byte, took the invalid-event branch and ended the track. Remember the last channel status byte and imply it when the next event begins with a data byte. System messages cancel it, as the specification requires. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tyeth
added this pull request to stack #11668
October 23, 2026 22:57
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.
Second of five stacked PRs; targets the branch of #11658, review that first.
A MIDI file may omit the status byte when it repeats the previous one, so a run of notes on the same channel is encoded as data bytes alone. The decoder read each of those as a status byte, took the invalid-event branch and ended the track.
Remember the last channel status byte and imply it when the next event begins with a data byte. System messages cancel it, as the specification requires.
Verification
Cross-checked against
adafruit_midi_parseron a hand-built running-status file: the new decoder reproduces its note timeline exactly, the old one returned nothing. Builds clean on arm and xtensa.Size
About +128 bytes of flash on nrf52840, plus one byte per
MidiTrackobject.🤖 Generated with Claude Code