Magazine Archive

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

A.I. Sampler

Article from Electronic Soundmaker & Computer Music, May 1985

How to make your own Spectrum sampler for less than £20. The software comes on the tape.

Exclusive to ES&CM, Mike Shipway's hi-spec Spectrum sampler can be yours for ONLY £20. (Software on tape )

Steve Smith and Mike Shipway; Artificial Intelligence at work.

So there I was again, playing the latest ES&CM tape and drooling over the sampled sounds of the Fairlight, Emulator II etc. Being one half of Artificial Intelligence (in company with Steve Smith), I was convinced that we needed some form of sound sampling to get all our ideas onto tape. After investigating the costs of commercially available sampling systems, I found that I could not really afford any of them. It was while I was in the depths of despair caused by this that I remembered an article in an earlier issue of ES&CM that explained the technology behind sound sampling. Frantically searching the back issues I eventually found it - June 84 - Chip Parade by Robert Penfold.

Spectrum and the A.I. interface.

Reading through the article, it appeared that sound sampling consisted of analogue to digital and digital to analogue conversions, the functions of which could be performed by just a few components, with a total cost of around £20. The only additions to this that are required are a computer and some software, which with me being the proud owner of a ZX Spectrum, and a computer programmer during the day, did not present a problem. The only problem that existed was that I had never before built an electronic project. However - gritting teeth and grasping soldering iron tightly (which had previously only seen service mending trampled jack plugs), I decided to dive in at the deep end.


The basic circuit for the sampler was made by combining the ADC and DAC circuits provided by Robert Penfold (see June 84 Issue for a detailed description of operation), with the exception of two items. Firstly, on the DAC, the output amplifier was removed, as this was not required for an audio signal. Secondly, the circuit providing negative voltage for the ADC was removed, as this is available directly from the Spectrum.

The decoder chip was added to the basic circuit to provide the means of controlling the sampler from the Spectrum. The chip's low enable pins were connected to the Spectrum IORQ and A5 lines and its high enable pin was connected to +5V as it was not required. This gives the effect of enabling the decoder whenever the Spectrum does a Read or Write with the A5 line low. When the chip is enabled in this way, the binary value of its three address pins is calculated and the equipment output pin (0-7) is taken low. The decoder Input Address pins were connected to the Spectrum RD, WR and A6 pins and give the necessary 2 input and 2 output control signals for the sampler as in the decoder logic table.

The other addition to the basic circuit was to enable an interface with a voltage controlled synthesiser for the purpose of playing back samples. This consists of a resistor, to drop the control voltage to an acceptable level for the ADC, and a tri-state buffer chip, to allow the Spectrum to read the gate signal from the synthesiser.


The circuit was built using link wires between components with the physical layout of the circuit board being the same as the circuit diagram given. The edge connector can be glued to the board if a horizontal 'clip' type, or soldered to the board if the vertical 'pin' type, taking the pins through the board.

Having completed the construction it is essential to take a careful look at all connections to be sure that they are correct and well soldered. Then, with the power plug removed from the Spectrum, insert the sampler into the rear edge connector. Having done that, switch on the Spectrum, which should work in the normal way and display the Sinclair logo. If nothing happens, then switch off immediately and re-check the connections in the sampler. As with all peripherals, the sampler should never be plugged in or removed while the power is on to the Spectrum.

Two adjustments need to be made to set-up the sampler for use. Firstly, the resistor VR1 must be adjusted to give a reading from the ADC of 128 when there is nothing connected to the input. The following basic program will provide a display to enable this:

10 OUT 65503,0
20 PRINT AT 10,10; IN 65503
30 GOTO 10

The second adjustment is required to set-up the voltage controlled synthesiser interface. Connect the CV output and Gate to the sampler and run the program as above. When holding down the lowest note on the keyboard, the display should be 104. Adjust the resistor VR2 until this value is obtained. This part of the circuit and the software that reads it, was designed by using my Korg MS20, which has a 1V per octave CV over 3 octaves, giving a maximum of 8 volts, which should not be exceeded.


To keep the cost of a sampler at a minimum, no pre-amplifier has been included. Therefore, the input to the sampler must come from a source such as the line-out of a tape-deck, hi-fi amp, mixing desk etc. The output from the sampler is at a similar level. Much has been said by many about the problems of sampling - such as aliasing, quantisation noise etc. This is avoided, to a great extent, by using only one, very fast sample rate (30kHz), giving a total sample time of 1 second. However, the sample time can be extended on playback by the use of looping.

A.I.'s recording set up.

Steve's home studio was used to record Good God, set up as shown in the block diagram. The sampler was hooked into a Tascam M30 desk and the samples were looped and multi-tracked onto Tascam 8-Track. The only instrument used, except for echo effects, was the sampler described here, running with the software on the tape.


The software to control the sampler consists of a BASIC program for screen input and Menu displays, plus Machine Code routines for record, playback and amplitude/waveform displays. The sample itself consists of 30K of memory, which can be accessed as 240 segments of 128 bytes each.

Recording - A sample can be recorded from the Record Menu by using the start option. If the trigger is set to 'K' (for keyboard), then the sampler will start recording when the 'Cap-Shift' key is pressed. If the trigger is set to 'A' (for automatic), then the sampler will start recording when it receives a signal at least equal in strength to the trigger level. The value of the trigger level can be set between 0 and 127 from this menu. Exit back from the start option is either automatically after a sample has been recorded, or by using the 'Break-Space' key. When the sample has been recorded, a display of the amplitude is automatically given, which makes it easy to judge whether the recording level was acceptable.

Playback - A sample can be played from the Playback Menu by using the Start option. The Playback mode can be toggled from the Spectrum or external keyboard by using the 'K' key. When in 'Spectrum Keyboard' mode, the centre two rows of keys are laid out as a piano keyboard from notes A-C. When in 'External Keyboard' mode, a voltage controlled synthesiser (or just CV and Gate) can be used to control sample playback.

The start and end points of the sample can be changed from this Menu by specifying the required start and end segment numbers. This is useful for cutting out unwanted noises from the start or end of the sample. Looping points can be defined within the sample by specifying the required start and end segments of the loop.

There is also an option to either play the whole sample through to the end as soon as a key is pressed, or to only play the sample for as long as the key is held down. If the prior option is chosen, and a loop is in action, then a simple envelope is achieved, giving Attack/Sustain/Release.


IC1 2N428E Digital to Analogue Converter
IC2 ZN447E Analogue to Digital Converter
IC3 74LS138 Address Decoder
IC4 74LS125 Tri-State Buffer

R1 390R C1 1μ0
R2 390R C2 1μ0
R3 8k2 ¼ watt C3 2μ2
R4 10k C4 82pF
R5 68k C5 100nF
VR1 4k7 Preset C6 100nF
VR2 47k Preset

28 way Spectrum Edge Connector (56 connections) with key in Position 5.
Link Wire
Circuit Board
Switch (single pole, two way)

The 'Break-Space' key will exit from the start option, to the Playback Menu.

Display. The amplitude of the sample can be displayed, which shows a vertical bar for each segment in the sample, the height and depth of the bar being governed by the highest and lowest values held in that segment. The waveform of the sample can be displayed, showing a horizontal plot for each segment if the step option is set to 1. If the step option is set to 2, then only every second segment is plotted. The step option can also be set to 4 or 8.

Save/Load. Samples can be saved to or loaded from tape by using options from the main menu. If either of these options is chosen in error, then keying 'X' will exit to the main menu.


The cost of the components for the sampler total around £20. When this is added to the cost of a ZX Spectrum, at around £100, the total outlay must make sampling techniques available to just about anyone that is interested.

A.I. will supply the completed sampler for £60. Contact ES&CM for details.

Circuit diagram for the interface.
(Click image for higher resolution version)

More from these topics

Browse by Topic:


Electronics / Build

Previous Article in this issue

Floppy Futures

Next article in this issue

Diary Of A Madman

Publisher: Electronic Soundmaker & Computer Music - Cover Publications Ltd, Northern & Shell Ltd.

The current copyright owner/s of this content may differ from the originally published copyright notice.
More details on copyright ownership...


Electronic Soundmaker - May 1985

Donated by: Ian Sanderson


Previous article in this issue:

> Floppy Futures

Next article in this issue:

> Diary Of A Madman

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 June 2024
Issues donated this month: 0

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

Funds donated this month: £0.00

All donations and support are gratefully appreciated - thank you.

Magazines Needed - Can You Help?

Do you have any of these magazine issues?

> See all issues we need

If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!

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