Sie sind auf Seite 1von 5

by Thomas Henry

Build Your
Own MIDI-to-
Synthesizer
Interface
lip through any music

F
or recording magazine response with
short keyboards
and youll find constant Fits behind an industry standard 1U
reference to the fact rack panel (1-3/4 by 19)
that were in the midst
of an analog synthesiz- But if you really want to know directly to input port line PA7 of the in to the microprocessor one at a time
er revival. Indeed, more and what the MTS-100 can do, then check MC68705P3 microprocessor. (For and are properly reassembled into a
more musicians are dusting off out its Implementation Chart in Figure brevity, this chip will be referred to as complete byte under control of the
their favorite instruments of yes- 1. By custom, each piece of MIDI gear the 68705 from now on.) The bits roll firmware residing within the chip.
teryear and hauling them into is supposed to be provided with just
the studio or onto the stage such a chart. Its really nothing more Function Transmitted Recognized Remarks
again. than a standardized way to explain Basic Default *** 1
what MIDI features are available, Channel Channel *** 1-16 note 1
The claim is that these old analog what messages are recognized, etc. Default *** Mode 4
synthesizers have a richer and warmer Take a moment to review it. After you Mode Messages X Modes 2 or 4 note 2
sound than their modern digital coun- get a feel for what to expect, then Altered *** Modes 2 or 4 note 3
terparts. The only trouble, though, is read on to see how the MTS-100 Note X O
that analog units are voltage-con- works. Number True Voice *** 0-127 note 4
trolled, whereas virtually all modern Velocity Note ON X X
recording and performing equipment CIRCUIT DESCRIPTION Note OFF X X
is MIDI based. Aftertouch Key X X
MIDI is a standard protocol that Since the MTS-100 is really little Channel X X
permits the interconnection of a broad else than a glorified digital-to-analog Pitch Bend X O
range of musical devices, and then converter (DAC), its convenient to Controllers X O note 5
lets them communicate with each split the schematic into two main Program X X
other via a digital bit stream. parts. In broad terms, Figure 2 depicts Change True # *** ***
Well, dont give up on your ana- the digital side of things, while Figure System Exclusive X X
log synthesizer just yet, for heres the 3 shows the analog portion. System SPP X X
MTS-100! The MTS-100 is an inexpen- Refer to Figure 2 now. If youre Common Song Select X X
sive monophonic MIDI-to-Synthesizer getting a sense of deja vu, theres a Tune Request X X
interface which lets you add digital reason! You might recall my ADV-MIDI System Clock X X
control. With it, its a snap to connect project which appeared in the Oct. Realtime Commands X X
a modern music keyboard or a person- 97 issue of Nuts & Volts Magazine. Aux Local ON/OFF X ***
al computer running sequencer soft- The purpose of that circuit was to All Notes Off X O note 6
ware to your dinosaur. convert incoming MIDI messages to Active Sensing X X
The MIDI messages coming down triggers suitable for firing analog drum Reset X O note 7
the pike are converted to standard sets. As it turns out, quite a bit of the
control voltage, gate and trigger for- input circuitry can be copied over Notes:
1. At power-up or during reset, switch S2 can set the MTS-100 to receive on any channel
mats, perfect for taming most older directly. So, we can really buzz (1-16).
equipment. And just check out these through the explanation now. The 2.The MTS-100 can be set to Omni Off or Omni On either by front panel switch S1, or by
features: basics will be described here, but if an appropriate Channel Mode Message.
you need more details or want to 3.The MTS-100 is a monophonic device, but is compatible with any MIDI keyboard even if
MIDI IN and THRU jacks refresh your knowledge of MIDI, refer polyphonic. In this case, it simply responds to the most recent Note On message.
4.The MTS-100 can convert all 128 MIDI notes. If using a short keyboard, switch S3 can
1V/octave control voltage output back to the article just mentioned. transpose notes up or down by one octave to extend the output range.
Pitch bend (pitch wheel) control A source of MIDI messages (com- 5.The following Channel Mode messages are recognized: Reset All Controllers, All Notes
voltage output ing from a music keyboard, sequencer, Off, Omni Off, and Omni On. Reset All Controllers sets the pitch bend output to its
Independent gate and trigger out- personal computer, etc.) is applied to midposition value.
6.Sending the Omni Off or Omni On commands also turns all notes off, as required by
puts for full retriggerability jack J5. Optocoupler IC1 isolates and the MIDI 1.0 spec.
Omni on or off switch and indicator translates the electrical signal as 7.The current channel can be changed during the Reset sequence, if desired.
Channel switch and indicator required by the MIDI specification. A Mode 1: Omni On, Poly Mode 2: Omni On, Mono O: Yes
Recognizes a variety of MIDI suitable replica of the bit stream is Mode 3: Omni Off, Poly Mode 4: Omni Off, Mono X: No
Channel Mode messages generated at output pin 6 of IC1. Figure 1 The MTS-100 Implementation Chart
Octave transpose switch extends One path conducts this bit stream

52 December 1997/Nuts & Volts Magazine


the following way.
First, with power to the MTS-100
off, press and hold pushbutton S2.
Now turn the power on. LED D4 will
begin flashing, about once per sec-
ond. Simply release the pushbutton
after witnessing the desired number
of blinks, representing the channel.
For example, to set the MTS-100 to
channel 5, hold S2 closed then turn
the power on. After five blinks,
release S2.
Once youre up and running, you
can also use pushbutton S2 to check
what the current channel is, in case
youve forgotten it in the meanwhile.
Simply tap the switch once. The LED
will flash the number of times repre-
senting the current channel number.
This is a very simple, yet effective
method to set or test the channel.
And best of all, it uses very little front
panel real estate!
Switch S3, which connects to the
68705 port lines PC0 and PC1, can be
used to transpose the currently played
note up or down by one octave. This
is handy if you are driving the MTS-
100 with a smaller keyboard which
spans less than the 128 notes of the
standard MIDI scheme.
If the lowest note on your key-
Figure 2 MTS-100 Schematic 1 of 2 board is number 36, for instance, then
by flipping S3 to the minus position,
the internal firmware automatically
subtracts 12 (a one octave difference)
and spits out the number 24 to the
Pin 6 of IC1 also feeds MIDI THRU
jacks J6 and J7 by means of the
buffers configured around IC2c and
IC2d. Again, this is a standard
arrangement described in the MIDI
specification. The MIDI THRU jacks
can be used to daisy chain other
equipment to the MTS-100.
Since the MIDI messages are
asynchronous in nature (i.e., can
occur at any time), microprocessor
interrupts are used to dictate when
data is to be read in. Once a message
is rolling in, it is important that the
68705 not be further interrupted.
Thus, IC2b is used to pass or block
external interrupts to pin 2 of the
68705, as required.
Switch S1 and LED D5 work in
tandem to let the user turn Omni
mode on or off from the front panel.
Port line PC2 of the 68705 is normally
high. Tapping pushbutton S1 once
causes this line to momentarily drop
low. The microprocessor senses the
change and toggles the condition of
the Omni status, as well as LED D5.
Obviously when the LED is shin-
ing, Omni mode is on, and when it is
dark Omni mode is off. By the way,
you can also turn Omni on or off by
sending the standard MIDI Channel
Mode message. The LED will still
respond as just described.
S2 and D4 also work as a team,
in this case to set or test the current Figure 3 MTS-100 Schematic 2 of 2
channel. At power-up or during reset,
the channel defaults to 1. But you can
change it to any legal value (1-16) in

Nuts & Volts Magazine/December 1997 53


