22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

314 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

is usually sent over a shielded twisted-pair <strong>of</strong> wires as a switched current with<br />

a one represented by no current and a zero represented by 5 mAo An<br />

optoisolator (a light-emitting diode close-coupled to a photocell in the same<br />

case for electrical noise isolation) is normally used for detecting the current at<br />

the receiver.<br />

Figure 9-lOA shows a typical MIDI transmitter and receiver circuit.<br />

Any serial interface IC can encode/decode the serial bit stream, although a<br />

6850 is typically used with 6502 and 68000 microprocessors. Note that the<br />

31.25 K bits/sec. data rate, which is not a standard serial communication bit<br />

rate, was selected to be 500 KHz divided by 16, which can be accomplished<br />

internally by the 6850. This eliminates the need for a costly "baud rate<br />

generator" IC, since it can usually be generated by dividing the microprocessor<br />

clock by a small integer (2 for the 6502 or 16 fot the 68000).<br />

Figure 9-lOB shows a typical connection pattern between a MIDI<br />

controller, such as a keyboard, and several MIDI-equipped synthesizers. The<br />

controller, which may have other panel controls as well, has two-way<br />

communication with the primary synthesizer. Thus, if necessary, the<br />

controller can interrogate the status <strong>of</strong> the ptimary synthesizer. The "MIDIthru"<br />

connection on each synthesizer simply provides a buffered copy <strong>of</strong> the<br />

signal received by the "MIDI-in" connector. Thus, data sent from the<br />

controller to the primary synthesizer can also be "heard" by the other<br />

synthesizers. Addressing information in the data bytes (called "channels" in<br />

MIDI terminology) determines which synthesizer acts on the data to produce<br />

sound.<br />

The complete MIDI communication protocol is rather complex and<br />

subject to revision, so only its most basic provisions will be covered here.<br />

Readers desiring the full, current specification should check the Bibliography<br />

at the back <strong>of</strong> the book.<br />

MIDI-equipped synthesizers operate in one <strong>of</strong> three communication<br />

modes. In "mono" mode, the 4 address bits associated with commands address<br />

actual oscillators or voices in the synthesizer. If one synthesizer has fewer than<br />

16 voices, then two or more can be used up to a total <strong>of</strong> 16 voices. This mode<br />

<strong>of</strong>fers the most flexibility because the MIDI controller can refer directly to<br />

voices, which may be patched quite differently, by number. "Poly" mode,<br />

which is most useful for live performance keyboard playing, generally assigns<br />

each synthesizer in the chain to one channel addresses. Each synthesizer will<br />

then only respond to MIDI commands addressed to its channel. If the<br />

synthesizer is indeed polyphonic (has several voices), then it is capable <strong>of</strong><br />

receiving several keystrokes at once, which it assigns to internal voices<br />

according to whatever its key assignment algorithm would be if a keyboard<br />

was connected directly. A synthesizer in "omni" mode in effect ignores the<br />

channel address and responds to everything in the MIDI command stream.<br />

The MIDI data format itself is much like an 8-bit microprocessor<br />

instruction; there is an operation or command byte (inexplicably called a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!