FA-81838 / MIDI event timing / Member archive
Event placement inside an audio render buffer: absolute sample position returned as offset · case 03
For any buffer after the first, events are given absolute sample positions far beyond the buffer size.
Case contract
Input [sample_rate, buffer_start_sample, buffer_size, event_times_us]. Each event maps to sample position us*rate/1000000 rounded half up. Positions before the buffer start are "late", positions at or after start+size are "future", otherwise the offset within the buffer. Invalid rate or size returns 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 1 | [441, 441, "future", "future"] | [0, 0, "future", "future"] | 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 ↗