Roland SysEx checksum calculator
Roland instruments reject a System Exclusive “data set” message unless its last data byte is a correct checksum. Type the address and data bytes to get the checksum, build a complete message, or paste a message to see whether its checksum is right. Bytes are hexadecimal; spaces, commas and 0x prefixes are all accepted.
Calculator
Checksum of address + data
Build a DT1 message
Check a complete message
How the Roland checksum works
Add up the address bytes and the data bytes (not F0, the manufacturer, device, model or command bytes). Take the remainder when dividing by 128, and subtract it from 128. If the remainder is 0, the checksum is 0, not 128, because a data byte can only hold 0–127. In other words, the checksum is the value that makes address + data + checksum a multiple of 128.
Example: GS master volume 127 is address 40 00 04 and data 7F. In decimal, 64 + 0 + 4 + 127 = 195; 195 mod 128 = 67; 128 − 67 = 61, which is 3D. The full message is F0 41 10 42 12 40 00 04 7F 3D F7.
const rolandChecksum = (bytes) => (128 - (bytes.reduce((a, b) => a + b, 0) % 128)) % 128;
The parts of a Roland message
F0: start of System Exclusive.41: Roland’s manufacturer ID.- Device ID: usually
10(device 17 in Roland’s 1-based numbering).7Faddresses every device. - Model ID: one byte on older instruments (
42for GS,16for the MT-32), several bytes on newer ones (the Integra-7 uses00 00 64). The MIDI implementation chart in the manual gives the exact bytes. - Command:
12DT1 (data set) writes data,11RQ1 (data request) asks the instrument to send data back. - Address: three bytes on older gear, four on most modern gear.
- Data for DT1, or a size for RQ1. Both are included in the checksum.
- Checksum, then
F7.
Every byte between F0 and F7 must be 7-bit (00–7F). A byte of 80 or above inside a SysEx message ends it early, and is the most common cause of “the synth ignores my message”.
Sending SysEx from a browser
Web MIDI only sends SysEx when the page asks for it with navigator.requestMIDIAccess({ sysex: true }) and the user agrees. The Web MIDI API tutorial shows the request and a live monitor that displays incoming SysEx. To read a captured dump byte by byte, paste it into the MIDI message decoder. Other makers use other schemes: Yamaha uses the same two’s-complement idea over its address and data, while Korg and many newer devices use no checksum at all.