On Tue, 2006-07-25 at 01:19 +0200, Jens M Andreasen wrote:
On Mon, 2006-07-24 at 17:55 -0400, Lee Revell wrote:
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?
Driver? This is a driver for a midi-port on a sound-card or a some kind
of midi-file player?
It's similar to a driver for a MIDI port on a sound card, except the
driver additionally has to respond to note on and note off by twiddling
some other bits in the hardware. It's equivalent to having to flash an
LED for note on and another for note off.
I wrote the driver as an ALSA rawmidi device, which was probably not the
best idea - I did not realize at the time that I would have to interpret
the MIDI stream. An ALSA kernel sequencer client would have been more
appropriate.
I think I can get away with always treating 0x90 as note on and 0x80 as
note off regardless of the context.
(I can't release source or give the hardware details now, as the
hardware is still being developed)
Lee