DAC. is converted to a current by
In a similar way, putting R14, which then feeds the
S3 to the plus position will positive reference input of the
add 12. In effect, your short DAC at pin 14. Incidentally,
keyboard has now gained an R15 is of the same value and
octave on both the low and is used to balance the nega-
high ends. By the way, the tive reference input at pin 15
firmware takes care of any of IC4.
potential goofiness should The output of the DAC is
you attempt to transpose a a current; it flows from pin 4.
note out of range. In this This needs to be converted to
case, its simply left as is and a voltage before proceeding
passed on to the DAC and that is the purpose of R25
unchanged. and IC6a. As mentioned earli-
The envelope generators er, the voltage will follow a
in an analog synthesizer 1V/octave response.
require a source of keyboard Now comes the interest-
gate and trigger signals. A ing part. You will probably be
gate should normally be at interfacing a music keyboard
0V, but swing to +5V and to the MTS-100 for much of
stay there whenever a note is your work. Most modern key-
to be sounded. On the other boards have a pitch wheel on
hand, a trigger is a 0V to +5V them. By bobbling this wheel,
pulse, several milliseconds you can bend the pitch of the
wide. It is generated at the currently played note up or
outset of a note, and can Figure 4 Foil Side of the MTS-100 Printed Circuit Board down. We definitely want the
also be retriggered under MTS-100 to take advantage
certain other conditions. of this neat feature. But
For example, suppose wont that require an addi-
you have pressed a key on a tional DAC? Nope, not if we
music keyboard for the first use a multiplexing scheme!
time. A trigger is created. Heres the basic concept.
Now imagine that you keep The DAC will share its time
that key depressed and play between two separate sam-
another one in addition to it. ple-and-hold (S/H) circuits. At
The current note number is one instant, it stores the con-
updated to the new value of trol voltage in the first S/H,
course, but more important- and in the next instant it
ly, another trigger is fired off stores the pitch bend voltage
as well. in the second. Then the
What this means is that process starts over again.
the MTS-100, like all good Since the multiplexing is hap-
quality synths from the past, pening at such a rapid rate
lets you use the musical tech- (about 100 microseconds per
nique known as a trill. You cycle), the S/H capacitors
can twiddle an extra note in never have a chance to drop
addition to the currently held or lose their stored charges.
one and the envelope gener- The net effect? The DAC
ator in the synthesizer will be appears to have two separate
automatically retriggered. outputs. Lets look into the
By the way, the descrip- details.
tion just given implies that The output voltage of
the MTS-100 follows what is the DAC is found at pin 3 of
known in music circles as the IC6a, the op-amp follower.
last note rule. This means Figure 5 The MTS-100 Circuit Board Parts Placement Guide This signal splits in two now,
that if you press more than There are 15 jumpers. Each is represented as a solid line connecting two points. going to analog switches
one key, the unit will always IC5a and IC5b. When switch
respond to the most recent one. And Q1 squares it up nice and neat. What ground and not used. This is because IC5a is closed, the DAC voltage is
of course, theres no such thing as comes out of J1 is a good looking rec- the MIDI spec dictates that note num- applied to the S/H configured around
simultaneous in MIDI, so one of the tangular waveform, about five millisec- bers should run from 0 to 127, which C9 and IC6c. The buffered voltage is
notes will always be the most recent! onds wide. only requires seven bits to represent. then presented to jack J3, the control
The gate signal is created by port And that pretty much wraps up The DAC needs a stable current voltage output. On the other hand, if
line PB0 of the 68705. During quies- the digital side of things in the MTS- reference for operation. So, resistor IC5b is closed then the DACs output
cence, this line is high, which keeps 100. Before leaving Figure 2, however, string R6, R28, and R29 first create a is instead routed to C10 and IC6d.
transistor Q2 turned on. This implies notice that port lines PA0 through tapped voltage. R28 is actually a trim- The buffered pitch bend voltage is
that the tip of jack J2 is at 0V as PA6, and PB4 and PB5 havent been mer potentiometer. This will let you available at jack J4.
expected. (Also notice that LED D3 is accounted for yet. Theyll resurface as tweak the MTS-100 for a precise In case youre wondering, the
off). But when the line goes low in we investigate how the analog portion 1V/octave response. (Virtually all of firmware within the 68705 makes cer-
response to a note number coming in, of the MTS-100 works. So lets move the better analog synths follow this tain that only one of these analog
D3 shines and J2 goes to +5V. on. standard). Electrolytic capacitor C18 switches is closed at any given
The trigger signal is only slightly Turn your attention to Figure 3 stabilizes things a bit. But more impor- moment. Another thing to note is that
more complicated to create. When its now. When a note number is received tantly, the follower composed of op- the CMOS switches need to operate
time for a trigger, port line PB1 swings by the 68705 from the MIDI input, it amp IC6b buffers the tapped voltage off of a +15V power supply. This is
low long enough for LED D2 to be is transferred to IC4 via port lines PA0 and provides a good, low-impedance because the voltage from the DAC
plainly visible. At the same time, C8 through PA6. Notice that one of the output source. ranges on up to +10.58V (note num-
and R30 differentiate the pulse, and bit inputs of the DAC (pin 5) is tied to The voltage at the output of IC6b ber 127). So transistors Q3 and Q4,

