Skip to content

Conversation

@Frank-Buss
Copy link

@Frank-Buss Frank-Buss commented Dec 21, 2025

The condition if (deltatime || evt->type) skipped storing messages when both deltatime and type were 0. This caused meta events at the start of tracks (key signature, time signature, track name, etc.) to be dropped, corrupting the delta time chain for subsequent notes.

This resulted in most notes being missed during playback for affected MIDI files. For example, https://frank-buss.de/tmp/bwv-846.mid has 548 note-on events but only 85 were being played. timidity plays this file correctly.

The fix removes the conditional and always stores parsed messages to preserve timing integrity.

The condition `if (deltatime || evt->type)` skipped storing messages
when both deltatime and type were 0. This caused meta events at the
start of tracks (key signature, time signature, track name, etc.) to
be dropped, corrupting the delta time chain for subsequent notes.

This resulted in most notes being missed during playback for affected
MIDI files. For example, https://frank-buss.de/tmp/bwv-846.mid has 548
note-on events but only 85 were being played. timidity plays this file
correctly.

The fix removes the conditional and always stores parsed messages to
preserve timing integrity."
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