The PC Speaker Lives On As A New Album

The speaker in the original IBM PC is nearly the worst electronic musical instrument ever created. This isn’t because amazing works of art were never created for the PC speaker; no, that’s been done, and it’s amazing. The PC speaker is terrible because of how limited it is. It does one note at a time, only square waves, driven by an 8253 Programmable Interval Timer. Polyphony? Forget about it. Volume control? Nope. These aren’t really shortcomings, because music is art, and you can write a novel without using the letter ‘E’; the trick is in how you manage to do it.

[shiru8bit] took a deep dive into the PC speaker and decided to make an album. The video, with the completely necessary CRT graphic display, can be seen here. This alone is impressive, but what makes it amazing is how this album happened.

If you want to play more than a simple melody on a PC speaker, there are two or two and a half ways to do it. The first is to (virtually) set up two (or more) channels, loaded up with frequency values. At set intervals, the CPU changes the 8253 to output one frequency, then in the next chunk of time, sets the 8253 to another frequency. It sounds ‘bubbly’ for lack of a better term, but the results can be amazing; just check out the PC speaker version of Monkey Island. The 8253 can also be turned into a rudimentary DAC, but this was a rare technique thanks to patents, and by the time the patents expired everyone already had a Soundblaster. Oh well.

[shiru8bit]’s album uses the first technique, cycling through monophonic square waves at 120 Hz, but the real trick here is how the individual channels were composed. This required creating a VSTi plugin called PCSPE. This emulates a PC speaker, and sort of, kind of, implements arpeggios, pitch, and priority of different channels. Effectively, it’s a PC Speaker tracker.

The result is classic chiptune goodness, made on an instrument that really shouldn’t be used for music. It can be played on DosBox, but the weirdness of the real hardware including transients and the inefficiencies of a tiny speaker make real hardware almost a necessity here. You can check out the entire album below.

25 thoughts on “The PC Speaker Lives On As A New Album

  1. I still use the PC speaker. Since it’s not on the motherboard I have to connect my own. In Linux Mint it’s turned off by default. So I turn it on and use it in programs and scripts to alert me to something that is happening since my DAC connected stereo is not always on. In the terminal use the beep command: beep -f 659 -l 460 -n

  2. The Sol-20 microcomputer didn’t have any audio, but there was an add-on card which provided it very simply. The interrupt enable line, which is on the S-100 bus, was not used by the Sol. The card simply took that signal, sent it through a low-pass filter and a small op-amp and there was your audio. That little 2.04 MHz 8080 could produce this:

    1. I was looking for a quick example, but I suspect that may have been using the PWM trick.
      Basically, you use 2 timers, one that triggers an ISR and the one that is connected to the PC speaker but changed to one shot mode. The ISR loads the one shot value into the other time effectively setting the duty cycle for that period. The frequency of the first timer triggering the ISR becomes the base PWM frequency.

  3. For that matter, the DSD modulation employed by SACD is a single bit, turned on and off at several MHz, and then filtered. You can do a lot with one bit.

    But to the PC speaker itself, look up an old modplayer called Galaxy, I believe version 2.12 was the last released:

    Galaxy will not only play a 4-channel MOD over the PC speaker at a respectable mixing frequency, it’ll do a real FFT (not the fake bouncing-bars common in its era) and display the results in its textmode display. Grab a few MODs to play with it, just start with this one if you’re new to the format:

  4. The PC speaker driver for Windows 3.1x was of limited usefulness because it brought everything else to a halt while playing audio. I don’t recall of the same driver worked in Windows 95 or if it was a different driver, but Win 95 could use the PC speaker driver while continuing to run everything else.

  5. There was a Windows driver available for Win 3.x that would allow you to play mono sound to the PC speaker. It didn’t multitask well, and everything else would pause whilst the sound played. I remember using it before I got a Soundblaster 16.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.