words, they all start at the same time, and so can represent di+erent parts
in one song. asynchronous multiple tracks do not necessarily start at the same
time, and can be completely asynchronous.
nn nn is the number of tracks in the midi le.
dd dd is the number of delta-time ticks per quarter note. (more about this
later)
3. track chunks
the remainder of the le after the header chunk consists of track chunks.
each track has one header and may contain as many midi commands as you like.
the header for a track is very similar to the one for the le:
4d 54 72 6b xx xx xx xx
as with the header, the rst 4 bytes has an ascii equivalent. this one is
mtrk. the 4 bytes after mtrk give the length of the track (not including the
track header) in bytes.
following the header are midi events. these events are identical to the
actual data sent and received by midi ports on a synth with one addition. a
midi event is preceded by a delta-time. a delta time is the number of ticks
after which the midi event is to be executed. the number of ticks per quarter
note was dened previously in the le header chunk. this delta-time is a
variable-length encoded value. this format, while confusing, allows large
numbers to use as many bytes as they need, without requiring small numbers to
waste bytes by lling with zeros. the number is converted into 7-bit bytes,