Roland V-Synth Musical Instrument User Manual


 
169
MIDI Implementation
Appendices
Example of an Exclusive Message and
Calculating a Checksum
Roland Exclusive messages (RQ1, DT1) are transmitted with a checksum at the end (before
F7) to make sure that the message was correctly received. The value of the checksum is
determined by the address and data (or size) of the transmitted Exclusive message.
How to Calculate the Checksum
(hexadecimal numbers are indicated by “H”)
The checksum is a value derived by adding the address, size, and checksum itself and
inverting the lower 7 bits.
Here’s an example of how the checksum is calculated. We will assume that in the Exclusive
message we are transmitting, the address is aa bb cc ddH and the data or size is ee ffH.
aa + bb + cc + dd + ee + ff = sum
sum ÷ 128 = quotient ... remainder
128 - remainder = checksum
<Example1> Setting CHORUS TYPE of PATCH to CHORUS 1 (DT1)
According to the “Parameter Address Map” (p. 159), the start address of Temporary Patch
is 10 00 00 00H, the offset address of PATCH CHORUS at PATCH is 04 00H, and the
address of CHORUS TYPE is 00 00H. Therefore the address of CHORUS TYPE of PATCH
CHORUS is;
10 00 00 00H
04 00H
+) 00 00H
10 00 04 00H
CHORUS 1 has the value of 01H.
So the system exclusive message should be sent is;
F0 41 10 00 53 12 10 00 04 00 01 ?? F7
(1) (2) (3) (4) (5) address data checksum (6)
(1) Exclusive Status (2) ID (Roland) (3) Device ID (17)
(4) Model ID (V-Synth) (5) Command ID (DT1) (6) End of Exclusive
Then calculate the checksum.
10H + 00H + 04H + 00H + 01H = 16 + 0 + 4 + 0 + 1 = 21 (sum)
21 (sum) ÷ 128 = 0 (quotient) ... 21 (remainder)
checksum = 128 - 21 (remainder) = 107 = 6BH
This means that F0 41 10 00 53 12 10 00 04 00 01 6B F7 is the message should be sent.
<Example2> Getting the data (RQ1) of PATCH MFX in PATCH:003
According to the “Parameter Address Map” (p. 159), the start address of PATCH:003 is 20
02 00 00H, and the offset address of PATCH MFX is 00 02 00H.
Therefore the start address of PATCH MFX in PATCH:003 is;
20 02 00 00H
+) 00 02 00H
20 02 02 00H
As the size of PATCH MFX is 00 00 01 04H, the system exclusive message should be sent is;
F0 41 10 00 53 11 20 02 02 00 00 00 01 04 ?? F7
(1) (2) (3) (4) (5) address data checksum (6)
(1) Exclusive Status (2) ID (Roland) (3) Device ID (17)
(4) Model ID (V-Synth) (5) Command ID (RQ1) (6) End of Exclusive
Then calculate the checksum.
20H + 02H + 02H + 00H + 00H + 00H + 01H + 04H = 32 + 2 + 2 + 0 + 0 + 0 + 1 + 4
= 41 (sum)
117 (sum) ÷ 128 = 0 (quotient) ... 41 (remainder)
checksum = 128 - 41 (remainder) = 87 = 57H
This means that F0 41 10 00 53 11 20 02 02 00 00 00 01 04 57 F7 is the message should be sent.
<Example3> Getting Temporary Patch (Part 1) data (RQ1)
cf.) This operation is the same as Data Transfer function in Utility mode with “PATCH:
TEMP” (Source parameter) options.
According to the “Parameter Address Map” (p. 159), the start address of Temporary Patch
(Part 1) is assigned as following:
10 00 00 00 Temporary Patch (Part 1)
The offset address of Patch is also assigned as follows:
00 00 00 Patch Common
:
00 10 00 Patch Oscillator (Zone 1)
:
00 20 00 Patch Envelope (Zone 1)
:
00 40 00 Patch LFO (Zone 1)
:
00 50 00 Patch COSM1 (Zone 1)
:
00 60 00 Patch COSM2 (Zone 1)
:
00 70 00 Patch Arpeggio (Note 1)
:
00 7F 00 Patch Arpeggio (Note 16)
As the data size of Patch Arpeggio is 00 00 00 42H, summation of the size and the start
address of Temporary Patch Arpeggio (Note 16) will be;
10 00 00 00H
00 00 7F 00H
+) 00 00 00 42H
10 00 7F 42H
And the size that have to be got should be;
10 00 7F 42H
-) 10 00 00 00H
00 00 7F 42H
Therefore the system exclusive message should be sent is;
F0 41 10 00 53 11 10 00 00 00 00 00 7F 42 ?? F7
(1) (2) (3) (4) (5) address data checksum (6)
(1) Exclusive Status (2) ID (Roland) (3) Device ID (17)
(4) Model ID (V-Synth) (5) Command ID (RQ1) (6) End of Exclusive
Calculating the checksum as shown in <Example 2>, we get a message of F0 41 10 00 53 11
10 00 00 00 00 00 7F 42 2F F7 to be transmitted.