Some MIDI files that include tempo changes or other meta-events do so in a separate MIDI track. The current system for parsing files into Godot resources loops through an array of events for each track. This means that track 0 is going to be processed before track 1.
The problem arises when programs like FL Studio put all the tempo change events (or other meta events) in track 0, so they all get processed before track 1 is even read. By the time track 1 is read, all the tempo change events have been ingested.
This means we need to either:
Loop over each MIDI track for each tick in the parsing stage
Loop over each MIDI track for each tick in the playback stage, and build a system to interpret MIDI meta events (tempo changes) in the playback class (midi_player.cpp)
Some MIDI files that include tempo changes or other meta-events do so in a separate MIDI track. The current system for parsing files into Godot resources loops through an array of events for each track. This means that track 0 is going to be processed before track 1.
The problem arises when programs like FL Studio put all the tempo change events (or other meta events) in track 0, so they all get processed before track 1 is even read. By the time track 1 is read, all the tempo change events have been ingested.
This means we need to either: