FA-81792 / MIDI event timing / Member archive
Channel note message encoder with running status: converted note-on sends release velocity 0 · case 02
Without running status, a velocity-0 note-on becomes a note-off with release velocity 0 instead of the stipulated 64.
Case contract
Input [events, running_status] with events [kind, channel 1..16, note, velocity]. A note-on with velocity > 0 encodes as 0x90|(channel-1), note, velocity. A note-off (or note-on with velocity 0) encodes as 0x90|(channel-1), note, 0 when running status is enabled; otherwise as 0x80|(channel-1), note, velocity for an off and note, 64 for a velocity-0 on. With running status enabled, a status byte equal to the previous one is omitted. Invalid values return None.
Why this case matters
MIDI sequencers, file readers and synth drivers depend on exact event ordering and tick/time arithmetic.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 4 | [129, 60, 0] | [129, 60, 64] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