Home -> Magazines -> Issues -> Articles in this issue -> View
Micro Music | |
ZX Spectrum Synth ControllerArticle from Electronics & Music Maker, November 1982 |
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.
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.
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.
![]() Software Support - Hints, Tips & News From The World Of Music Software |
Apple Notes |
Software Support - Hints, Tips & News From The World Of Music Software |
The Musical Micro - How To Save £54,800 |
The Musical Micro - Of Mice And Micros |
Protect & survive - Hard disk care |
Software Support - Hints, Tips & News From The World Of Music Software |
Amiga Notes |
Atari Notes |
Card Tricks - Music On The PC |
What The Computer Does... An Introduction |
Micromusic - Make music with the ZX81 (Part 1) |
Browse by Topic:
Micromusic - Analogue to Spectrum to Analogue
(EMM Jan 83)
Software Envelope Generator
(EMM Nov 83)
Spectrum MIDI
(EMM Jul 84)
Browse category: Computer > Sinclair
Feature by Kenneth McAlpine
Previous article in this issue:
Next article in this issue:
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!
New issues that have been donated or scanned for us this month.
All donations and support are gratefully appreciated - thank you.
Do you have any of these magazine issues?
If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!