chirs241097 / QMidiPlayer

A free cross-platform midi file player based on libfluidsynth and Qt. Mirror of https://cgit.chrisoft.org/QMidiPlayer.git .
https://chrisoft.org/QMidiPlayer/
GNU General Public License v3.0
30 stars 6 forks source link

Problem when reading midi file #6

Closed BLumia closed 6 years ago

BLumia commented 6 years ago

Ref: core/qmpmidiread.cpp Line 74

FF 00 02 ssss Sequence Number This optional event, which must occur at the beginning of a track, before any nonzero delta-times, and before any transmittable MIDI events, specifies the number of a sequence. In a format 2 MIDI file, it is used to identify each "pattern" so that a "song" sequence using the Cue message to refer to the patterns. If the ID numbers are omitted, the sequences' locations in order in the file are used as defaults. In a format 0 or 1 MIDI file, which only contain one sequence, this number should be contained in the first (or only) track. If transfer of several multitrack sequences is required, this must be done as a group of format 1 files, each with a different sequence number.

According to the SMF specification, we can see the ID numbers can be omitted (thus it will be like FF 00 00 rather than FF 00 02 ♂♂ ♂♂), we should check this although the Sequence Number event has (maybe) never really been used.

:stuck_out_tongue:

chirs241097 commented 6 years ago

Fixed by commit 9e22849. Please do not use symbols that may cause confusion (♂) in the issue tracker.