On Thu Feb 8 16:26:57 2024 +0000, Yuxuan Shui wrote:
Again, I agree with you in general, but in this case there is really no difference in how different MIDI event types (that are relevant to us) are processed, except for probably SET TEMPO (which is being discussed in the other thread). There is no different code paths, there is nothing to be split.
That's not true. Look at the tests attached above. As soon as a tempo event is present in the MIDI file, a new and separate Tempo track is added to the segment, which produces the tempo messages. If there's no tempo MIDI event, then no Tempo track is available. This is different from your implementation where the MIDI track does everything.