Replies: 1 comment
-
Because it's a bug in 20 year old legacy code. And it doesn't make a difference, because of the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I recently started studying MIDI messages and Fluidsynth.
After reading some document about the header chunk, I checked the related code on src/midi/fluid_midi.c.
I have some trouble understanding some codes and any help would be much appreciated.
The structure of the header chunk of the MIDI file.
The header chunk of the MIDI file is read through the function fluid_midi_file_read_mthd.
The below is how I understand the code about the time division, when the MSB equals 0.
But I can't really understand the code for the number of tracks.
Why is mthd[10] shifted 16 bits instead of 8 bits?
I understand that due to the below lines in the fluid_player_add_track function, ntracks value larger than 127 won't be used in other part of the code and ntracks value smaller than 128 will be converted to the unsigned integer as intended.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions