Spectrum Sound Lab

48K128K13 November 2026

Six Voices: six channels on one bit

A minute of music on the 48K's beeper, six voices at once: a lead with its echo, an arpeggio or pad, a bass and its chorus, and drums. It has ADSR envelopes, slides and vibrato, all from one bit, and the border shows each voice's turn on the speaker. On a 128K the snare also plays on the AY.

The Spectrum's beeper is one bit: the speaker is either pushed out or not. Music on it means switching that bit fast enough, in the right pattern, that the ear hears notes. This engine gives six voices a turn each on the bit, eight thousand times a second.

On a 128K there is also a version for the AY chip.

a 48K, all six on the beeper, 63 s

a 128K, the snare on the AY too

Recorded in Retro Virtual Machine, as a 48K.

How it works

Six turns on one bit

Each voice is a 16-bit pitch counter, kept in a register: HL, DE, their twins in the second register set, IX and IY. On every trip round a 404 T loop each voice adds its step to its counter, compares the top byte with its pulse width, and puts the answer on the speaker. It holds it there until the next voice takes over. The lead has the longest turn, so it is the loudest.

A voice's pitch and width are numbers written inside the loop's own instructions, so the loop never reads memory. The border colour is set by the same OUT as the speaker, and that is what draws the coloured lines.

Envelopes from ramps

About fifty times a second the loop stops for a moment and moves each voice's pitch and width a step along a straight-line ramp, then reads the tune for anything new. Everything musical is made of those ramps, worked out when the tune is compiled. An ADSR envelope is a ramp up, down to the sustain, and down to silence. A slide is a pitch ramp. Vibrato is pitch ramps up and down. The echo is the lead's notes again a dotted eighth later on another voice. The chorused bass is a second bass 0.9% sharp.

Where it came from

In 1987 Your Sinclair printed Tim Follin's three-voice routine, Star Tip 2, and said he was working on a six-channel one "with chorus bass, 128K snare drum, echo, portamento, and full ADSR". As far as we can find it never appeared. This is our own engine for that list. Star Tip 2026 plays his tune on it.

How it was checked

Checked by the Sound Lab's build on both machines. After every one of the tune's 3,072 ticks, every voice's pitch and pulse width in the Z80 equal what a model of the engine in JavaScript says. Each voice was played alone and its pitch measured from the speaker's edges, while the border showed only its colour. The ULA delays every write to the speaker while it draws the screen, which made the first version 24 cents flat; the tuning now allows for it. That tick-by-tick check also caught a real bug before anyone heard it: a byte of the tune overwritten at $C000.

Screens

As our emulator draws it

Full frames, border and all. Click a picture to see it bigger.

Download

Load it yourself

For the 48K and the 128K. Each machine has its own tape; its .tzx and .tap hold the same blocks.

sixvoices.tap, 20 KB, built 19 November 2026

  1. In an emulator (ZX Spin, Retro Virtual Machine, Fuse and others): open the .tap on a 48K or a 128K. On a 128K, pick Tape Loader; on a 48K, type LOAD "". These are ordinary tapes, so fast loading is fine.
  2. Turn the sound up. On a 48K all six voices come from the beeper; on a 128K the snare also plays on the AY. The AY versions need a 128K or +2.
  3. Any key stops the tune; another plays it again from the top.
  4. On a real Spectrum: play the tape into the EAR socket from a tape player or a TZX player.