7-2
System Exclusive Protocol
K2661 System Exclusive Implementation
Data Formats
K2661 SysEx messages are subdivided into fields that contain data in different formats. The
various fields are shown in the Messages section below. Within a message, any fields for values
that can be bigger than 7 bits are broken into 7 bit chunks. Thus two MIDI bytes gives 14 bits,
three bytes gives 21 bits. The significant bits are right justified in the field. All bytes in a field
must be present no matter what the value is. For example, an object type of 132 would be split
into two MIDI bytes in a type field as 01 04:
Object name fields are sent as a string of ASCII values in a name field, with one MIDI byte of
zero as a string terminator. For example, the name Glass Kazoo would be sent as follows:
Data sizes and offsets are sent in the size and offs fields.These values refer to quantities of 8-bit
bytes in the K2661’s memory, which is packed in the data field.
Binary data in the data field are sent in one of two formats, according to the value of the form
field. If the form field equals zero, the data are transmitted as 4 bits or one “nibble” in every
MIDI byte. If the form field equals one, then the data are sent as a compressed bit-stream, with 7
bits per MIDI byte. The bit-stream format is more efficient for data transmission, while the
nibble format is easier to read (and write software for).
For example, to send the following four K2661 data bytes,
eight MIDI bytes are sent in “nibble” format:
five MIDI bytes are sent in bit-stream format:
decimal: 132
binary: 10000100
binary encoding for type(2) field: 0000001 0000100
decimal encoding for type(2) field: 1 4
G l a s s _ K a z o o <null>
hex encoding
for name field:
47 6C 61 73 73 20 4B 61 7A 6F 6F 00
hex: 4F D8 01 29
decimal: 79 216 1 41
binary: 01001111 11011000 00000001 00101001
hex040F0D0800010209
decimal 4 15 13 80129
binary 0000100 0001111 0001101 0001000 0000000 0000001 0000010 0001001
hex: 27 76 0 12 48
decimal: 39 118 0 18 72
binary: 0100111 1110110 0000000 0010010 1001000