Live · --:--:-- UTC
← Back to us news feed
LATESTSource: bumbershootsoft.wordpress.com

ZX Spectrum: Experimenting with 1-Bit Sound

Published September 8, 2026 · US

ZX Spectrum: Experimenting with 1-Bit Sound

As part of the ZX Spectrum tour, I implemented some routines that would let you play simple tones out of the 1-bit beeper. These were in large part inspired by earlier work I did on the Apple II. W…

The ZX Spectrum, an iconic home computer from the 1980s, is well-known for its minimalist hardware, including a 1-bit beeper that produces basic sound. Recent experiments chronicled on bumbershootsoft.wordpress.com have pushed the boundaries of this simple audio output, revealing both the limitations and surprising capabilities of this classic device.

The project, inspired by earlier work on Apple II and IBM PC 1-bit audio systems, focuses on generating multichannel tones through the Spectrum’s single-bit speaker. Unlike devices with dedicated sound chips, the Spectrum’s speaker can only switch on or off, presenting a unique challenge for producing complex sounds or chords.

Initial attempts to replicate advanced PC speaker audio techniques on the Spectrum encountered obstacles, but the developer pivoted to successfully implementing routines capable of playing chords by rapidly toggling the speaker state to simulate multiple channels. This approach uses cycle-counted CPU control to maintain precise timing, an essential factor given the Spectrum’s 3.5 MHz Z80 processor clock.

The core of the experimentation involves pulse-code modulation (PCM) and pulse-width modulation (PWM) techniques adapted for a 1-bit output. PCM typically requires multiple bits per sample to accurately represent audio waveforms; however, on the Spectrum, only a single bit per sample is possible, leading to significant distortion. Despite this, the developer achieved a 16 kHz playback rate by carefully timing the CPU cycles, enabling the playback of simple recorded audio, albeit with noticeable quality compromises.

PWM, which controls the length of pulses to simulate varying signal strengths, theoretically offers higher audio fidelity. However, the Spectrum’s hardware lacks dedicated timers for PWM, necessitating complex cycle counting and precise delay routines. Efforts to implement PWM did not reach a satisfactory performance level, though the technique remains promising for future work.

To address the challenge of polyphony, the developer explored two main methods. The first involves rapidly cycling through individual tones in an outer loop to create the perception of simultaneous notes, effectively arpeggiating chords. While this method produced audible chords, it sometimes resulted in tuning issues due to timing inconsistencies when switching notes.

Refinements included initializing parameters at a higher routine level and passing multiple frequencies in registers to optimize timing and synchronization. These adjustments improved the clarity of chords and reduced detuning, making the output more musically coherent.

A more sophisticated approach involved summing individual channels’ output values. With three concurrent voices, the system adds their contributions and determines the speaker output based on the combined value. This cycle-counted polyphonic synthesizer method yielded richer and more natural-sounding audio, surpassing the arpeggiated output and challenging assumptions about the limitations of 1-bit sound.

Further experiments tested alternative layering techniques, such as shuffling samples from different channels rather than interleaving pulses. This method, inspired by the Apple IIgs’s unique audio architecture, provided improvements over simple arpeggiation but introduced a slight increase in perceived audio roughness due to more frequent signal transitions.

Throughout the process, the developer documented both successes and setbacks, highlighting the complexity of precise timing on the Z80 processor and the intricate balance between code efficiency and sound quality. The routines developed are available on a public GitHub repository, allowing others to build upon the findings and hear examples of the various audio techniques in action.

While some advanced ideas, including refined PWM playback and certain arpeggiation variants, remain works in progress, the project demonstrates that even a rudimentary 1-bit speaker can produce surprisingly nuanced audio. This research not only enriches the legacy of the ZX Spectrum but also offers insights into low-level sound synthesis techniques applicable to constrained hardware platforms.

In sum, the exploration of 1-bit sound on the ZX Spectrum reveals a blend of technical challenges and creative solutions. By leveraging careful cycle counting, inventive coding strategies, and a willingness to iterate through trial and error, the developer has expanded our understanding of what can be achieved within the strict confines of vintage computing audio hardware.

Full story & global impact

This article was synthesized and rewritten by MusicTop Editorial from reporting published by bumbershootsoft.wordpress.com. Read the publisher's report for the complete source context.

Read original source: bumbershootsoft.wordpress.com