[comp.music] MIDI FILE QUESTION

KRW1%LEHIGH.BITNET@IBM1.CC.Lehigh.EDU (04/07/90)

There is an ambiguity in the MIDI file spec regarding the handling of
tempo changes.  It is not specified whether event deltas should refer to
a time interval computed at the time of the previous event and in the
current time base, or whether the time interval must account for any
tempo changes (and thus delta unit size changes) during the time span
preceding the event.  For example, say at time 0 an event delta is given
as 8 units, with a unit defined as 10 microseconds.  If after 4 units
the tempo is doubled (halving the unit size), should the event occur at
time 80, or 60?  Does anyone know whether this has ever been clarified,
or know what the original intention was?  I suspect that both
interpretations may have been used in programs which write MIDI files.
-- Kevin

------------------------------------------------------------------------
Kevin Weiner   Lehigh University Computing Center   (215) 758-3991

smhall@peg.UUCP (04/13/90)

There is a meta-event (ff 51 03 tttttt) that changes the tempo on
page 11 of the SMF spec. . If you 'hard-code' tempo changes in the
sequence, you have changed it. All sequencers deal with tempo as
an entity unrelated to the sequence's note lengths. I think the deltas
should reflect the note's value  (1/8,1/4 ...) relative to the
"ticks per quarter note" in the header chunk.
steve hall