The Commodore Amiga has quite nice digital sound output. The Commodore 64 has the SID chip, well-regarded in 8-bit computing circles. The Commodore PET, on the other hand….
I’ve seen people call the PET the first home computer. This is false. There were computers before it, but they were sold in the form of kits. One of them, the KIM-1, was sold by MOS Technology before they were bought by Commodore. The PET was released the following year as an all-in-one unit, even with an integrated monitor.
Some PETs had a basic speaker included. The speaker had to be driven directly. With the later SID, you wrote data into registers and the chip’s circuitry handled the sound generation over time, freeing up the process for other things. On the PET, the processor has to push bits into the register itself, or else use a shift register set up to do the bit pushing. That means, if you get the data in fast enough, that you actually have a fair bit of flexibility over what the speaker does, but it also means you spend a lot of CPU cycles in doing in.
The Youtube channel Poking Technology recently tried playing digitized sound through the PET’s poor little speaker and documented their work in a fairly long 58 minute video. This is it:
58 minutes is a bit of a time imposition. And there is some hardcore hackery going on, with them writing assembly code on camera and testing it over and over in an emulator until it works, as well as both harsh hiss and very high-pitched beeping. To avoid those fine examples of audio torture, you can jump here to hear the final result, at around the 56 minute mark. By the way, the sound being played is the Windows 95 start up noise, the one composed by Brian Eno.