Magazine Archive

Home -> Magazines -> Issues -> Articles in this issue -> View

Micro Music

ZX Spectrum Synth Controller

In the last Micromusic article we were looking at a programme which arranged your Spectrum Beep's into some form of melodic order!

This month we will continue with the next logical step — using the Spectrum sequencer to control a synthesiser.


Two problems related to timing occurred during the development of the Beepquencer programme. Firstly, Basic is really too slow for musical applications, even a simple sequence can only be run at moderate speeds. Secondly, an interrupt is generated by the Spectrum several times a second to update the VDU status from memory holding up the task in hand until the interrupt routine is finished.

Critical timing loops (i.e playback) must therefore be assembled and run in machine code without interrupts.


The circuit diagram of the interface is shown in Figure 1. The INS8255 is an Input/Output device which has 3 ports. These can be configured as inputs, outputs or a combination of both. The chip is enabled, via the 74LS30 and half of the 4001, when A0-A4 and A7 are all high and IORQ (Input/Output request) is low. The two address lines A5 and A6 determine which port the data is to be sent to or received from, depending on WR (Write) or TO (Read) conditions.

The port addressing is as follows:

Port Hex Dec
A 9F 159
B BF 191
C DF 223
Control FF 255

In this application Port A is arranged as input, Port B as output, the lower half of Port C as input and upper half as output. The control word required to set this up is 91h or 145. Therefore to initialise the ports send the data to address 255 i.e. OUT 255, 145.

Obviously, we still have to convert any digital data coming through the port into analogue form before it can be used to drive a synthesiser.

The digital to analogue convertor, DAC0800, is buffered by op-amp 2 and then sent to the Portamento circuit of op-amp 1. This voltage is summed with a bias voltage, used for tuning the sequencer ±½ octave.

A gate signal, for triggering ADSR's is derived from the MSB of Port C. This positive-going edge is doubled in amplitude by op-amp 4 to provide a signal approx 10V in amplitude, as required by the author's synthesiser. This signal may be modified by re-configuring op-amp 4 as an inverting amplifier, for negative going gates.

The DAC reference voltage is adjustable to allow the 1 volt/octave law to be set.

The two NOR gates, 3 and 4, are wired to produce a variable speed clock which is used to drive the sequencer programme.

An external clock, other than the one shown could be used, providing it has an output 0-5V in amplitude, connected to pin 17 of the INS 8255.

Three switches are included; Start/Stop which gates the clock, Reset which as the name suggests, resets the sequence and Break which returns the programme to Basic control and the Menu.


The controller circuitry can be built on a piece of veroboard, connected to the Spectrum via 20 way ribbon cable and the appropriate edge connector. Take care when connecting the address and data lines to the I/O device - any wrong connections will disrupt the operation of the computer.

Figure 1. Synth Controller circuit diagram.

Sequencer Programme

The programme, shown in Figure 2, is basically the same as the Beepquencer published last month but with the machine code section added for the playback mode.

Line 22 loads the machine code data into memory locations 31501 to 31556. This data is contained in lines 24 and 26.

The start address of the sequence is split into two bytes and loaded into locations 32587 and 32588 (lines 2040-2060). These locations are read during the machine code routine to locate the Start address for the play mode.

To keep the programme simple the note length is not programmable but the 16 sequences can now hold up to 64 notes each.

Using the Sequencer

Operation is similar to that of the Beepquencer but for the Play section. When a melody is playing, the interrupt is disabled and therefore the display and keyboard. To exit from this state trigger the 'Break' switch. This returns control to the basic and displays the menu.

To set the DAC load a 2 note sequence an octave apart e.g. 1C, 2C. The output can be tuned by ear, when connected to a calibrated VCO, or by using a voltmeter to monitor the CV output.

Once the board has been calibrated you can start composing.

Figure 2. Synth Controller Sequencer programme.

More with this topic

Browse by Topic:


Also featuring gear in this article

Featuring related gear

Previous Article in this issue

Industry Profile

Next article in this issue

Yamaha Portasound PC-100

Electronics & Music Maker - Copyright: Music Maker Publications (UK), Future Publishing.


Electronics & Music Maker - Nov 1982



Gear in this article:

Computer > Sinclair > ZX Spectrum

Feature by Kenneth McAlpine

Previous article in this issue:

> Industry Profile

Next article in this issue:

> Yamaha Portasound PC-100

Help Support The Things You Love

mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.

If you value this resource, you can support this project - it really helps!

Donations for December 2021
Issues donated this month: 0

New issues that have been donated or scanned for us this month.

Funds donated this month: £4.00

All donations and support are gratefully appreciated - thank you.

Please Contribute to mu:zines by supplying magazines, scanning or donating funds. Thanks!

Monetary donations go towards site running costs, and the occasional coffee for me if there's anything left over!

Small Print

Terms of usePrivacy