[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 checksums

Sysex checksums

Please post any ideas for new features in Metro or Metro SE here.

Sysex checksums

Postby cornutt » Tue May 06, 2003 6:49 pm

I posted a bit in the Tips forum about assigning sysex to faders. It's really neat for doing a lot of things, but... Some synths, like a lot of Rolands and some E-mus, require a checksum in a sysex message. Would it be possible to add a feature to this so that it can calculate the checksum and insert it into the sysex in place of a code (say, "CC") for each message generated? I don't know how many different checksum algorithms are used by the different manufacturers, so I admit this could be a fair amount of work.
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA

Postby Jerm » Tue May 06, 2003 7:00 pm

Cornutt,

That is cool and I am glad you are using this feature. It is rather simple to implement a checksum with the caveat that you mentioned. There are different ways to calculate a checksum and some manufacturers use different algorithms.

I would be willing to implement a feature such as this as long as I had:

1. Adequate documentation decribing the checksum algorithm and
2. sufficient testers to check and make sure it was working on the intended device(s). Note: I do have a bunch of Roland, Korg and Yamaha equipment but I haven't looked at this sysex listing in quite a while. I do not have any E-Mu devices.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby cornutt » Tue May 06, 2003 8:11 pm

Upon further review, I see in my Proteus/2 manual that it only requires the checksums on patch dump/load sysex messages. Parameter edit messages don't need a sysex.

I have a piece of code laying around somewhere that generates checksums that work with my JD800. I've been told that pretty much all Roland models since about 1990 use the same algorithm. I'll try to find the code and send it to you.
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA

Postby Jerm » Tue May 06, 2003 9:13 pm

8)
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby cornutt » Wed May 07, 2003 9:23 pm

Here's my code for computing the Roland checksums. I figured I'd post it here in case anyone else is interested. I've been told that this code works for everything Roland has ever made that requires a checksum (which is pretty much everything they've ever made with MIDI, except for the Juno-106 and the Jupiter retrofit kits). I can testify that this code works with my JD800 and S-750.

Apologies for the funny indenting; the tabs didn't paste properly into the form, and it seems to throw away leading spaces.

-------

unsigned compute_checksum(unsigned char buffer[],
long xstart,
long xend)

{
long first, last; /* start and end of data to be summed */
unsigned sum = 0;
unsigned checksum;
long i;

/*
* Figure out where the data to be summed starts and ends.
* This includes the JD800 address and all of the data except
* the checksum byte itself, but not the EOX, or the
* manufacturer ID, or the first three Roland-specific
* bytes (the unit #, model ID, and command code).
*/
first = xstart+4; /* skip four header bytes */
last = xend-2; /* exclude EOX and the checksum byte */

/* The checksum formula is 128 - (sum of bytes, mod 128). */
for (i = first; i <= last; i++)
sum += buffer[i];
sum &= 0x7f; /* makes it mod 128 */
checksum = 0x80 - sum; /* checksum should be >= 0 && < 0x80 */
/* fix incorrect value of 0x80 if necessary */
if (checksum == 0x80)
checksum = 0;


/* All done */
return(checksum);
}
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA

Re: Sysex checksums

Postby Jerm » Wed May 07, 2003 11:19 pm

cornutt wrote:it can calculate the checksum and insert it into the sysex in place of a code (say, "CC") for each message generated?


Hmmm.. perhaps "CC" is not the best choice. Perhaps CS or SS would be better.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Re: Sysex checksums

Postby cornutt » Thu May 08, 2003 10:22 am

Jerm wrote:
Hmmm.. perhaps "CC" is not the best choice. Perhaps CS or SS would be better.


Yeah, that's true, CC might be mistaken for a MIDI channel number.
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA

Postby Jerm » Thu May 08, 2003 12:03 pm

I was thinking it is a valid hex byte.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby Jerm » Wed May 28, 2003 3:28 pm

This is implemented in the 6.0.7.2 pre-release. SS for checksum. However it is completely untested. Can you test this please?

Thanks.
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Postby cornutt » Thu May 29, 2003 9:43 pm

Jerm wrote:This is implemented in the 6.0.7.2 pre-release. SS for checksum. However it is completely untested. Can you test this please?

Thanks.


I'll do it as soon as I can. Right now I don't have a MIDI interface that works with OSX. I ordered a MOTU MIDI Express USB, but Sweetwater says they haven't been able to get any from MOTU. Speculation is that it is going to be discontinued and replaced with a Mk II model. I'm going to give it another week, and if MOTU still isn't shipping by then I'll change my order to something else. I am ready to be up and running on X!
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA

Postby Scoot » Fri May 30, 2003 1:09 am

I can recommend a midisport, though it does have a pulsing on light that is a little annoying.

Have no idea what the midi thru button does. On the old serial device you could plug another cable in and run a printer off it. So on midi you would be sequencing and on thru you would be printing.

There is no additional socket to place another cable.


Apart from all that it works. :D

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

Postby cornutt » Thu Jun 05, 2003 2:21 pm

Jerm wrote:This is implemented in the 6.0.7.2 pre-release. SS for checksum. However it is completely untested. Can you test this please?

Thanks.


Good news: I just tried it with my JD-800, and it works! Very cool. 8) Thanks. Now it's time for me to go build up a set of instruments that will edit the multi-mode effects settings...
cornutt
 
Posts: 74
Joined: Wed Apr 02, 2003 10:41 pm
Location: Huntsville, AL USA


Return to Metro/LX/SE Feature Request

Who is online

Users browsing this forum: No registered users and 6 guests