Thomas Posted May 8, 2006 Report Share Posted May 8, 2006 Hallo!MPROC_NotifyReceivedByte seems to be called more times than expected when sending Sysex-Midibytes.For debug-issues I scaled down the body of MPROC_NotifyReceivedByte(unsigned char byte) to simply debug the received byte by printing it to the display. I noticed that during receiving the test-midi streams "FX 01 02" (where X goes from 0 to F) MPROC_NotifyReceivedByteis called to receive the bytes: FX 01 02 (->ok, as expected, MPROC_NotifyReceivedByte is called three times)FX 00 01 02 (->with additional 00 byte, MPROC_NotifyReceivedByte is called four times)FX 01 00 02 (->with additional 00 byte, MPROC_NotifyReceivedByte is called four times)I don't remember for what value of the first byte what behaviour occurs. I wrote it on a sheet of paper but I forgot it. (have no Inet at home at the moment) I think from F0 to F6 is all ok. And the "FA 01 02"-Stream will be received as "FA 00 01 02". At a first look at the MIOS-Src I cannot explain this. What happens here? Is this a bug or a feature? ;) Background: I want to create own "Intercom"-Sysex-Messages for chained Midiboxes.(e.g. display messages) Maybe there's a better way to do this. Thomas Quote Link to comment Share on other sites More sharing options...
stryd_one Posted May 8, 2006 Report Share Posted May 8, 2006 First thing you need to do would be ensure that the MIDI interface is not sending these bytes. You could loop a MIDI cable from the output around to the input (make sure local echo is off on the PC or you'll get an endless loop) and monitor it to be sure, if you don't have another midi monitor. Otherwise check you connections and solder joints...Have you run a search about this? This concept has been discussed before on the forum and I'm sure TK made some suggestions.Wilba and I were discussing this the other night too.... I've recently been thinking about using the IIC_MIDI stuff to drive an LCD though, because IIC is much faster than MIDI so it would be possible to use it for realtime messages. Quote Link to comment Share on other sites More sharing options...
TK. Posted May 8, 2006 Report Share Posted May 8, 2006 FX 01 02 (->ok, as expected, MPROC_NotifyReceivedByte is called three times)FX 00 01 02 (->with additional 00 byte, MPROC_NotifyReceivedByte is called four times)FX 01 00 02 (->with additional 00 byte, MPROC_NotifyReceivedByte is called four times)I don't remember for what value of the first byte what behaviour occurs.I wrote it on a sheet of paper but I forgot it. (have no Inet at home at the moment)I think from F0 to F6 is all ok. And the "FA 01 02"-Stream will be received as "FA 00 01 02".these are not valid MIDI events, they violate the MIDI spec.E.g., FA is a single byte event which doesn't touch the running status. By sending FA 01 02, MIOS (and any other properly implemented MIDI device) will interpret this as FA <last-running-status> 01 02. This explains, why you are sometimes getting more bytes than expected. For more informations regarding the running status, google for "midi spec"For intercom messages I would propose to use proper SysEx streams. They begin with a F0, they end with a F7. The bytes within this stream must be <=0x7f (8th bit always 0)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Thomas Posted May 8, 2006 Author Report Share Posted May 8, 2006 Ok, I thought they can be "miss-used" for such things since FA, FB etc. are system messages like midiclock, midi control etc. pp. if I remember right. I'll use "boring" normal system messages instead... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.