54 December 1997/Nuts & Volts Magazine


Figure 6 Front Panel

Figure 7 Front Panel Drilling Guide

along with their associat- clad size.


ed resistors, translate the See Figure 5 for the
TTL control signals from parts placement guide.
the 68705 to a suitable Loading the board is pret-
+15V level. ty straightforward as long
To wrap things up, as you obey the usual
notice that there have rules. For example, be
been numerous capaci- sure to observe the orien-
tors not mentioned in tations of all of the polar-
the circuit description so ized components. Diode
far. Most of these are D1 is marked with a stan-
decoupling, bypass, or dard schematic symbol. A
compensation caps. In plus sign indicates the
general, these caps are positive lead of electrolytic
used to stabilize the capacitors C14-C18. The
operation of the various emitter, base, and collec-
chips. Even though they tor leads of Q1-Q4 are
dont seem to do any- called out with their initial
thing very glamorous, all letters.
of them are essential for Finally, dont forget to
proper performance. install the 15 jumpers.
Well, youre proba- Figure 8 These are indicated as
bly sick of circuit descrip- The MTS-100 can straight lines connecting
tions, so lets move on easily interface a pairs of points on the dia-
MIDI instrument
now and see how to such as a music key- gram.
actually construct the board or a computer After loading the
MTS-100! running sequencer printed circuit board, you
software with can then proceed to the
BUILD IT! most any analog final wiring of the front
synthesizer. panel. A rack-mounted
Besides the hard- unit is perhaps best, since
ware just described, it most pro equipment
also takes firmware to put the MTS- on the Internet; try your favorite er, ponder what method of construc- comes that way nowadays.
100 through its paces. If youd like to search engine and see! As for pro- tion you will employ. Most of the pro- The MTS-100 fits nicely behind a
try a complete homebrew approach, gramming the microprocessor, get ject is non-critical, but keep in mind standard 1U rack panel (1-3/4 by
then first obtain a blank 68705 chip. your hands on a 68705 Motorola that the S/H circuits, as well as the 19). Figure 6 shows a sample design,
Jameco Electronics (1355 Shoreway manual. Youll find complete direc- crystal oscillator, demand neatness. while Figure 7 gives the related drilling
Road, Belmont, CA 94002) is a good tions for programming the internal (Stray capacitance and the like can guide. The circuit board mounts
source for the part, and has them for EPROM. wreak havoc.) So, if you decide to behind the panel on standoffs or little
under $15.00. But if the thought of hassling handwire it, be sure you keep every- angles, using #4 hardware to secure
Next, youll need to get your around with software doesnt appeal thing nice and tidy. things.
hands on the program for the to you, then you might want to con- The best approach by far, howev- To connect the circuit board to
firmware. Even though the object sider purchasing the kit of parts which er, is to use a printed circuit board. the panel, notice that all of the rele-
code is quite short (about 700 bytes), includes a programmed 68705. Refer This is much more fun to put together, vant pads are labeled on the parts
its still too long to appear in this arti- to the Parts List for ordering informa- looks pretty, and will probably mini- placement guide in Figure 5. Even so,
cle. However, the complete annotated tion. mize any potential wiring errors. Many here are a few additional tips. For best
assembler source code is available free All of the other components in hobbyists are becoming old hands at results, twisted triples should be used
of charge for download on the World the MTS-100 are available from a vari- etching their own boards nowadays to connect up jacks J5-J7. The
Wide Web. See the Parts List for ety of sources. A quick check of the using a laser printer and iron-on trans- schematic in Figure 2 shows the pin
details. ads in this magazine or the catalogs fer material. If youd like to give it arrangement of these jacks, as seen
Next, youll need to assemble the of some of the better mail order hous- whirl, refer to Figure 4 which shows from the solder lug side. Notice that
code and burn it into your chip. There es will fill in the gaps almost immedi- the 1:1 positive artwork for the foil G, the ground wire of the triple going
are dozens of excellent freeware and ately. side. Conveniently, it all fits on a 4 by to the MIDI input, does not connect
shareware cross-assemblers available After gathering the parts togeth- 6 board, which is a standard copper to J5. Clip if off, and let it float.

