FA-81443 / MIDI event timing / Member archive
Note-on and note-off pairing into durations: note-offs cross channels · case 03
A note-off on channel 1 ends a still-sounding note of the same pitch on channel 0.
Case contract
Input time-ordered events [tick, kind, channel, note, velocity] with kind on or off. A note-on with velocity 0 acts as a note-off. Each off ends the earliest still-open note with the same channel and note (FIFO); unmatched offs are ignored. Notes still open at the end end at the last event tick. Return [start, end, channel, note, on-velocity] sorted by start, note, channel, end.
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 1 | [[0, 10, 0, 60, 100], [5, 20, 1, 60, 80]] | [[0, 20, 0, 60, 100], [5, 10, 1, 60, 80]] | 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 ↗