The Complete MIDI 1.0 Detailed Specification (1)


  [2008-07-09]
The Complete MIDI 1.0 Detailed Specification is the definitive book on MIDI for developers, musicians, hobbyists, technicians, or just about anyone who wants to know about the inner workings of MIDI, and includes sections on the following topics:


MIDI 1.0

General MIDI 1 (including GM Developer Guidelines)

Standard MIDI Files

MIDI Show Control

MIDI Machine Control

MIDI Time Code

The document also includes a tutorial on music synthesis and MIDI for those who may be unfamiliar with musical instrument design.


Document Revision History

Though the MIDI Specification is still called "MIDI 1.0" there have been many enhancements and updates made by MMA since the original specification was written in 1982. Besides new MIDI messages for Machine Control and Show Control applications, there have also been improvements to the "basic" protocol for musical instruments, adding features such as Bank Select, All Sound Off, and other new controller commands.


Until 1995 there were five separate documents: the "Detailed MIDI" specification (including MIDI Time Code), MIDI Show Control, MIDI Machine Control, Standard MIDI Files, and General MIDI. The version of the Detailed MIDI specification prior to 1995 was version 4.2. Version 95.1 integrated these documents and fixed some minor errors in the various documents.


Version 95.2 - September 1995


Added text for redefinition of Device-ID proposal (MMA-0015)

Rewrote Universal SysEx ID description which was unclear

Moved EOF message (MMA-0011) from p44 into Sample Dump Standard Generic Handshaking Messages (P35-36)

Rewrote File Dump Handshaking Flags (p42-44) so as not to duplicate Sample Dump text on same message

Replaced all names referring to the Device ID message with the correct name ""

Moved MIDI Implementation Chart from back of section to before Tables

Rewrote the notes to Table 7 (SysEx Messages) to be more clear

Updated Table of Manufacturer ID's

Version 96.1 - March 1996:


Changed Table 7 (SysEx Messages) to include reference to Universal SysEx messages and correct ID assignments

Fixed omission on Page 35 re: number of Generic Handshaking Messages

Added clarifications to SMF text on MIDI timing

Updated MSC Specification to version 1.1

Version 96.1 Second Edition - November 2001:


Added GM1 Developer Guidelines (1996), previously available only as a free download



MIDI 1.0 Detailed Specification Addenda


The next edition (schedule TBD) will include all changes/additions approved by MMA/AMEI since the last publication, including


Recommended Practice (RP-015)

Response to Reset All Controllers


