beautypg.com

Mz-2000 midi implementation – Casio MZ-2000 User Manual

Page 16

background image

15

MZ-2000 MIDI Implementation

4.1.5 Parameter Set Bulk Dump

This section describes the bulk format for parameter set transfers.

How parameter sets are actually allocated depends on the MZ-2000 sound source specifications.

See sections 4.2 thorugh 4.11 for more information.

Unlike the data format for individual parameter changes, a memory image is sent in order to

increase the speed of the parameter set bulk dump. Pre- and post-processing required for each

parameter is performed after bulk dump of all the data is complete.

You can transfer multiple parameter sets during a session. When a single parameter set is very

large, it can be divided and transferred as multiple packets. In such a case, and address offset is

included as part of the data.

Transferring multiple small-size parameter sets using a single packet is not allowed. Each param-

eter set must always be transferred as a separate packet.

One-Way Communication Flow

A session starts with a BDR request by the data receiver or a BDS data send by the data sender.

The session ends after the data sender transfers the required amount of data for the number of

parameter sets.

When the MZ-2000 receives a BDR, it uses a BDS to return the corresponding parameter set.

When the MZ-2000 receives a BDS, it modifies the setting of the applicable parameter set.

Data is divided into packets of 256 bytes or less and transferred at fixed intervals (20 msec).

Data Receiver

Data Sender

BDR ->

Send Request (Optional)

<- BDS

Data Transfer

Interval: 20 msec minimum

<- BDS

Data Transfer

Interval: 20 msec minimum

<- BDS

Data Transfer

Interval: 20 msec minimum

:

:

Hand Shake Protocol

A session starts with the data receiving sending an HDR request or an HDS data send from the

data sender.

The data sender does not send the next packet until it receives an acknowledgement (ACK) from

the data receiver. Be sure to reserve at least 100msec as the maximum wait time. If no response is

received within the prescribed time, a time out error occurs and communication is terminated.

If the data receiver returns an HDE (error) due to a checksum error, illegal data format, or any

other reason, the data sender resends the data. Resend the data at least one time.

The session ends after the data sender transfers the correct amount of data for the number of

parameter sets, and is terminated when an ACK is returned.

Data Receiver

Data Sender

HDR ->

Send Request(Optional)

<- HDS

Data Send

HDA ->

Acknowledge

<- HDS

Data Send

HDA ->

Acknowledge

:

:

Resend is performed after an error due to checksum error or data format error.

Data Receiver

Data Sender

HDR ->

Send Request (Optional)

<- HDS

Data Send

HDA ->

Acknowledge

<- HDS

Data Send

HDE ->

Acknowledge

<- HDS

Data Resend

:

:

Send is terminated if there is no acknowledgement (ACK).

Data Receiver

Data Sender

HDR ->

Send Request (Optional)

<- HDS

Data Send

HDA ->

Acknowledge

<- HDS

Data Send

(Send Terminated)

HDJ is sent whenever the session is terminated for any reason. HDJ can be sent from either the

sender or receiver. Receipt of HDJ immediately terminates a bulk dump.

Data Receiver

Data Sender

HDR ->

Send Request (Optional)

<- HDS

Data Send

HDA ->

Acknowledge

<- HDS

Data Send

:

HDJ ->

Data Receive Rejection

(Send Terminated)

Data Receiver

Data Sender

HDR ->

Send Request (Optional)

HDA ->

Acknowledge

<- HDS

Data Send

HDA ->

Acknowledge

<- HDS

Data Send

:

<- HDJ

Data Send Rejection

Parameter Set HDJ/HDA/HDE

tt

0100aaaa

aaaa = HDJ/HDA/HDE

No data in the case of Rejection, Acknowledge, or Error

Parameter Set BDS/HDS

tt

0100aaaa

aaaa = BDS/HDS

d0[0]

0ooocccc

cccc = Parameter Set Category

ooo = option (Definition for each category)

d0[1]

0ttttttt

0TTTTTTT0ttttttt = Type ID

d0[2]

0TTTTTTT

d0[3]

0mmmmmmm

0MMMMMMM0mmmmmmm = Mdev ID

d0[4]

0MMMMMMM

d0[5]

0sssssss

00SSSSSSSsssssss = Section Number

d0[6]

0SSSSSSS

d0[7]

0nnnnnnn

00NNNNNNNnnnnnnn = PS Number

d0[8]

0NNNNNNN