The MIDI Forum

0
Votes
Undo
  1. Pawel
  2. MIDI Specifications
  3. Wednesday, 06 January 2021
  4.  Subscribe via email
There is no problem with deltaTime between events in the midi = 0 file format - there is only one track and all events are referenced to the preceding event.
However, how the deltaTime should be interpreted for midi files in other formats? Is it a distance from the previous event in the scope of the entire MIDI file or in the scope of a given track/chunk?
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Delta time is the distance from the previous event in the same track.
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
The spec says:


<MTrk event> = <delta-time> <event>

<delta-time> is stored as a variable-length quantity. It represents the amount of time before
the following event. If the first event in a track occurs at the very beginning of a track, or if
two events occur simultaneously, a delta-time of zero is used. Delta-times are always present.
(Not storing delta-times of 0 requires at least two bytes for any other value, and most delta-
times aren't zero.) Delta-time is in ticks as specified in the header chunk.

<event> = <MIDI event> | <sysex event> | <meta-event>

<MIDI event> is any MIDI channel message. Running status is used: status bytes of MIDI
channel messages may be omitted if the preceding event is a MIDI channel message with the
same status. The first event in each MTrk chunk must specify status. Delta-time is not
considered an event itself: it is an integral part of the syntax for an MTrk event. Notice that
running status occurs across delta-times.


It doesn't matter if the file has a single track (like in format 0) or has several tracks, the delta time is always the amount of time before
the following event in that track.
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you.
Have a great day.
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!