MIDI Devices

27
MIDI devices
Using generic values (Example)
Sometimes, a byte is used for two or more different mes-
sages, e.g. “0001 1111” with the last five bits used as on/
off signal for five different, independent switches.
For this, you would have to use the option “Generic” as
Value Type, with which you can define the usage of spe-
cific bits.
In the following example we want to define two indepen-
dent values in byte 6:
The first value is “LFO Type” and uses the first three bits
(the very first bit of every byte is 0 per definition, except for
the start and end byte of the SysEx message).
The second value is “LFO Phase” and uses four bits of
the byte.
This has to result in a byte 6 structure of “0xxx xxxx“.
Proceed as follows:
1. Create a new Sysex message of length 9. Remove all
values besides 6 and 7.
2. Click on Value 6, rename it to “LFO Type” and set it to
“Generic” as Value Type.
So far, we have “0xxx xxxx” in the binary field, which corresponds to the
“7” as Number of Bits. The Byte Offset is automatically set to “1”.
3. To move the bits to the correct byte 6, set the Byte
Offset to “6”.
4. Since we want to use only three bits, set the Number
of Bits to “3”.
As you can see in the binary field, so far we have edited the second half
of the byte.
5. Now proceed with Value 7. Rename it to “LFO Phase”,
set it to “Generic” as Value Type, reduce the Number of
Bits to “4” and set the Byte Offset to “6” to shift the value
to the same byte.
The two values now take up the same bits in the byte, as visible from the
exclamation points in the binary field. Therefore, we have to move one of
the values, e.g. “LFO Type”.
6. Click on the Bit Offset and go up to “4”.
Now the byte has the binary content “0xxx xxxxx” defined with two values.
7. When you click OK and return to the Add Parameters
window, you can see that the variable “LFO Type” has a
range of 0–7 (as available with three bits) and “LFO
Phase” has a range of 0–15 (for four bits).
Ö Remember that you can edit the settings of a Sysex
message only in the Create Sysex window. Afterwards,
you can only edit the variables, but not the static bytes.