MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
MIDI Yoke >> MIDI Yoke NT >> MIDI Yoke corrupting sysex messages?
(Message started by: pre-fix on Jun 9th, 2003, 8:11pm)

Title: MIDI Yoke corrupting sysex messages?
Post by pre-fix on Jun 9th, 2003, 8:11pm
Jamie,

Is it possible that some sysex messages are overwriting some others within MIDI Yoke?  I'm working on some software to get a Mackie Control to talk to Logic and I'm getting some ill-formed messages out of MIDI Yoke.  I've run some comparisons with Sonic Foundry Virtual MIDI Router which may illustrate the problem:

My test setup is as follows:

Mackie Control (Unitor 07 in) -> my software -> MIDI Yoke NT 1 -> Logic 5.5
Logic 5.5 -> MIDI Yoke NT 2 -> MIDI OX (for viewing) -> MIDI Yoke NT 3 -> my software -> Mackie Control

After selecting the appropriate ports in the Logic control surface setup, initialisation messages are sent out by Logic.  Buried in those messages (and visible via MIDI OX) is the following sequence:

0000C854  10  13     D0    00    --    1  ---  Channel Aft          
0000C856  10  13     F0  Buffer:     8 Bytes   System Exclusive      
SYSX: F0 00 00 66 10 20 00 07
0000C856  10  13     F0  Buffer:     9 Bytes   System Exclusive      
SYSX: F0 00 00 66 10 20 00 07 F7

The penultimate sysex is ill-formed and looks very similar to the last sysex.  I ran a comparison using Virtual MIDI Router and the message sequence looked like this:

00003DEC  18  13     D0    00    --    1  ---  Channel Aft          
00003DEC  18  13     F0  Buffer:     8 Bytes   System Exclusive      
SYSX: F0 00 00 66 10 21 01 F7
00003DED  18  13     F0  Buffer:     9 Bytes   System Exclusive      
SYSX: F0 00 00 66 10 20 00 07 F7

In MIDI Yoke, it looks as though the last sysex message overwrites the previous one somehow, though the length remains correct.

I have the full logs if that helps - but I think I can dredge up other sequences which seem to show the same issue.  It seems to occur when two sysex messages are generated immediately next to each other.

Any clues?  I think I have the lastest version (1.71 beta according to the settings dialog).

Regards,

Steve.

http://www.pre-fix.com/cubic/

Title: Re: MIDI Yoke corrupting sysex messages?
Post by Jamie OConnell on Jun 9th, 2003, 10:47pm
Thanks for the report.  I would actually suspect MIDI-OX monitor display before I suspected MIDI Yoke.  We've tested with multi-megabyte dumps and have yet to find a glitch.  This is not to say there isn't a bug, just that we haven't run across one before.

Have you tried capturing the messages in the MIDI-OX SysEx view?  It's fairly trustworthy and can capture as much data as you wish before ending the dump reception.  Tou use it choose View | SysEx... and then SysEx | Receive Manual Dump...  After you have captured the data in question, press [OK].

Another thing to do to check this would be to setup a hardware loopback if you have a spare set of external MIDI ports.  Just attach a cable from MIDI Out to another MIDI In.  Send the data Out Logic to the MIDI Outport and listen to it at the Input port using MIDI-OX.


Title: Re: MIDI Yoke corrupting sysex messages?
Post by pre-fix on Jun 10th, 2003, 4:54am
Jamie,

Thanks for the swift reply.  I captured the sysex data as you suggest - the result is as follows - the data is corrupted here too - I've highlighted the offending section:

F0 00 00 66 10 12 00 39 3A 49 6E 73 31 20 31 30 3A 49 6E 32 20 31 31 3A 49 6E 33 20 31 32 3A 49 6E 34 20 31 33 3A 49 6E 35 20 31 34 3A 49 6E 36 20 31 35 3A 49 6E 37 20 31 36 3A 49 6E 38 F7 F0 00 00 66 10 20 00 07 F0 00 00 66 10 20 00 07 F7 F0 00 00 66 10 20 01 07 F7 F0 00 00 66 10 20 02 07 F7 F0 00 00 66 10 20 03 07 F7 F0 00 00 66 10 20 04 07 F7 F0 00 00 66 10 20 05 07 F7 F0 00 00 66 10 20 06 07 F7 F0 00 00 66 10 20 07 07 F7 F0 00 00 66 10 20 00 07 F0 00 00 66 10 20 00 07 F7 F0 00 00 66 10 20 01 07 F7 F0 00 00 66 10 20 02 07 F7 F0 00 00 66 10 20 03 07 F7 F0 00 00 66 10 20 04 07 F7 F0 00 00 66 10 20 05 07 F7 F0 00 00 66 10 20 06 07 F7 F0 00 00 66 10 20 07 07 F7 F0 00 00 66 10 12 00 39 3A 49 6E 73 31 20 31 30 3A 49 6E 32 20 31 31 3A 49 6E 33 20 31 32 3A 49 6E 34 20 31 33 3A 49 6E 35 20 31 34 3A 49 6E 36 20 31 35 3A 49 6E 37 20 31 36 3A 49 6E 38 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 20 2D 2D 20 20 20 20 F7

I also ran the data out via a spare port on my Unitor 8 and the data was fine:

0000F9CC   8  13     D0    00    --    1  ---  Channel Aft    
0000F9D7   8  13     F0  Buffer:     8 Bytes   System Exclusive
SYSX: F0 00 00 66 10 21 01 F7
0000F9D7   8  13     F0  Buffer:     9 Bytes   System Exclusive
SYSX: F0 00 00 66 10 20 00 07 F7

The other thing that makes me suspect MIDI Yoke rather than MIDI OX is that the debug information from my own software is reporting unterminated sysex messages (which is why I noticed the problem in the first place).

Anything I can do to help track it down?

Steve.


Title: Re: MIDI Yoke corrupting sysex messages?
Post by Jamie OConnell on Jun 10th, 2003, 11:26am
Thanks for the additional info -- we'll have to take a closer look.  To recreate your observations, I'll need to know your SysEx buffer settings: View | SysEx... then SysEx | Configure...  Also list any other settings you have checked in the configure dialog.

Also what buffer sizes are you using in your software?  And do you happen to know what Logic is using for buffers?


[A little later...]
I was able to get some corruption sending a repaired version of your above dump from one instance of  MIDI-OX to another when setting extremely small buffers (< 64 bytes) for the sender and/or setting the message delay time to < 10 milliseconds for the sender, and/or unchecking "[x] Delay after F7".

While we will look into this further, recommendations for software sending SysEx would be to use buffers of at least 128 bytes, and to delay at least 20 milliseconds between messages to give the receiving hardware (or Software) a chance to recover.

Title: Re: MIDI Yoke corrupting sysex messages?
Post by pre-fix on Jun 10th, 2003, 8:47pm
Jamie,

Low level input and output buffers (in MIDI OX) are left at their default: 256 bytes x 16, delay 60ms between buffers, delay 60ms after F7.

The other thing to add is that the sysex is only part of the data stream.  There's whole bunch of CC/PB/AT controller data coming out of Logic at the same time (it's a *really* fast data stream).  I can send a full dump if that helps (though I'm not sure it would be in an easy-to use format).

Obviously, I have no way of slowing the data down from Logic and my software is using input buffers of several K in size.  There's no way to my knowledge of seeing what buffer sizes Logic is using.

Is there any way for me to configure larger buffers for MIDI Yoke to use, or would that not help at all?

Steve.

Title: Re: MIDI Yoke corrupting sysex messages?
Post by Jamie OConnell on Jun 11th, 2003, 10:30am
Drivers never create buffers.  They are either handed pre-filled buffers by an application (driver output port), or given empty buffers to use for SysEx (driver input port).  A virtual driver must deal with potentially different sized buffers on its inputs and outputs.  It seems like you might have found one place where it doesn't deal with it correctly, although I suspect speed is also a problem here.



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.