Re: MIDI parser source (bytestream->MIDI messages)
Christian Packmann <[email protected]> Sat, 31 Jan 2004 15:25:15 +0100
| Newsgroups | gmane.os.openbeos.midi |
|---|---|
| Message-ID | <[email protected]> |
Matthijs Hollemans wrote: > Christian wrote: >> Uhm... bad news: I started coding my parser, and soon realized that=20 >> MidiPortProducer::GetData() is utterly broken. =20 > That doesn't really surprise me. I threw it together pretty quickly,=20 > based on something Jerome threw together pretty quickly. It hasn't been= =20 > tested at all (or just a little), because I have nothing to test it wit= h.=20 > I am also not sure whether the routine properly interfaces with the=20 > drivers, either. IIRC Greg Crain got it to work with his MPU401 module, only that the Note= =20 Offs weren't properly recognized (as his keyboard is using RunningState=20 when sending them, this is not surprising). This should mean that it=20 basically works. Maybe Greg could test the new version once it's in CVS. > > I currently don't have time to setup OBOS CVS on my machine, so=20 > > somebody else would have to do integration & testing. But I guess=20 > > that's preferable to having to write that stuff from the ground up. ;= -) >=20 > Sure thing. I'd be happy to integrate your code with the OpenBeOS CVS.=20 > Thanks for finding out about this problem. There's nothing to thank me for - *I* am thankful if I can be of help to=20 OBOS. :)=20 A draft of the new parser can be accessed at=20 <http://www.uni-mainz.de/~packc000/MidiParser.cpp>. Please take a look at it and let me know if coding style and variable nam= es=20 are okay. If these have to be changed I'd rather change them in the=20 SerialMidiHost sources, so that syncing any later changes would just be=20 copy'n'paste. The code seems to be mostly bugfree, SerialMidiHost works so much that I=20 spent the last two days playing with my synth. :) Basic stuff like Note=20 On/Off, Control Change, Pitch Bend all works. I'm not sure if SysEx is properly parsed, and this isn't easy to check, a= s=20 I found no SysEx receive program for BeOS. Guess what my next project is.= ;) Once I'm sure that the code is correct, I'll integrate it into=20 MidiPortProducer::GetData() and post the new PortDrivers.cpp. Bye, Chris