Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!lth.se!newsuser From: e85rw@efd.lth.se (Ricard Wolf) Newsgroups: comp.music Subject: Re: MIDI SysEx Checksums (esp. Casio equipment) Keywords: ADD, XOR, mod Message-ID: <1990Oct31.074304.14260@lth.se> Date: 31 Oct 90 07:43:04 GMT References: <2077@aber-cs.UUCP> Sender: newsuser@lth.se (LTH network news server) Reply-To: e85rw@efd.lth.se (Ricard Wolf) Organization: Lund Institute of Technology, Sweden Lines: 29 In article <2077@aber-cs.UUCP> cho@uk.ac.aber.cs (Chris Orgill) writes: > >I am trying to write an Editor-Librarian on the Macintosh for a newly >acquired Casio VZ-1. Fine so far, but in the SysEx documentation Casio >omit to mention how their 7-bit checksum is generated. I can only >assume they allude to some commonly-known format for MIDI checksums. >Unfortunately, since this is my first programming experience of MIDI, >I do not know this format ! I can only report that it is not (the sum >of all the data bytes indicated) modulo 128. All clues gratefully >received ! I don't know how Casio perform their checksum, but in som cases you XOR all the bytes together (even though it is called a check *sum*). The reason for this can be to permit the same routine to do the checksumming both when receiving and transmitting. Another difficulty is which bytes to checksum. Some manufacturers checksum all the bytes in the SYSEX data (usually not including the ID number), whereas others just checksum the "raw" data itself (i.e. not any headers like patch numbers or sample lengths). Hope this helps. -- Ricard Wolf +--------------------------+-------------------------------------+ | Ricard Wolf | Lund Institute of Technology | | email: e85rw@efd.lth.se | If you can't buy 'em - build 'em !! | +--------------------------+-------------------------------------+