FAILURE MAP
← Case archive

FA-81387 / MIDI event timing / Member archive

Standard MIDI File header chunk reader: negative frame rate masked instead of negated · case 02

Every SMPTE-timed file is rejected: 0xE8 (-24) is read as 104 frames per second.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input the bytes of a header chunk: "MThd", a 32-bit big-endian length (>= 6; extra bytes ignored but must be present), 16-bit format (0, 1, 2), 16-bit track count (nonzero; exactly 1 for format 0) and 16-bit division. If bit 15 of division is set, the high byte is a negative two's-complement frame rate (24, 25, 29, 30) and the low byte ticks per frame; otherwise division is ticks per quarter note (nonzero). Return a dict or 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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
oracle 0null{"format": 1, "fps": 24, "ticks_per_frame": 80, "tracks": 1}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 ↗