[linux-audio-dev] Basic MIDI question
rlrevell at joe-job.com
Mon Jul 24 21:55:17 UTC 2006
On Tue, 2006-07-25 at 01:43 +0200, Nicolas Pouillon wrote:
> [Mon, 24 Jul 2006 17:09:02 -0400]
> Lee Revell <rlrevell at joe-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
Ugh. All I need to do is snoop note on, note off, and the note number.
But you're saying that 0x81 is sometimes part of a timestamp, and other
times it means note off on channel 1?
So you are saying my driver needs to have full knowledge of the MIDI
state machine in order to snoop note on and note off?
More information about the Linux-audio-dev