Yes, a 500kb (or any other size) sysex message should not be a problem. You probably want to make the buffersize in Pm_OpenInput() large enough to hold the entire message to insulate yourself from windows timing and the absence of flow control in MIDI. The incoming data (in the Win32 implementation) is copied incrementally to the buffer, so in principle, the buffer can be smaller than the message as long as your application pulls the data out faster than it arrives. You *will* lose data if the buffer overflows. Another issue to be aware of is that if the sysex data is incomplete or contains errors, it is possible that your application will begin to receive sysex data but never encounter an EOX (end of sysex byte). It is up to the application to detect that the message is incomplete and to recover appropriately. Your application should also be prepared to wait for sysex data -- if the buffer is empty, perhaps more data is on the way. -Roger

-------- Original Message --------

Yes- I'm referring to Win32- sorry for not clarifying that.

You stated- "larger messages are sent through a sequence of calls"-
are you saying that if an application sends a command to a synth to
dump it's entire patch memory, and the synth sends 500kb of data, that
portmidi will handle this amount of sysex data gracefully, and return
all the data to the application without any problems?

The fact that the sysex buffer is statically sized at 1024 bytes (I
think this is referring to the Win32 implementation) should not be
interpreted as a limitation on sysex message size. Larger messages are
sent through a sequence of calls, but this is an implementation detail
that is not visible to the client. -Roger


_______________________________________________
media_api mailing list
[email protected]
http://www.create.ucsb.edu/mailman/listinfo/media_api


_______________________________________________
media_api mailing list
[email protected]
http://www.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to