user3081123
user3081123

Reputation: 435

Determining MIDI note length

I'm trying to understand the way .midi files are played on the computer. I do understand concept of note on/ note off messages and it's parameter's, but I just don't get how note length is set. Making sound with bare hands is pretty easy (note on/ delay / note off), but is there such thing as delay in MIDI byte code? Running a .midi tune gives accurate note lengths and pauses between notes, how is that done? Is there a message for a delay?

Upvotes: 0

Views: 708

Answers (1)

Tamás Zahola
Tamás Zahola

Reputation: 9311

The syntax of an MTrk event is very simple:

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

<delta-time> is stored as a variable-length quantity. It represents the amount of time before the following event.

Source: http://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf

Upvotes: 4

Related Questions