midiOutLongMsg Splitting Sysex Messages??

Showing 1-10 of 10 messages
midiOutLongMsg Splitting Sysex Messages?? Les 5/21/07 10:49 AM
Someone informed me that midiOutLongMsg can decide to split sysex
messages if they are large, i.e. divide the message up into two
smaller sysex messages and send them one after the other.

To be honest, I'm a bit skeptical; I've never seen this behavior
before.

P.S. I've been a bit remiss lately in not participating in some of the
threads here lately, even though I've wanted to. Will try to get more
involved when I have a chance.

Re: midiOutLongMsg Splitting Sysex Messages?? obiwanjacobi 5/21/07 10:35 PM
I think I saw somewhere that F7 was also sometimes used as a sys-ex
continuation code (at the start of a continued sys-ex message). I dont
know if this is official or just a 'bright' idea of someone? I dont
think midiOutLong has the knowledge to create two seperate FO-F7 sys-
ex messages from one. That requires intimate knowledge of the content
and structure of the message.

I know my Roland equipment will send a lot of seperate sys-ex messages
each a couple of hundred bytes long when dumping sys-ex from the
device. I have not analyzed how these sys-ex messages relate to each
other.

I know that the maximum buffer length for midiOutLong is 64kB. That is
a lot of information to sent over midi in one message...

Re: [mididev] midiOutLongMsg Splitting Sysex Messages?? Clemens Ladisch 5/22/07 4:05 AM
Les wrote:
> Someone informed me that midiOutLongMsg can decide to split sysex
> messages if they are large,

Yes.

> i.e. divide the message up into two smaller sysex messages and send
> them one after the other.

It does not generate separate messages, it just generates several blocks
of data that together constitute a sysex message.

For example, if midiOutLongMsg is called with the data
<F0 00 11 22 33 44 55 66 77 F7> and if some driver cannot allocate
memory in chunks larger than 8 bytes, the result will be two blocks of
data, i.e., <F0 00 11 22 33 44 55 66> and <77 F7>.  However, when the
driver then outputs these two blocks, one after the other, the sequence
of bytes that can be seen at the MIDI port is exactly the same.

All this doesn't matter for outputting data, but applications will be
affected when drivers split sysex messages that are read from some input
port.


Regards,
Clemens

Re: [mididev] midiOutLongMsg Splitting Sysex Messages?? Clemens Ladisch 5/22/07 4:05 AM
obiwanjacobi wrote:
> I think I saw somewhere that F7 was also sometimes used as a sys-ex
> continuation code (at the start of a continued sys-ex message). I dont
> know if this is official or just a 'bright' idea of someone?

It's the bright idea of someone who wrote the official SMF
specification.  However, this F7 byte just identifies the continued
sysex in the file but is not a part of the actual data.

> I know that the maximum buffer length for midiOutLong is 64kB. That is
> a lot of information to sent over midi in one message...

I've seen a SMF with a 150 kB sysex message (this was a firmware image).
To send such large messages with midiOutLongMsg, the application has to
split it up into several buffers.


Regards,
Clemens

Re: midiOutLongMsg Splitting Sysex Messages?? Les 5/22/07 8:04 AM
On May 22, 6:05 am, "Clemens Ladisch" <clem...@ladisch.de> wrote:

<snip>

> It does not generate separate messages, it just generates several blocks
> of data that together constitute a sysex message.
>
> For example, if midiOutLongMsg is called with the data
> <F0 00 11 22 33 44 55 66 77 F7> and if some driver cannot allocate
> memory in chunks larger than 8 bytes, the result will be two blocks of
> data, i.e., <F0 00 11 22 33 44 55 66> and <77 F7>.  However, when the
> driver then outputs these two blocks, one after the other, the sequence
> of bytes that can be seen at the MIDI port is exactly the same.

Ah, I see. This would explain why I've not observed this behavior
because the end result is the same.

However, the report I got from one of my users said this:

"But when I try to send long SysEx messages (long means ~600 byte),
the message is splitted in 256 byte long blocks (I have recorded it
with midiOx on a 2nd machine). And every block is begins with F0 etc.
The device I want to control is not able to work with block. Does
anyone has the same problem? Is there a way to send such long SysEx
messages without splitting?"

Based on this, it would appear that each block has a F0 status byte
added to the beginning. There's nothing in my code that does this; it
simply passes the message on to midiOutLongMsg. So I'm at a loss at
this point for an explanation.

Re: [mididev] midiOutLongMsg Splitting Sysex Messages?? Clemens Ladisch 5/22/07 11:52 PM
Les wrote:
> [...] the report I got from one of my users said this:

>
> "But when I try to send long SysEx messages (long means ~600 byte),
> the message is splitted in 256 byte long blocks (I have recorded it
> with midiOx on a 2nd machine). And every block is begins with F0 etc.

This looks like a bug in one of the MIDI drivers on either the sending
or the receiving machine; probably this one:
<http://support.microsoft.com/kb/828536>.


HTH
Clemens

Re: midiOutLongMsg Splitting Sysex Messages?? Les 5/23/07 8:14 AM

Thank you! I'll pass the information along.

Re: midiOutLongMsg Splitting Sysex Messages?? Les 5/23/07 8:17 AM
On May 23, 1:52 am, "Clemens Ladisch" <clem...@ladisch.de> wrote:

Thank you! I'll pass the information along.

Re: midiOutLongMsg Splitting Sysex Messages?? Les 5/23/07 8:18 AM
On May 23, 1:52 am, "Clemens Ladisch" <clem...@ladisch.de> wrote:

Thank you! I'll pass the information along.

Re: midiOutLongMsg Splitting Sysex Messages?? Les 5/23/07 8:19 AM
Oh, great. Google told me there was an error when I tried to post, so
I tried again a couple of times. I should've known better. All three
posts have shown up.