questions to TK concerning the “merger disable hack”:
you say:
This function allows you to disable the merger for the current and upcoming bytes until a new event begins
if I disable the forwarding on receiving a status-byte, this byte will not be forwarded.
fact: every midi-message starts with a status byte (byte & 0x80 == 1). a sysex is the only message whos last byte is also a status byte.
does the “disable code” block the forwarding of the stop-status-byte of the sysex too?
and if so, does it look explicitly for THE stop-status-byte or just for any status byte?
if it looks for ANY status byte to restart the merging, the hack would not work, because the merger would not forward the statusbyte of
the next message, so this message would be lost.
if it looks explicitly for the stop-byte of the sysex, the forwarding would not start again.
only if the code would distinguish (between) the sysex-stop-byte and any other status-byte, the hack would work.
why I want to know this:
-
I think that the forwarding by the merger is faster code than any code produced by the sdcc compiler?
-
If I do parsing on application level, every byte will be double-parsed, once by MIOS and once by my application
I could check this in the MIOS-code myself, but I’m not fit in assembler, so it would take me quite time to find the place where it
happens. maybe you (TK) can answer these questions directly by heart.
by the way: thanks for your correction
as merger data is forwarded before the hooks are called (corrected: it’s forwarded after the MPROC_NotifyReceivedByte() hook has been called
the origial version confused me, thats why I asked “so what would be an example application of the case described here?”
another proposal: if I stop the merger with MIOS_MIDI_MergerSet on receiving “my” event, and start it again on any other event?
if the mergin’ happens after MPROC_NotifyReceivedByte, this should work (?)