Nuts & Volts Magazine/December 1997 55


The purpose of this wire is simply Now here is an easily overlooked, but you might want to tweak this up sev- er in the article. Follow this by press-
to provide a degree of shielding for vital point to remember. In any hybrid eral hours later after the parts have ing the Channel button one more time
the other two wires in the triple. It is analog/digital circuit, it is essential aged a little. to confirm that the LED properly indi-
left unconnected at the panel side to that digital ground and analog ground Thats it; youre all set to go! So, cates the number you just chose.
avoid ground loop problems. connect at one point only! This helps dig out your analog synthesizer and Lastly, hook up your personal com-
On the other hand, G does con- to minimize interference and other connect it up to an audio amplifier. puter to the MTS-100. Of course, youll
nect to MIDI THRU jacks J6 and J7. gremlins. So, complete the hook-up by Next, patch in the MTS-100 using need a MIDI port on the PC to do this.
Solder the respective ground wire of joining digital ground to analog 1/4 phone plug cables. Depending But remember that I described a do-it-
each triple directly to pin 2 of each of ground right at the output of the on the modules in your synthesizer, yourself Sound Blaster 16 to MIDI inter-
these. power supplies. there may be several ways to do this. face in the April 97 issue of Nuts &
Switches S1-S3 are daisy chained, For emphasis, this is the only Then decide how you will drive the Volts Magazine. This puts a MIDI port
with a final lead running back to one place where the two grounds connect MTS-100; a music keyboard is the easi- within reach of most everyone.
of the digital ground pads on the print- (not at the circuit board and not at est for your initial testing. Naturally, While running some sequencer
ed circuit board. The ground lugs of the front panel). If youve followed you will need to use some standard software, experiment by sending vari-
jacks J1-J4 are also daisy chained, with these directions carefully, then you MIDI cables for this. Figure 8 shows ous MIDI control messages. You should
their final run going to one of the ana- should be all set. Give your handiwork the details of a simple set-up, just to be able to turn Omni on and off, reset
log ground pads. (Youll see why there a once over and, if it looks good, then get you started. the pitch bend to its mid position value,
are separate digital and analog proceed! Commence your testing by press- turn off stuck notes, and do a com-
grounds in just a moment.) Finally, the ing the Omni button; confirm that the plete system reset. Refer to the
anodes of LEDs D2-D5 are daisy MAKING MUSIC WITH THE Omni LED lights up. Now start playing Implementation Chart in Figure 1 for
chained back to one of the +5V pads. MTS-100 some notes on your keyboard. The details. If youve passed these tests,
The remaining connections to the Gate and Trigger LEDs should flash, then youre all set to resuscitate that
switches, LEDs, and jacks are trivial, Before you can make music with letting you know that keys are being old dinosaur. You will now have the
and easily identified from the designa- your new system, you need to cali- detected. Next, turn up the amplifier best of two worlds: the fat sound of
tions on the parts placement guide. brate the voltage response of the and play a few scales. an analog synthesizer, all under MIDI
At this point, you should have MTS-100. Heres a quick way to do it. Now rotate the pitch wheel on control! NV
only five more pads to hook up: digi- The firmware has been programmed your keyboard. Confirm that the VCO
tal ground, +5V, -15V, analog ground, so that at power up, the current note sweeps up or down appropriately. Acknowledgments: I am extremely
and +15V. They connect to your defaults to number 60 (middle C). This Your VCO input should have a pot on grateful to John Simonton of PAiA
power supplies. Notice that these are corresponds to a control voltage of it, so dial in the amount sweeping Electronics, whose pioneering work in
standard synthesizer voltages, so you +5V. So simply turn on the power sup- action you like best. For example, you computers and synthesizers made this
design all that much easier to accom-
may be able to tap them from an ply, and monitor the CV output at jack might want to attenuate the pitch plish. I also wish to thank Bernie
existing supply. Plan on drawing about J3 with a digital voltmeter. Adjust trim- bend so that a complete rotation cov- Hutchins, publisher of the legendary
120mA from the +5V supply, 10mA mer potentiometer R28 until you ers only an octave. ELECTRONOTES newsletter, for putting
from the -15V side, and 15mA from obtain a reading of +5V. Now shut off the MTS-100 and up with way too many questions, and
the +15V side. By the way, most electronic com- turn it on again, as you set it for a patiently helping me track down circuit
Connect up these last five lines. ponents need a break in period, so new channel. This was described earli- goblins.

Other components
PARTS LIST X1
S1, S2
4 MHz crystal
SPST pushbutton switch
S3 SPDT (on-off-on) toggle switch
All resistors are 1/4-watt, 5% values. J1 - J4 1/4 phone jack
R1 - R6 220 ohms J5 - J7 Five-pin DIN jack (180 degrees)
R7 - R10 470 ohms
R11, R12 1K Miscellaneous: printed circuit board, LED holders, IC sockets,
R13 1.2K front panel, wire, solder, etc.
R14, R15 1.8K
R16 - R22 4.7K ORDERING INFORMATION
R23 - R27 10K
R28 10K trimmer potentiometer A kit of parts for the MTS-100 is available from the source
R29 22K below. Included with the kit is an etched, drilled, and tinned
R30 100K printed circuit board, programmed microprocessor, all resistors,
R31 220K capacitors, semiconductors, crystal, switches, jacks, LED
holders, sockets, and Assembly Guide. Does not include front
All capacitors are 16V. panel, wire, or solder.
C1 22 pF dipped silver mica
C2 - C7 0.01 mfd disc MTS-100 Kit (#K210)-$69.95
C8 - C10 0.047 mfd mylar
C11 - C13 0.1 mfd disc US and Canadian orders add $5.00 shipping and handling. E-Mail or write
C14 1 mfd electrolytic for shipping information to other countries.
C15 - C17 10 mfd electrolytic
C18 100 mfd electrolytic Prices shown in USA dollars. Remit US funds only. Money orders and
checks only. MN residents add 6.5% sales tax. Prices and terms subject to
Semiconductors change without notice.
D1 1N914 or 1N4148 diode
D2 - D5 Red LED Order from: Midwest Analog Products
Q1 - Q4 2N3904 NPN transistor P.O. Box 2101
IC1 6N138 optocoupler N. Mankato, MN 56003
IC2 74LS00 quad NAND gate The complete source code for the MTS-100 firmware may be downloaded
IC3 MC68705P3 MPU (programmed) free of charge from the WWW homepage of Midwest Analog Products.
IC4 DAC0800 D-to-A converter
IC5 4016 quad SPST switch WWW:http://prairie.lakes.com/~map
IC6 4136 quad op-amp E-Mail: map@prairie.lakes.com

56 December 1997/Nuts & Volts Magazine

Das könnte Ihnen auch gefallen