In MIDI 1.0 (Document Version 4.1.1, February 1990), the Reset All Controllers Channel Mode message (#121) is clearly defined. The value byte is always 0, although many implementations allow any value (don't care). The description from the specification (page 31) follows:


"When a device receives the Reset All Controllers message (121), it should reset the condition of all its controllers (continuous and switch controllers, pitch bend, and pressures) to what it considers an ideal initial state (Mod wheel to 0, Pitch Bend to center, etc.). Reception follows the same rules as All Notes Off -- Ignore if OMNI is On."


However, since the time when the Reset All Controllers message was adopted, new controllers have been assigned for various features, including Bank Select (which should be treated similarly to Program Change in terms of setting/resetting, not like other controllers). Also, General MIDI has been adopted since that time, and certainly General MIDI modules should all behave in a uniform fashion upon receipt of the Reset All Controllers message.


For a composer, it is important to know the effects of a Reset All Controllers message embedded in a sequence or otherwise sent to devices from different manufacturers. If a MIDI transmitter manufacturer includes the Reset All Controllers message in an implementation, such as with a front panel "Panic" button, the user will be assured of a known state in their devices, such as tone generators, effects devices, etc.


DETAILS:

Upon receipt of Reset All Controllers message (Controller #121) the following actions are taken for the specified MIDI channel:


Set Expression (#11) to 127

Set Modulation (#1) to 0

Set Pedals (#64, #65, #66, #67) to 0

Set Registered and Non-registered parameter number LSB and MSB (#98-#101) to null value (127)

Set pitch bender to center (64/0)

Reset channel pressure to 0

Reset polyphonic pressure for all notes to 0.

Do NOT reset Bank Select (#0/#32)

Do NOT reset Volume (#7)

Do NOT reset Pan (#10)

Do NOT reset Program Change

Do NOT reset Effect Controllers (#91-#95)

Do NOT reset Sound Controllers (#70-#79)

Do NOT reset other channel mode messages (#120-#127)

Do NOT reset registered or non-registered parameters.

Any other controllers that a device can respond to should be set to 0, or the behavior should be specified and/or documented. If the manufacturer does not want the Reset All Controllers message to affect a particular controller, that is also permissible, as long as the behavior is documented.


Documentation

Manufacturers should create a section in their documentation for response to the Reset All Controllers message. If a device will respond differently to the Reset All Controllers message in its native mode or an alternate mode, such as General MIDI 1, this behavior should also be documented.


Entering General MIDI (1) mode

If a device supports General MIDI 1, then the General MIDI 1 ON (reset) system exclusive message should perform the equivalent processing as though the device had received the Reset All Controllers message, in addition to any other processing required to place the device into General MIDI mode.


"Global" controllers

Some devices may respond globally to certain controllers. While this is unconventional behavior, it does occur. In many cases, it would not be appropriate to reset these controllers on receipt of the Reset All Controllers message. For controllers used by the device on a global basis, rather than a per-MIDI-channel basis, the unit's behavior when the Reset All Controllers message is received should be documented.


Recommended Practice (RP-018)

Response to Data Inc/Dec Controllers


This is a recommendation for expected response to Data Increment (MIDI controller #96) and Data Decrement (MIDI controller #97) MIDI messages.


Very little has been written about Data Increment (Controller #96) and Data Decrement (Controller #97). MIDI 1.0 (Document Version 4.1.1, February 1990) says the following, in the section on Registered and Non-Registered Parameter Numbers, page 23:


"The basic procedure for altering a parameter value is to first send the Registered or Non-Registered Parameter Number corresponding to the parameter to be modified, followed by the Data Entry, Data Increment, or Data Decrement value to be applied to the parameter."


This has created two problems:


1) The value used by the Data Increment or Data Decrement controller is not specified.


2) Does the increment/decrement affect the MSB, the LSB, or the full 14 bit data value of the parameter? It seems obvious for parameters that use the 14 bit data as a contiguous range, but what of Registered Parameter #0, Pitch Bend Sensitivity? This parameter uses MSB and LSB separately, with MSB adjusting sensitivity in semitones and LSB adjusting sensitivity in cents. Some manufacturers may even ignore adjustments to the LSB.


Under this recommendation, the value byte for both messages is ignored ("don't care"). When applied to Registered Parameter numbers 0, and 1, Data Increment and Data Decrement messages will increase or decrease the LSB by 1 (currently unspecified in MIDI 1.0). When applied to Registered Parameter numbers 2, 3, and 4, Data Increment and Data Decrement messages will increase or decrease the MSB by 1 (as specified in the 4.2 Addendum to MIDI 1.0, page 20).


For future Registered Parameters, behavior of Data Increment and Data Decrement must be specified; if it is not, reception of these messages will increase or decrease the LSB by 1. For Non-Registered Parameters, behavior of Data Increment and Data Decrement must be specified by the manufacturer for each parameter.


Receiving devices should keep track of the current value of a parameter and should increment the LSB by 1 when Data Increment is received, or decrement the LSB by 1 when Data Decrement is received. If the LSB is not supported by that device, then the parameter change should be made when the LSB wraps into the MSB, or as defined by the parameter. For example, a device that does not support the LSB (cents) value for Pitch Bend Sensitivity (RPN #0) should increment the MSB (semitones) value when the LSB is incremented to 100, at which time the LSB should be reset to 0.


For example, to increment pitch bend sensitivity on MIDI channel 1 by 2 cents (all numbers are in hexadecimal):


$B0 $65 $0 send Registered Parameter Number MSB

$B0 $64 $0 send Registered Parameter Number LSB

$B0 $60 $0 increment by 1

$B0 $60 $0 increment by 1

$B0 $65 $7F set Registered Parameter Number MSB to NULL

$B0 $64 $7F set Registered Parameter Number LSB to NULL



理论探讨 返回