[phpBB Debug] PHP Notice: in file /viewtopic.php on line 988: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 988: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Sagan Technology Metro • View topic - SYSEX checksum computation

SYSEX checksum computation

Please report any bugs found here.

Moderator: Scoot

SYSEX checksum computation

Postby vicpierce » Wed Nov 26, 2003 6:31 pm

To shift notes down an octave for a channel on my Yamaha MU50, I assigned the following sysex to a Metro (v 6.1.0.4 on OSX 10.2.8) fader;
F0 43 10 2B 02 01 18 34 SS F7
The resulting checksum, 33H, caused the MU50 to give a checksum error.
A little experimentation and changing the checksum to 31H and all was well.
Vic Pierce
vicpierce
 
Posts: 25
Joined: Wed Feb 19, 2003 8:02 pm
Location: Los Angeles, California

Postby Jerm » Wed Nov 26, 2003 7:42 pm

Different manufacturers use different methods to calculate checksums. I think we use the Roland method.

I think 'Cornutt' would know.

http://www.sagantech.com/metroforum/vie ... t=checksum
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby vicpierce » Thu Nov 27, 2003 4:45 pm

Different manufacturers use different methods to calculate checksums. I think we use the Roland method.

I think 'Cornutt' would know.

Yes, The Roland method from Cornutt's posting of May 7 works for the Yamaha as well. I rechecked, and Metro does give a different checksum.
vicpierce
 
Posts: 25
Joined: Wed Feb 19, 2003 8:02 pm
Location: Los Angeles, California

Postby Jerm » Thu Nov 27, 2003 9:19 pm

vicpierce wrote:Yes, The Roland method from Cornutt's posting of May 7 works for the Yamaha as well. I rechecked, and Metro does give a different checksum.


Well that is the exact code to calculate the checksum. If you want to post the sysex I will manually post the checksum that I calculate.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby vicpierce » Thu Nov 27, 2003 11:12 pm

Jerm wrote:Well that is the exact code to calculate the checksum. If you want to post the sysex I will manually post the checksum that I calculate.

Here is the sysex: F0 43 10 2B 02 01 18 34 SS F7
Assigning this to a fader gives 33H for SS.
The Roland (cornutt's posted) algorithm gives 31H for the checksum.
Vic Pierce
vicpierce
 
Posts: 25
Joined: Wed Feb 19, 2003 8:02 pm
Location: Los Angeles, California

Postby Jerm » Fri Nov 28, 2003 12:02 am

Vic,

As you have seen in the Cornutt thread (Cornutt will need to re-verify this), it works on his devices.

Therefore I think the correct answer is 33H. The result is 31H if you also include the 02 in your checksum but I do not think this is the way the checksum was intended. When he adds 4 to the address (which goes into the variable 'first') the F0 has already been stripped off. If you need a checksum calculator that includes the fourth byte (with the F0 pre-stripped) let us know in the feature request section of this forum as it is very simple to add.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby cornutt » Sat Nov 29, 2003 11:37 pm

Jerm wrote:Vic,

As you have seen in the Cornutt thread (Cornutt will need to re-verify this), it works on his devices.



Yes, it works on my JD-800, which is pretty much the canonical synth for the Roland sysex format. When I calculate the checksum by hand for the example given, I get 33 hex.


Therefore I think the correct answer is 33H. The result is 31H if you also include the 02 in your checksum but I do not think this is the way the checksum was intended. When he adds 4 to the address (which goes into the variable 'first') the F0 has already been stripped off.


That is correct. The code that I sent to Jeremy is from a JD-800 librarian that I was writing (which I never finished, alas). In that code, when the sysex is passed to that routine, the F0 has already been stripped.

In the Roland format, the next three bytes after the manufacturer ID are fixed-format and are always treated as device, model, and command ID bytes. These bytes are not included in the checksum. So, if the F0 is considered to be the first byte (i.e., byte 1), the checksum starts with byte 6.

I don't currently own a functioning Yamaha device, so I can't say anything about their checksum formula. I'm a bit surprised to find that it is even remotely similar to Roland's. (E-mu's formula, to name one example, is completely different.)
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA

Checksum

Postby vicpierce » Sun Nov 30, 2003 5:49 pm

If I had read the comments to the cornutt's algorithm closer I would have realized the F0 was already stripped :oops: .
The Yamaha does use all bytes after the model ID (except EOX and checksum bytes) in the checksum calculation. However, I was using the TG300B mode of my MU50 which required checksum bytes for many sysex messages. I've switched to the XG mode which uses checksums only for Bulk dumps - as far as I can tell from the MU50 documentation. I have set up the mixer window just as cornutt described - with faders for seven paramaters - and am happily tweaking the cymbalum voice. I'd given up until this tool was revealed. Thank you!
vicpierce
 
Posts: 25
Joined: Wed Feb 19, 2003 8:02 pm
Location: Los Angeles, California

Postby Jerm » Sun Nov 30, 2003 6:52 pm

If you guys have particular Metro documents that will be helpful for others we could post them somewhere on our site.

Metro 6.1.0.5 will support templating by either locking the document or setting the stationery bit. These setups with outputs and/or remote control setups for a particular device would be cool templates for Metro users.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby Scoot » Sun Nov 30, 2003 9:43 pm

Jerm wrote:Metro 6.1.0.5 will support templating by either locking the document or setting the stationery bit. These setups with outputs and/or remote control setups for a particular device would be cool templates for Metro users.



Good idea!

Although I wouldn't want a metro file from Francois with 500+ sections in it. :lol:

I don't think my little mac could handle it. :wink:


scoot.
Scoot
 
Posts: 1124
Joined: Tue Feb 11, 2003 10:50 pm
Location: New Zealand


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 16 guests