Skip to content

synthio: support running status in MidiTrack - #11659

Open
tyeth wants to merge 1 commit into
synthio-miditrack-meta-eventsfrom
synthio-miditrack-running-status
Open

tyeth wants to merge 1 commit into
synthio-miditrack-meta-eventsfrom
synthio-miditrack-running-status

Conversation

@tyeth

@tyeth tyeth commented Oct 23, 2026

Copy link
Copy Markdown
Member

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_parser on 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 MidiTrack object.

🤖 Generated with Claude Code

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
tyeth added this pull request to stack #11668 October 23, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant