[openbeos-midi] Re: MIDI parser source (bytestream->MIDI messages)

  • From: "Matthijs Hollemans" <matthijs@xxxxxxxxxxxxxxxxxxx>
  • To: <openbeos-midi@xxxxxxxxxxxxx>
  • Date: Tue, 27 Jan 2004 13:59:31 +0100

Hey Christian,

> any hints where I can find source code which takes a raw byte stream
> and parses it into MIDI messages?

The midi_server does something like that already. The code is in
PortDrivers.cpp. It appears to work on at least some systems, but it is not
finished yet. The code to split the raw bytes into MIDI message is actually
pretty simple:

There is also supposed to be a midi_parser kernel module, but this is only
intended to be used by device drivers. I don't know how it works, or whether
we already have it in the OpenBeOS CVS.

> [...] there already is serial_midi, but it only does MIDI-Out, not
> and this isn't acceptable.

Hmm, I didn't know that. You could always write a replacement driver for
serial_midi, of course :-) Then the midi_server will take care of parsing
the raw byte stream.

Hope this helps,

Other related posts: