--- In bc2000@yahoogroups.com, "rpcfender" <rpcfender@...> wrote: > Strange stuff for those that might be interested, there is a reason for > multiple lines in the *.tx* statement. > Perhaps you all knew this, but it was something new to me. "Perhaps you all knew this"? Frankly, Royce, I think that most people in this group (including me) would NEVER assume they know anything about BCL that you don't... But seriously: I now realize that I should probably have announced my discoveries about multiple .tx messages more prominently than just "hiding" them in BC MIDI Implementation.pdf vs. 1.0. But there are always so many issues - it just got lost a bit. > *As you loose 2 bytes for each .tx statement and I thought that multiple > lines were just for neatness I made a single .tx (learn statement in > Mark's spec) > *.tx **$B0 $00 87 $B0 $20 $00 $C0 $0A* *$F0 $41 $10 $00 $10 $11 > $30 $25 0 0 0 0 0 val chk-1 6 $F7 > * > but the XV3080 said that there was a bad checksum > > The value after the checksum (chk-1 ) gives the starting position of the > data to be summed. 6 in my case. > I thought the BCR would look back to see the $F0 and count from there. > Not so, it counts from the start of the .tx message > > You could count from the the start of the whole message (and make the > checksum offset in my case 14) or all you need to do this > > *.tx **$B0 $00 87 $B0 $20 $00 $C0 $0A > .tx* *$F0 $41 $10 $00 $10 $11 $30 $25 0 0 0 0 0 val chk-1 6 $F7 > * > Now it works. > > Check out Mark's spec on *Checksum Defininition* Just one addition: as the same section in BC MIDI Implementation.pdf explains, there is a second reason for using multiple .tx lines: any SysEx message ($F0 ... $F7) in non-terminal position on a .tx line leads to extra, spurious MIDI output from the BCF/BCR. (I think there was a message strand in our group on this problem about 8 months ago or so, but I never got round to stepping in at that time.) So starting from your original, invalid attempt above: 1. if you put the SysEx message IN FRONT OF all the $B0 and $C0 messages, the CHECKSUM would be correct, but there would be spurious output. 2. if you put the SysEx message somewhere IN BETWEEN the other messages, you get BOTH spurious output AND a wrong checksum! What a mess... So to summarize: a SysEx message containing a "chk-" definition must be both in INITIAL position (for a correct checksum) and in FINAL position (to avoid spurious output). In other words: it must constitute a single .tx line. Mark.
Message
Re: Multiple .tx lines
2008-07-09 by Mark van den Berg
Attachments
- No local attachments were found for this message.