User manual

XGedit95 User Manual Page 59
If we were really ambitious we could extend this multi byte Parameter Change message to change all
Variation parameters in a single message!
However certain restrictions apply as follows:-
a) You must send messages with number of data values defined in the Sysex tables.
b) If you send more than one parameter in a given message then you must always send the complete
parameter block. You will notice that the tables are split into blocks and that each block has a total size.
Hence if we wanted to change VARIATION RETURN and VARIATION PAN, then we must either send each
parameter as a separate message or we must send the whole block (i.e. from address 02 01 40 with 21 hex
(33 decimal) data bytes!
Consequently unless you really want to change every parameter in a block you are best sticking to
individual Parameter Change messages per parameter.
16.4.3 Numbers That Are Too Big For Single Bytes
Lets assume we now want to set the Lch Delay of the DELAY LR effect to its maximum value. If we inspect
the Effect Parameter List tables we find that a setting of 715.0ms corresponds to a value of 7150 decimal.
Also we find that VARIATION PARAMETER 1 requires two data bytes.
The first approach might be to convert 7150 to a hexadecimal number i.e. 1BEE and to send this as the two
data bytes i.e. xx= 1B EE.
Unfortunately this will not work. The reason being that the second byte is greater than 127 decimal (7Fhex)
and will therefore be treated as a Midi command byte (in this case it corresponds to the command for Pitch
Bend on midi channel 15).
The answer to this problem is to send the data as 7bit bytes (i.e. bytes whose values have a maximum
value of 127dec)
In this format the upper bit of the LSB becomes the lower bit of the MSB. So for example 130 decimal (82
hex) is send as 01 02.
A simple way of calculating data in this way using the Windows calculator is as follows:-
1) Convert the number to hex.
2) Divide by 80 hex to yield the MSB value (i.e. this is the original value modulus 128 decimal)
3) Multiply the MSB value by 80 hex and subtract from the original hex value (i.e. this is the remainder of
the original number modulus 128 decimal).
So in our example we have a value of 7150 to transmit.
7150 decimal = 1BEE hex
MSB = 1BEE / 80 = 37 hex
LSB = 1BEE - (37 x 80) = 1BEE - 1B80 = 6E
So our data value xx = 37 6E
Therefore to construct our message we take the VARIATION PARAMETER 1 address of 02 01 42 and the
data value of 37 6E to produce a sysex message of
F0 43 10 4C 02 01 42 37 6E F7