Download MANUAL DEL USUARIO
Transcript
Aplicación MIDI ■ Examples of Exclusive Messages and Calculating the Checksum Roland exclusive messages (RQ1, DT1) are transmitted with a checksum at the end of the data (before F7) to check that the data was received correctly. The value of the checksum is determined by the address and data (or size) of the exclusive message. <Example 3> Retrieving data for Temporary Performance (RQ1) * When a data transfer is executed in Utility mode, data that is accessed will be the same as that which is transmitted when the Type parameter is set to PERFORM and the Source parameter is set to TEMP: -PATCH The ÒParameter Address MapÓ gives the following start addresses for Temporary Performance data. ● How to Calculate the Checksum (hexadecimal values are indicated by a “H”) The checksum consists of a value whose lower 7 bits are 0 when the address, size and checksum itself are added. The following formula shows how to calculate the checksum when the exclusive message to be transmitted has an address of aa bb cc ddH, and data or size of ee ffH. aa + bb + cc + dd + ee + ff = total total / 128 = quotient ... remainder 128 - remainder = checksum 01 00 00 00 00 01 00 00 00H 00H 28H 28H 41 (2) 10 (3) (1) Exclusive status (4) Model ID (XP-30) 6A (4) Thus, the Size for the retrieved data will be: 01 00 1F 19H -) 01 00 00 00H 00 00 1F 19H 12 (5) 41 (2) 10 (3) (1) Exclusive status (4) Model ID (XP-30) 01 00 00 28 address (2) ID number (Roland) (5) Command ID (DT1) 06 data ?? checksum F7 (6) 6A (4) 11 (5) 01 00 00 00 address (2) ID number (Roland) (5) Command ID (RQ1) 00 00 1F 19 size ?? checksum F7 (6) (3) Device ID (17) (6) EOX Calculating the checksum as shown in <Example 2>, we get a message of F0 41 10 6A 11 01 00 00 00 00 00 1F 19 47 F7 to be transmitted. (3) Device ID (17) (6) EOX <Example 4> Retrieving the Temporary Performance data together with all Temporary Part and Rhythm Set data (RQ1) * When a data transfer is executed in Utility mode, the data that is accessed will be the same as that which is transmitted when the Type parameter is set to PERFORM and the Source parameter is set to TEMP: +PATCH Next we calculate the checksum. 01H + 00H + 00H + 28H + 06H = 1 + 0 + 0 + 40 + 6 = 47 (sum) 47 (total) / 128 = 0 (quotient) ... 47 (remainder) checksum = 128 - 47 (quotient) = 81 = 51H The ÒParameter Address MapÓ gives the following start addresses for Temporary Performance, Performance Mode Temporary Patch and Performance Mode Temporary Rhythm. 01 00 00 00H Temporary Performance 02 00 00 00H Performance Mode Temporary Patch(part 1) : 02 08 00 00H Performance Mode Temporary Patch(part 9) 02 09 00 00H Temporary Rhythm Setup 02 0A 00 00H Performance Mode Temporary Patch(part 11) : 02 0F 00 00H Performance Mode Temporary Patch(part 16) This means that the message transmitted will be F0 41 10 6A 12 01 00 00 28 06 51 F7. <Example 2> Retrieving data for USER:03 Performance Part 3 (RQ1) The ÒParameter Address MapÓ indicates that the starting address of USER:03 is 10 02 00 00H, and that the offset address of Performance Part 3 is 12 00H. Thus, the address is: +) Temporary Performance Part 16 Since Performance Part has a size of 00 00 00 19H, we add that size to the start address of the Temporary Performance Part 16, resulting in: F0 (1) Since DELAY is parameter value 06H, F0 (1) Temporary Performance Common Temporary Performance Part 1 01 00 1F 00H +) 00 00 00 19H 01 00 1F 19H <Example 1> Setting the Performance Common REVERB TYPE to DELAY (DT1) The ÒParameter address mapÓ indicates that the starting address of the Temporary Performance is 01 00 00 00H, that the Performance Common offset address is 00 00H, and that the REVERB TYPE address is 00 28H. Thus, the address is: +) 01 00 00 00H 01 00 10 00H : 01 00 1F 00H 10 02 00 00H 12 00H 10 02 12 00H Since the size of the Performance Part is 00 00 00 19H, F0 (1) 41 (2) 10 (3) (1) Exclusive status (4) Model ID (XP-30) 6A (4) 11 (5) 10 02 12 00 address (2) ID number (Roland) (5) Command ID (RQ1) 00 00 00 19 size ?? checksum (3) Device ID (17) (6) EOX Next we calculate the checksum. F7 (6) The Patch offset addresses are as follows. 00 00H Patch Common 10 00H Patch Tone 1 : 16 00H Patch Tone 4 Since Patch Tone has a size of 00 00 01 01H, we add this size to the start address of Performance Mode Temporary Patch (Part 16) Tone 4, to get: 10H + 02H + 12H + 00H + 00H + 00H + 00H + 19H = 16 + 2 + 18 + 0 + 0 + 0 + 0 + 25 = 61 (sum) 02 0F 00 16 +) 00 00 01 02 0F 17 61 (total) / 128 = 0 (product) ... 61 (remainder) checksum = 128 - 61 (remainder) = 67 = 43H Thus, the size of the retrieved data will be: Thus, a message of F0 41 10 6A 11 10 02 12 00 00 00 00 19 43 F7 would be transmitted. 02 0F 17 01H -) 01 00 00 00H 01 0F 17 01H F0 (1) 41 (2) 00H 00H 01H 01H 10 (3) (1) Exclusive status (4) Model ID (XP-30) 6A (4) 11 (5) 01 00 00 00 address (2) ID number (Roland) (5) Command ID (RQ1) 01 0F 17 01 size ?? checksum F7 (6) (3) Device ID (17) (6) EOX Calculating the checksum as shown in <Example 2>, we get a message of F0 41 10 6A 11 01 00 00 00 01 0F 17 01 57 F7 to be transmitted. 204