e002028.pdf

(347 KB) Pobierz
138910742 UNPDF
GENERAL INTEREST
parameter box for
MIDI software
convenient software synthesizer operation
Using a key-
board and
mouse to
operate the
innumerable
knobs and slid-
ers of a PC mix-
ing board can turn
playing around with a
sound synthesizer
into an agonizing
experience. With the
MIDI parameter box
it’s a different story!
Almost every PC these days has a
sound card. However, most PC users
employ it only to reproduce operating
system sounds, music from audio CDs
and sound effects for games and pre-
sentations. They thus use only the
standard features of the software for
the sound card, even though there are
outstanding programs available that
allow even non-musicians to exploit
the manifold features of modern
sound cards. These are sound synthe-
sizer programs.
Such synthesizers are sometimes
even included in the software pack-
ages that come with the better quality
sound cards. However, there are also
separate programs, such as Generator
from Native Instrument s or Rebirth
from Propellerhead. These programs
simulate the functions and operations
of a real synthesizer using a screen full
of sliders and knobs that are controlled
by the mouse. They represent a sort of
Gordian knot for anyone who wants to
do more than adjust a single slider.
The circuit described in this article
makes working with a software syn-
thesizer considerably easier. It utilises
the ability of a software synthesizer to
receive MIDI codes and to use these
codes to drive certain controllers. The
hardware of the MIDI parameter box
can thus be kept very simple. A micro-
controller reads the positions of eight
standard potentiometers in turn, via an
8-channel A/D converter. If one or more
of the potentiometer positions is
changed, the microcontroller sends this
information in MIDI format to the
MIDI input of the sound card. The soft-
ware synthesizer translates the MIDI
codes into new settings for the con-
troller in question.
Design by T. Klose
L AYERS
AND SUPER - LAYERS
The somewhat nebulous term ‘layer ’
often crops up in connection with
MIDI. Layers are actually nothing more
than groups of eight synthesizer func-
tions, which correspond to the eight
potentiometers of the MIDI parameter
box using a sort of multiple allocation.
28
Elektor Electronics
2/2000
138910742.051.png 138910742.053.png
5V
1
K4
R3
R4
R1
CV
P9
470
C14
K9
C10
C9
D 1
R2
100n
100n
10µ
63V
14
K5
20
INIT
VALUE
4
MCLR
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
6
K3
10
SHDN
7
DOUT
15
17
18
RA0
RA1
RA2
RA3
IC2
8
1
2
3
4
5
6
7
8
IC1
16
9
CH0
CH1
CH2
CH3
CH4
CH5
CH6
CH7
SSTRB
17
1
10
DIN
18
2
PIC16F84
11
CS
SCLK
19
3
RA4
-10/P
12
13
MAX186
K10
OSC1
OSC2
11
12
VREF
16
15
5
X1
REFADJ
5V
AGND
VSS
DGND
5V
C8
C7 C6 C5 C4 C3 C2 C1
13
9
14
C11
C12
C13
C15
C16
R8
100n
100n
10µ
63V
33p
10MHz
33p
8x 100n
R7
R6
R5
IC3
K6
D3
1N4001
5V
D 2
T1
*
12V
7805
S9 ... S12
K7
K9
1
2
4
8
K4
8
MIDI
DATA
BC547B
15
C17
C18
C19
3
K1
7
1234
14
10µ
63V
100n
10µ
63V
6
K2
3
5
*
13
K5
MIDI CHANNEL
2
5
K10
4
12
K3
K6
1
4
11
3
P1...P8 = 8x 47k
10
2
+5V
9
1
P1
P2
P3
P4
P5
P6
P7
P8
see text
* zie tekst
* siehe Text
* voir texte
*
S1
S2
S3
S4
S5
S6
S7
S8
1
2
3
4
5
6
CV
CV
CV
CV
CV
CV
CV
CV
MEMORY RESET
1
2
3
4
5
6
7
8
LAYER
990087 - 11
Figure 1. The microcontroller reads the
status of the switches and of each of
the eight potentiometers in turn.
The parameter box has pushbutton
switches that can select one of six lay-
ers. The MIDI codes sent by each
potentiometer (or the controller) thus
vary according to the layer that is
selected.
The assignment of layers to specific
functions is not the same for all con-
trollers. Instead, controllers can be
divided into different groups. The var-
ious types of assignments are referred
to as super-layers. The MIDI parame-
ter box knows the three most com-
monly used groups and adapts the
MIDI codes to their specific needs.
Table 1 summarises the contents of the
six layers within the three super-layers.
number of Elektor projects, has an
interface to the microcontroller (IC2).
This interface carries the output data
from the D/A converter (DOUT) and
the clock (SCLK), as well as the settings
for the multiplexer (DIN). The con-
verter is controlled via the SSRB and
CS leads, synchronous to SCLK.
The microcontroller is a type
PIC16F84 IC that is clocked at 10 MHz.
In addition to the potentiometer posi-
tions, it also reads the layer selection
switches (S1–S6), the MIDI channel
switches ((S9–S12) and two other push-
button switches, MEMO and RESET.
Table 2 describes the meanings and
uses of all of the switches.
MIDI communication with the
sound card takes place via port lead
RB7. The MIDI signal can be visually
checked via the (blinking) LED D2.
There is a good reason why two con-
nection options are shown in the
drawing. Actually, the MIDI parameter
box should only be connected to the
sound card via a true, optically isolated
MIDI interface. Such an interface is
resistor in the data line pro-
tects against short circuits if this alter-
native is used. This type of connection
has one advantage, which is that the
operating power can be drawn from
the joystick port, so that D3, C17, C18
and IC3 are not needed.
This brings us to the power supply.
An external power supply is obligatory
with ‘real’ MIDI interfaces, in order to
ensure the electrical isolation of the PC
and the MIDI equipment. Only capac-
itors C17 through C19 and the voltage
regulator IC3 are needed to provide a
sufficiently stable +5 V. Power can be
H ARDWARE
The most important elements of the
hardware, which have already been
mentioned, can easily be recognised in
the schematic diagram shown in Fig-
ure 1 . The eight potentiometers are
connected to channels 0 through 7 of
the A/D converter IC1. The MAX186
IC, which has already been used in a
Elektor Electronics
2/2000
29
part of the AWE-64 package, for
instance, but it cannot be ordered sep-
arately. You can either buy one for
around £15 in a computer shop or copy
one of the numerous Elektor designs
(such as the MIDI interface in the 1995
Summer Circuits issue). A less elegant
option, but one that can conceivably be
used if no other MIDI devices are con-
nected, is to connect the MIDI para-
meter box directly to the 15-pin joystick
interface, which also has a MIDI input.
The 220
138910742.054.png 138910742.055.png 138910742.001.png 138910742.002.png 138910742.003.png 138910742.004.png 138910742.005.png 138910742.006.png 138910742.007.png 138910742.008.png 138910742.009.png 138910742.010.png 138910742.011.png 138910742.012.png 138910742.013.png 138910742.014.png 138910742.015.png
Table 1. Contents of the six layers within the three super-layers.
Layer
P1
P2
P3
P4
P5
P6
P7
P8
super-layer 1 (AWE, EMU8000 and EMU10k-1 synthesizers)
layer 1
Controller 10 – 17
layer 2
Controller 18 – 1F
layer 3
volume
pan
expression modulation
LP cutoff
LP reson.
chorus
reverb
layer 4 LFO1 delay LFO1 freq. LFO1 pitch LFO1 vol. LFO2 delay LFO2 freq. LFO2 pitch LFO2 vol.
layer 5 env1 delay env1 attack env1 hold env1 decay env1 sustain env1 release env1 pitch env1 cutoff
layer 6 env2 delay env2 attack env2 hold env2 decay env2 sustain env2 release
-, -
super-layer 2 (XG synthesizer)
layer 1
Controller 10 – 17
layer 2
Controller 18 – 1F
layer 3
volume
pan
expression modulation portamento
reverb
chorus
variation
layer 4
attack
decay
release
vib. delay
vib. rate
vib. depth
cutoff
resonance
layer 5
pitch init
pitch attack
pitch rel.
p.r. time
vel. lim. L
vel. lim. H
-, -
layer 6 pitch ben.
filter ben.
amplitude
ben.
LFO PMOD
ben.
FMOD D
ben.
AMOD
super-layer 3 (software synthesizer)
layer 1
Controller 00 – 07
layer 2
Controller 08 – 0F
layer 3
Controller 10 – 17
layer 4
Controller 18 – 1F
layer 5
Controller 20 – 27
layer 6
Controller 28 – 2F
provided by a simple 12 V mains
adapter. Diode D2 provides protection
against a reverse-polarity connection.
board that is the size of a pack of ciga-
rettes, as shown in Figure 2 . It is avail-
able from Readers Services (order
number 990087-1 ). You shouldn’t expe-
rience any problems mounting all the
components, which takes around half
an hour. Pay attention to the orienta-
tion of the electrolytic capacitors, the
LEDs and the ICs, and don’t forget the
wire bridge next to K5. After this you
can prepare the control panel. The
potentiometers and switches can be
glued to the front panel in a reasonable
arrangement, such as that shown in
Figure 3 , and wired using flatcable.
You can also mount these components
A S SMALL AS POSSIBLE
To make the construction of the MIDI
parameter box as convenient as possi-
ble, we have designed a printed circuit
Table 2. Meanings and uses of all switches.
Component
Designation
Meaning
LED D2
MIDI Message
Message Blinks when a MIDI message is sent via the MIDO OUT port.
Also blinks when a potentiometer is set exactly between two quantization levels.
LED D1
Init Value
Blinks after the power is switched on to indicate that one of the three
super-layers must be selected using switches S1 – S3.
Illuminated when the initial value is set for the potentiometer that was last rotated.
Switches S1 – S4
MIDI-Channel
These four binary-coded switches select the MIDI channel.
Potentiometers P1 – P8 Fader
These potentiometers are used to set the MIDI values.
Pushbuttons S1 – S6 Layer
These switches select layers 1 through 6.
Pushbutton S7
Memo
Save the last modified value in the current layer.
Pushbutton S8
Reset
Overwrite the current value with the predefined initialization value.
30
Elektor Electronics
2/2000
138910742.016.png
COMPONENTS LIST
P9
C15
C16
D1
D2
2
R2
R3
H2
Resistors:
R1,R8 = 1k 5
R2 = 1k
R3 = 10
R4,R7,R9-R16 = 10k
R5,R6 = 220
C1 0
X1
R1
K1
R8
4
C1
C2
C3
C4
C5
C6
C7
C8
C9
R5
3
R7
IC2
2
R6
1
C14
P1-P8 = 47k linear potentiometer
P9 = 470 preset Hi
K5
T1
D3
+
K2
Capacitors:
C1-C8,C10,C11,C12,C14,C18 =
100nF
C9,C13,C17,C19 = 10µF 63V radial
C15,C16 = 33pF
0
C17
H4
K3
990087-1
C13
K4
IC3
Semiconductors:
D1,D2 = LED, high efficiency
D3 = 1N4001
T1 = BC547B
IC1 = MAX186BEPP
IC2 = PIC16F84-10/P (programmed,
order code 996521-1 )
IC3 = 7805
Miscellaneous:
K1 = 4-way SIL connector
K2 = 2 PCB solder pins
K3,K6 = 10-way SIL connector
K4,K9 = 5-way SIL connector
K5,K10 = 6-way SIL connector
K7 = 15-way Sub-D plug, chassis
mount (see text)
K8 = 5-way DIN socket, chassis
mount, 180° (see text)
K11 = mains adaptor socket
S1-S8 = pushbutton, 1 make contact
S9-S12 = on/off switch
X1 = 10MHz quartz crystal
Enclosure, e.g. Teko 363
(216x130x77mm)
PCB, order code 990087-1
monitor should dis-
play control codes.
These will have values
ranging from 0 to 127.
If this does not hap-
pen, thoroughly check the circuit con-
struction, the cabling and the settings
of the MIDI monitor. If this doesn’t
help, you can curse Windows or the
sound card.
However, if the MIDI monitor dis-
plays the first MIDI events, then every-
thing is in order. Trimpot P9, by the
way, can also be used for calibration to
adjust actual range of the MIDI values
to 0 through 127.
Verify that the MIDI channel is
Figure 2. The MIDI para-
meter box can be build
using this small printed
circuit board.
changed by S9–S12
(binary), and that
changing the layer
works properly.
When the layer is
changed, the last stored values for the
potentiometers are always output via
the MIDI interface. The advantage of
this is that the parameters of the syn-
thesizer or the sound card are reset to
their last stored values. If for example
you change the volume in layer 3,
change to a different layer and some
time later return to layer 3, the volume
will be restored to its original level. If
you want to avoid this, all you have to
do is to press the Memo button before
on a piece of prototyping board and
wire them point-to-point. Of course,
you can also design a ‘real’ circuit
board. You should dress the flat cables
such that the unit can later be built into
an enclosure.
T ESTING
In order to thoroughly test the MIDI
parameter box, you absolutely need a
MIDI monitor with a MIDI-through
option for the PC, so that you can
observe the transmitted MIDI data on
the monitor and properly calibrate the
potentiometers. The text box contain
more information about suitable MIDI
monitors. After a visual inspection of
the soldering, connect the parts
together and cable the unit to the PC.
Then switch everything on and start
the MIDI monitor. All the stored values
in a virgin PIC are set to FFh, so they
must be set to valid MIDI protocol val-
ues by pressing the Reset button. Next
select super-layer 1 and layer 1 (the
default layer) by pressing S1 twice.
Now comes the moment of truth.
When the potentiometers are rotated,
LED D2 should flash and the MIDI
Elektor Electronics
2/2000
31
138910742.017.png 138910742.018.png 138910742.019.png 138910742.020.png 138910742.021.png 138910742.022.png 138910742.023.png 138910742.024.png 138910742.025.png 138910742.026.png 138910742.027.png 138910742.028.png 138910742.029.png 138910742.030.png 138910742.031.png 138910742.032.png 138910742.033.png 138910742.034.png 138910742.035.png 138910742.036.png 138910742.037.png 138910742.038.png 138910742.039.png 138910742.040.png 138910742.041.png 138910742.042.png 138910742.043.png 138910742.044.png 138910742.045.png 138910742.046.png 138910742.047.png
3
0
1
127
0
3
127
0
5
127
0
7
127
0
2
127
0
4
127
0
6
127
0
8
127
MRPC
MIDI REMOTE PARAMETER CONTROL
MIDI
DATA
INIT
VALUE
CHANNEL
LAYER
-
+
1
2
3
4
5
6
MEMORY
RESET
990087 - F
Figure 3. A reasonable
arrangement for the
control elements on
the front panel.
changing the layer. In this case only the
values that have changed since the last
layer change are stored.
Text editing
(German original): R. Gerstendorf
Design editing: K. Walraven
(990087-1)
MIDI monitors
There is a whole series of MIDI monitors that can be used with a
PC. An outstandingly suitable program is MIDI-OX, for which a beta
version is available for free on the Internet at
www.members.xoom.com/_XOOM/MIDIOX/moxbeta.htm. After
installing and starting the program, you must first select the MIDI
devices, either via the menu Options/MIDI Devices or by clicking
on the dark blue button with the five-pin DIN connector (see Figure
A ). On this PC, the MIDI input and output of the SoundBlaster SB16
are active.
The MIDI Port Activity window shown in Figure B appears if you
press the bright green DIN icon in the second group of buttons.
Each MIDI input and output gets its own row of ‘LEDs’, so that it is
clear which channel is active.
The content of the transmitted data appears in the Monitors Output
window. The first column shows the time when the MIDI message
occurred (as noted by MIDI-OX), and the second column indicates
the MIDI port via which the message arrived (in this case, Port 1 via
SB16 MIDI). The following byte, 0BFh, consists of two parts: a Con-
trol Change (indicated by the ‘B’) and the MIDI channel number
(indicated by the ‘F’, which corresponds to MIDI channel 16).
DATA1 shows the controller number (0 – 127 in this case) and
DATA2 shows the assigned value. Just as with DATA1, only the
lower seven bits are used, so that the values range from 0 to 127.
CHAN shows the MIDI channel once again. Note that MIDI officially
uses channel numbers 1 through 16, but many programs display 0
through 15. When a different super-layer is active or the layer is
changed, the messages displayed on the monitor also change.
If you want to learn more background information regarding MIDI,
you can find an adequate amount of literature on the Internet. One
example is Eddies Home – MIDI-RPN and NRPN
(http://members.delosnet.com.tlc/nrpn.htm).
MIDI-OX is especially well suited to checking equipment functions. If you want to go deeper into the matter, you can try easy-to-
use and powerful programs such as Generator from Native Instruments or Rebirth from Propellerhead. Free demo versions of both
programs are available. These can be used for only a very short time and have no save functions, but they are an outstanding
choice for just playing around with the MIDI parameter box.
32
Elektor Electronics
2/2000
138910742.048.png 138910742.049.png 138910742.050.png 138910742.052.png
Zgłoś jeśli naruszono regulamin