Kurzweil Music Systems K2600R, K2600, K2600X Reference Manual

K2600 System Exclusive Implementation

System Exclusive Protocol
Chapter 7 System Exclusive Protocol
K2600 System Exclusive Implementation
The MIDI System Exclusive capabilities of the K2600 allow you to manipulate objects in the K2600Õs memory from a computer system, another K2600, or a MIDI data recorder. The following is a reference to the SysEx protocol used by the K2600. This information can be used to build a simple object librarian software program. A word of adviceÑbefore you begin experimenting with SysEx, make sure you have saved anything of value in RAM to disk.
NOTE : To support new features and changes in the K2600 line of products, the internal program
structure has been changed from that of the K2000. Due to these changes, you cannot transfer a K2000 program to a K2600, or a K2600 program to a K2000 via MIDI system exclusive. The K2600 software will continue to be enhanced, and in the future the K2600 will be capable of accepting K2000 programs over MIDI. As a result of this, computer based K2000 editor/librarians will not currently work with the K2600, unless they have been revised to accommodate the changes.

Common Format

In the following discussion, the Þelds of the K2600 System Exclusive Protocol messages are notated as message, and that make up the Þeld. A length of n means that the Þeld is of a variable length that is determined by its contents or subÞelds.
All K2600 SysEx messages have the common format:
sox(1) kid(1) dev-id(1) pid(1) msg-type(1) message(n) eox(1) sox
is always F0h, and represents start of System Exclusive.
kid
must be 07h, and is the Kurzweil Manufacturer ID.
dev-id
SysEx ID parameter from the MIDI-mode RECEIVE page. If the K2600Õs SysEx ID parameter is set to 127, it will recognize SysEx messages no matter what the value of
pid
is the Product IdentiÞer, and must be 78h (120 decimal), indicating the SysEx message is for
the K2600.
msg-type
variable-length message contents.
eox
is always F7h, for end of System Exclusive.
field(length)
is Device ID. The K2600 will recognize a SysEx message if
is the identiÞer of one of the K2600 SysEx messages deÞned below, and
(length)
, where
is either 1, 2, 3, or n, representing the number of sequential MIDI bytes
field
is the name of the particular information Þeld in the
dev-id
is the same is the
dev-id
is.
message
is the
7-1
System Exclusive Protocol
K2600 System Exclusive Implementation

Data Formats

K2600 SysEx messages are subdivided into Þelds that contain data in different formats. The various Þelds are shown in the Messages section below. Within a message, any Þelds 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 signiÞcant bits are right justiÞed in the Þeld. All bytes in a Þeld 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
decimal: 132 binary: 10000100 binary encoding for type(2) field: 0000001 0000100 decimal encoding for type(2) field: 1 4
Object name Þelds are sent as a string of ASCII values in a zero as a string terminator. For example, the name
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
type
Þeld as 01 04:
name
Þeld, with one MIDI byte of
Glass Kazoo would be sent as follows:
Data sizes and offsets are sent in the bytes in the K2600Õs memory, which is packed in the
Binary data in the Þeld. If the
form
MIDI byte. If the
data
Þeld are sent in one of two formats, according to the value of the
Þeld equals zero, the data are transmitted as 4 bits or one ÒnibbleÓ in every
form
Þeld equals one, then the data are sent as a compressed bit-stream, with 7
size
and
offs
Þelds.These values refer to quantities of 8-bit
data
Þeld.
form
bits per MIDI byte. The bit-stream format is more efÞcient for data transmission, while the nibble format is easier to read (and write software for).
For example, to send the following four K2600 data bytes,
hex: 4F D8 01 29 decimal: 79 216 1 41 binary: 01001111 11011000 00000001 00101001
eight MIDI bytes are sent in ÒnibbleÓ format:
hex040F0D0800010209 decimal 4 15 13 80129 binary 0000100 0001111 0001101 0001000 0000000 0000001 0000010 0001001
Þve MIDI bytes are sent in bit-stream format:
7-2
hex: 27 76 0 12 48 decimal: 39 118 0 18 72 binary: 0100111 1110110 0000000 0010010 1001000
The bit-stream format can be thought of as taking the binary bits of the K2600 data and, starting from the left, slicing off groups of 7 bits. Note that the trailing bits are set to zero.
After the least signiÞcant 7-bits of the sum of all of the MIDI bytes that make up the

Messages

This section deÞnes the K2600 System Exclusive message formats. Each message has a message type, which goes in the deÞnitions of the message.
DUMP = 00h type(2) idno(2) offs(3) size(3) form(1)
Requests the K2600 to send a data dump of an object or portion thereof. the object. bytes should be dumped starting from the offset. transmitted (0=nibblized, 1=bit stream). The response is a LOAD message:
LOAD = 01h type(2) idno(2) offs(3) size(3) form(1) data(n) xsum(1)
This writes data into the speciÞed object, which must exist. Both load and dump operate on the object data only. The response to a load message will be the following:
data
Þeld, there is another Þeld,
msg-type
is the offset from the beginning of the objectÕs data;
offs
Þeld (see Common Format on page 7-1), followed by the Þeld
xsum
. This is a checksum Þeld that is calculated as the
form
indicates how the binary data are to
System Exclusive Protocol
K2600 System Exclusive Implementation
data
Þeld.
type
and
idno
identify
size
describes how many
DACK = 02h type(2) idno(2) offs(3) size(3)
Load accepted, or
DNAK = 03h type(2) idno(2) offs(3) size(3) code(1)
Load not accepted. The
code
Þeld indicates the cause of the failure, as follows:
Code Meaning
1
Object is currently being edited
2
Incorrect checksum
3
ID out of range (invalid)
4
Object not found (no object with that ID exists)
5
RAM is full
To request information about an object, use:
DIR = 04h type(2) idno(2)
The
type
and
idno
identify the object. The response is an INFO message:
INFO = 05h type(2) idno(2) size(3) ramf(1) name(n)
This is the response to DIR, NEW, or DEL. If object is not found, be null.
ramf
is 1 if the object is in RAM.
size
will be zero and
name
will
7-3
Loading...
+ 7 hidden pages