[openbeos-midi] Re: Midi2 handling of SysEx data

  • From: Christian Packmann <Christian.Packmann@xxxxxx>
  • To: openbeos-midi@xxxxxxxxxxxxx
  • Date: Sun, 08 Feb 2004 16:35:22 +0100

Sorry for the late replies, $REAL_LIFE intercepted...

Matthijs Hollemans wrote:
> However, you can override the Data() hook to look for a sysex yourself. 
> The data buffer that is passed to Data() does include the control bytes 
> (at least 0xF0, but not necessarily 0xF7). You would do something like 
> this:
> ...

Oh... I think I should take the time to RTFM. :-) This approach  should 
work nicely. I'll rework my code as soon as I have time.
I think it might be a good idea to include your example code in the Data() 
or SystemExclusive() section. This will tell anyone interested in doing 
SysEx receive the best way to get raw SysEx data.

And 0xf7 isn't handled by the system. I have a first version of my SysEx 
receiver tool running, and Midi2 kit spits "Not Handling Event 0xf7" to 
stderr for each received SysEx.
As I transfer bulk dumps from my XG unit which consist of about 1700 single 
SysEx messages of mostly 8-10 bytes length, this produces some nice load on 
the system. :-\ Can be solved by redirecting stderr of course, but still 
annoying.

 
> As far as the documentation is concerned, I thought it would be obvious 
> that the MIDI control bytes (0xF0 and 0xF7) are stripped from the data, 
> since none of the other callbacks includes control bytes either.

I regard SysEx as something special, as it is not useful to most instances 
which handle MIDI data, and will simply be saved to a file in most cases. 
And if porting programs from other systems, parsing of SysEx segments will 
also likely be based on raw chunks with status bytes. Well, this can be 
handled by Data(), so it's no biggie.

 
> By the way, you can get the most up-to-date docs from: 
> http://home.tiscali.nl/mahlzeit/openbeos.html

Thanks, had lost track of that link. And thanks for updating the docs so 
fast.

Bye,
Chris

Other related posts: