Computer voltage control for up to eight synths, and much more!
The use of computers in electronic music production can be divided into roughly three categories.
1) Digital recording: where the music is digitised, stored, perhaps edited and converted back to an audio signal using a DAC. This requires fast audio convertors and lots of storage (about 540 bits/sec of music).
2) Direct digital synthesis: where the sound is calculated from various formulae, perhaps Fourier components or Walsh functions. In this case the speed of the computer is paramount since we require about 40K sample/per sec for a 15kHz bandwidth.
3) Control: here the computer supplies sound generating equipment e.g. synthesisers or sound chips with parameters to alter the sound. The common denominator of most synthesisers is that they are voltage controlled and that the voltages vary fairly slowly in computer terms.
Since the average personal computer is either not fast enough or has insufficient storage, method (3) at the moment has the most to offer the home musician. Certainly using a computer as the controller/supervisor element in an electronic music system can be very rewarding since the computer can be regarded as a logic board whose wires are the program.
There exists a definite relationship between logic hardware and computer software to the point that they are almost functionally indistinguishable. This being the case all we require is a general hardware system upon which we superimpose the 'personalities' of different programs to perform different tasks.
The OMDAC (Octal Music Digital to Analogue Convertor) is a step in this direction, it offers a very general layout of digital to analogue conversion, sample and holds, a multiplexer and digital in/out channels. The function of the system is under software control and be configured to suit specific requirements. For example OMDAC could be used to provide an eight channel polyphonic sequencer, a drum machine controller with programmable dynamics or memory storage for 1,000's of voltage controlled parameters in banks of eight. Four external clocks or switches can be connected to synchronise software processes. The ADC provides a means to input quantised control voltages for storage or modification.
The original test circuit was implemented on a 6502 based system, the ACORN ATOM, but provision has been made for SPECTRUM compatibility simply by changing three PCB links. Several ATOM programs have been included to demonstrate the capabilities of the OMDAC and the equivalent SPECTRUM programs are currently under development and will be published soon. In addition the OMDAC is expected to form the basis for several SOFTMUSIC features and new software such as a polysequencer will appear in forthcoming issues.
Layout of the OMDAC can be seen in Figure 1, the block diagram. In order to make full use of the OMDAC it is necessary to understand the relationship between various functional blocks.
The ADC and PIA (Parallel Interface Adaptor) are connected directly to the computer's data buss and selected by decoding its address lines. The PIA has 3 ports which are configured as shown. Port A sends data to the DAC, Port B provides trigger outputs while Port C is split to control the multiplexer and allow user connections into the system.
Eight sample and holds are used to store the multiplexed voltages and provide 8 control voltages. LEDs give a visual indication of the trigger status or can be configured to display program information.
A temperature compensated reference voltage is provided which has presets allowing the ADC and DAC to be 'musically scaled' to 1V/Octave.
A complete circuit diagram showing the system in more detail is given in Figure 2. The ATOM and the SPECTRUM differ radically in the sense that the ATOM has memory mapped I/O whereas the SPECTRUM uses special I/O commands. Table 1 gives the relevant addresses at which the ADC and PIA appear relative to both machines. Although the address decoding is tailored for the ATOM and SPECTRUM it would be a simple matter to wire the inputs of IC's 15, 16 and 17 differently to the address lines of other machines to decode their address spaces.
The ADC is really separate from the rest of the circuit since it only shares the data bus and the RD signal. When the circuit is powered up TR1 delivers an initial 'Start Conversion' pulse to the ADC and thereafter the ADC continually quantises the voltage appearing at the 'Analogue In' pin. Conversion data can be read by the computer by executing a PEEK (ATOM) or an IN (SPECTRUM) statement at the address decoded for the ADC.
Op Amp, IC2, buffers and limits the external input voltage to a safe range of (0-5.6)v which gives just over 5 octaves. Inserting a jack plug into the 'Analogue Input' disconnects the internally wired parameter control from the ADC.
The rest of the circuit is controlled by the 8255 PIA. This has three I/O registers which are configured by a Control Word register.
Table 2 gives the value of the control register for various Port configurations. It is important that this register is set before any attempt is made to use the Ports.
Port A is used as an output since it supplies the DAC with digital data. The output from the DAC is buffered and scaled by Op Amp IC6 and fed to a multiplexer. The multiplexer is an electronic switch which connects it's input, in this case the DAC, to one of eight outputs selected by a three bit address (23=8). Port C is divided into two groups. Bits 0-2 control the address of the multiplexer and determine which sample and hold the DAC voltage is routed. To prevent glitches appearing on the output channels the multiplexer has an Inhibit control. When this is HI all channels are off and the DAC voltages are blocked from the sample and holds regardless of the address selected. Bit 3 of Port C controls the Inhibit and it's proper use is very important during rapid scanning of the sample and holds.
The rule is very simple: when changing the multiplexer address
a) bring the Inhibit HI, i.e. set bit 4 of PC.
b) change the address without changing bit 4 of PC.
c) bring the Inhibit LO i.e. reset bit 4 of PC.
This is shown in Figure 3 and is quite easily achieved by simple programming.
The remaining 4 bits of Port C PC4-PC7 can be used as general digital I/O channels. Port C is the only port that can be split with a dual I/O function by setting the appropriate control word. This means that we can use the lower four bits to control the multiplexer and still accept or output data with the remaining top bits.
Port B must be configured as an output and will usually be used to trigger analogue modules such as envelope shapers. It is connected to buffers with pull up resistors so that the outputs have a 12v ON state suitable for synthesiser triggers. Obviously this is no longer TTL compatible. The LED's mirror the output of this port and can be useful for displaying ADC data or trigger outputs.
Assembly should be fairly straight forward since all the parts, apart from the transformer, are mounted on a PCB. Using the component overlay shown in Figure 4, the links, IC sockets and the molex connectors should be soldered in first. Next mount the resistors, capacitors and the presets. The diodes, three regulators and TR1 can then be soldered in and the circuit powered up to check that the correct voltages are supplied to the IC sockets. If every thing is OK insert the IC's with the power off taking extra care with the 40 pin 8255 PIA. All that remains is to house the PCB in a suitable case and wire up the pot, sockets and LED's as shown in the photographs.
Before calibration first check that the OMDAC is working properly. The ADC can be tested by running a simple single-line program.
|ATOM||10 DO P.?5000;U.0|
|SPECTRUM||10 PRINT AT 0,0; IN 31; " ": GOTO 10|
|20 DO ?#7001=#5000;U.0|
|SPECTRUM||10 OUT 255,128|
|20 OUT 191, IN 31 : GOTO 20|
|30 DO ?#7000=?#5000;U.0|
|SPECTRUM||10 OUT 255, 128|
|20 OUT 223, 0|
|30 OUT 159, IN 31 : GOTO 20|
Three complete ATOM programs are given to illustrate channel scanning and to demonstrate the possibilities of the OMDAC. The 8 channel sawtooth program outputs the same low frequency 256 step sawtooth waveform via all the sample and holds. A much more useful program is the Interrupt Scan. The program assembles a short routine which is pointed to by the Interrupt request (IRQ) vector set by lines 70 and 80. Included in the program is an 8 entry table starting at location #3b40. When the routine is triggered by an IRQ the values stored in the table are multiplexed to their corresponding output channels, 1-1 2-2 etc. A suitable circuit for generating IRQ pulses was given in Softmuse article (Feb. '83). This should be connected to pin 28a of the ATOM connector.
The interrupt routine has many applications since we can develop programs to fill the table, perhaps from music keyboard data, and have the sample and holds continuously refreshed by an external and transparent interrupt.
The 'Front Panel' program is much more self contained. It presents the user with a digital readout showing the value being scanned on each of the sample and holds, see photo. By selecting a number (1-8) on the ATOM keyboard we can open a direct link between the ADC and any of the output channels. The current conversion value of the ADC is also mirrored on the LED's. A good use for this program is to connect each of the eight output channels to a different voltage controlled parameter on a synthesiser and set them up using the ADC parameter control. The 0-63 range should be used since this will result in the ADC control stepping in semitones (provided the system has been calibrated for 1V/Octave). Every twelve steps should give rise to an octave.
OMDAC offers endless possibilities and can form the basis of many computer controlled music systems for little expense and a little programming effort.