Re: [linux-audio-dev] Basic MIDI question

From: Nicolas Pouillon <nipo@email-addr-hidden>
Date: Tue Jul 25 2006 - 02:43:57 EEST

[Mon, 24 Jul 2006 17:09:02 -0400]
Lee Revell <rlrevell@email-addr-hidden-job.com> eut le bonheur d'_crire:

> Also, why doesn't every event have a timestamp? For example "81 0C 90
> 30 5B 00 90 3C 79 81 70"? I guess multiple events can be scheduled in
> one "tick"?

Actually delta times between events are encoded with a variable length
value. As long as bit 7 is 1, you must drop this very bit and add next
byte in the value decoding. Here; 81 0c is a variable length value:

delta 81 0c which is ((0x7f & 0x81) << 7) | 0x0c = 0x8c
event 90 30 5b
delta 00
event 90 3c 78
delta 81 70 which is 0xf0

hth

-- 
Nipo <nipo@email-addr-hidden>

Received on Tue Jul 25 04:15:01 2006

This archive was generated by hypermail 2.1.8 : Tue Jul 25 2006 - 04:15:02 EEST