NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Digital Audio on the ZX Spectrum's 1-Bit Beeper (bumbershootsoft.wordpress.com)
retrac 7 minutes ago [-]
Got an op amp?

As a hobby I have been designing a retro-style digital telephone exchange because laying out PDIP chips is like Sudoku for me.

That led me down the rabbit hole of simple digital audio techniques. Which led me to continuous variable slope delta modulation. [0]

CVSD is much simpler than PCM. Every clock you give the decoder 1 bit. This bit determines whether a non-linear circuit ramps up or ramps down the voltage during that clock cycle.

And that's it. It's like a half-analog way to do digital. You can get fancier, by adding a small memory for the previous bit state, so it changes its slew rate, from step to step.

A couple flip-flops and a couple RC networks and an op-amp. [1]

CVSD has all sorts of fun properties. It's an effective speech compander and is understandable even at like 12 kHz (which is 12 kbps at 1 bit per sample). It is inherently bit-error and framing error resistant as a raw bit stream. Noise averages to a low rumbling and silence is just half the clock rate (110011001100...).

It was the standard in military digital voice systems from the 1970s until quite recently. And a variant was also used in early Bluetooth.

[0] https://en.wikipedia.org/wiki/Continuously_variable_slope_de...

[1] https://i.imgur.com/PzGDNFs.png

socializer 2 hours ago [-]
Doing stuff like this in the 8-bit era was never particularly hard. The difficulty was doing this and then anything else, because you basically need the entire CPU just for audio synthesis. For games, there was a very real trade-off between calculating video, game state, and sound, and sound often took the back seat.

It's also why everything looked and sounded better on 8-bit computers that had hardware support for graphic sprites or sound generation, even if they had a less powerful CPU. And it's the untold story behind why 16-bit graphics looked so much better: it wasn't about the CPU as much as it was about having a dedicated video card / chipset with its own memory, a sound card that handled polyphonic sound and MIDI synthesis, etc.

urbandw311er 4 hours ago [-]
I have a memory of a Spectrum game playing some sort of synthesised speech through the speaker that seemed incredibly ahead of its time. I believe the game was called iBall. And the sample said something like “Fight iBall!” Have I misremembered that? Was this a fever dream?
stevekemp 30 minutes ago [-]
Robocop was another game with sampled speach, not yet mentioned:

https://www.youtube.com/watch?v=Dy8kZcGz98U

There were a few games (in later years) with speach/audio. But Robocop was one that stands in my memory for the good music.

darrenf 1 hours ago [-]
The 128k version of Nodes of Yesod had some speech, albeit I think it was just the name of the game. My older brother told me a kid in his class got paid big bucks - like, I dunno, £50 or something? - for coding it. Almost certainly bollocks.

For high quality speech, you could get the Currah μSpeech! https://en.wikipedia.org/wiki/Currah#Currah_%CE%BCSpeech_for...

I swear there was one symbol it pronounced "flea bleep".

McDyver 3 hours ago [-]
I remember the "Codemasters Jet Bike Simulator". I always found it impressive

(And there was a "Get ready!" which I didn't remember)

https://www.youtube.com/watch?v=hRW9vW3_M3o&t=8

jesuslop 2 hours ago [-]
I remember "Rocman", how hearing a human voice coming from a 1-bit beeper sounded like sorcery: https://youtu.be/iuT0hxjLCzc?t=95
flohofwoe 4 hours ago [-]
Another Speccy game with digitized speech is Chase HQ:

https://youtu.be/yjrbcLm78I8?si=GMIqDdL31hq4ik72&t=87

Although tbf apparently that's done via the AY sound chip of the 128k, which is a lot easier than through the on/off beeper of the 48k since the AY can do digitized audio via CPU-driven volume modulation.

UncleSlacky 3 hours ago [-]
There was also "Meteor Storm":

https://spectrumgamesuk.com/index.php?game=Meteor-Storm

I think it said "Meteor Alert!" or something similar, though the quality was terrible.

_usefulcat 4 hours ago [-]
You might be right! I had a copy of 'Slightly Magic' which had some speech synthesis. Great game. Never completed it though
KnightLore 4 hours ago [-]
[dead]
musha68k 3 hours ago [-]
Due to all the constraints the ZX Spectrum is a fantastic system for recreational programming; too bad I missed the latest Spectrum Next batch last year.
ValdikSS 2 hours ago [-]
This reminded me of a recent very detailed video on polyphony implementation on 8052

https://news.ycombinator.com/item?id=49895486

There's also a phone with YM2149

regularfry 2 hours ago [-]
There was a music editor I remember getting on a late Your Sinclair edition cover tape which displayed proper music staves and gave you 4-note chord output. Blew my mind a bit at the time.
2a0c40 3 hours ago [-]
And who could possibly forget Chronos' title music, by Tim Follin?

https://www.youtube.com/watch?v=u-D24A_N4d4

stackedinserter 3 hours ago [-]
ZX's audio and video systems are two things that I never missed.
corbinvachal 3 hours ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 18:21:48 GMT+0000 (Coordinated Universal Time) with Vercel.