This one goes up to 1
February 8, 2019 6:48 AM   Subscribe

Like chiptunes but find the SID chip and NES sound chip too ornate and maximal? Shiru, a Russian video game composer and programmer, has composed an album using only the IBM PC speaker, arguably the most primitive possible computer sound output device. Technical details, including links to the code used to create the music, are here.

How primitive is the PC speaker? Well, you have one bit of output and your oscillator is the PC's timer chip; it's essentially a square wave, which the code has to make by hand. Nonetheless, programmers have, over the years, come up with techniques for faking the effect of polyphony and hinting at instrument timbres, which Shiru describes in the technical writeup. (There are also ways of using pulse code modulation to play sampled sounds, though this album doesn't use those.)
posted by acb (31 comments total) 24 users marked this as a favorite
 
Nice. Reminds me a lot of those extra impressive beat-boxers who manage to throw in bass and stings and drops. It's amazing what the right kind of mind can do with one channel. I kinda want to mash this up with a video from that Futurama where Bender wrote a song with Beck.
posted by es_de_bah at 6:58 AM on February 8, 2019


Shiru does all sorts of great stuff, including some great NES games and a 1-bit music blog (which I used to follow rabidly, but had forgotten about somewhere along the way).

I think my favorite 1-bit chiptune that I've come across is Candlelit Waltz.

Thanks for posting this!
posted by ragtag at 7:14 AM on February 8, 2019 [1 favorite]


Excellent post title!
posted by moonmilk at 7:18 AM on February 8, 2019 [3 favorites]


I remember back in the days of Windows 3.1 there was a driver which would use the PC speaker like a soundcard -- it was horrible but it worked.
posted by AzraelBrown at 7:24 AM on February 8, 2019 [5 favorites]


I vaguely remember that driver, but would dispute the claim that it worked in any practical sense of the word, or as anything more than a novelty. Other than obviously sounding awful, didn't the entire machine freeze whenever it played audio?
posted by acb at 7:31 AM on February 8, 2019 [1 favorite]


That driver was the first way I was able to hear Metaillica's For Whom the Bell Tolls which I took me 40 minutes to download the MP3 off of dialup. It was indeed terrible but it was amazing that it worked at all.

That said this link reminds me of the similarly impressive program I used to have to play MOD files on a 486 machine running DOS.
posted by Space Coyote at 7:37 AM on February 8, 2019 [2 favorites]


I'm reminded of listening to Amiga MODs on a 386 with no sound card back in the day. A quick search to see if that software still exists instead brought me to this demo from 2015 on a first-gen IBM PC: 8088 MPH. (The MOD piece plays during the end credits.)
posted by giltay at 7:45 AM on February 8, 2019 [3 favorites]


"Arguably the most primitive possible computer sound output device"

ZX Spectrum (1982, single channel 10-octave beeper): Hold my beer ...
posted by GallonOfAlan at 7:56 AM on February 8, 2019 [1 favorite]


I went diving into obscure Linux config files recently and found my way to the kernel module blacklist. This is a list of bits of kernel code that the distribution explicitly doesn't want to load. Anyway, among the gems there:

# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

I always wondered why Ubuntu didn't beep my motherboard. Now I know.

There's also a fun story about beep.sys and 64 bit Windows. The hardware for this old fashioned speaker was finally removed from the standard PC spec. But it turns out various assistive tech devices for people with disabilities relied on that old Beep driver, so Microsoft had to build emulation for the old hardware and driver using modern sound cards and speakers. Which all ends up being more complicated than you might expect.
posted by Nelson at 7:56 AM on February 8, 2019 [1 favorite]


ZX Spectrum (1982, single channel 10-octave beeper): Hold my beer ...

Doesn't the ZX81 at least give you an oscillator that you poke a frequency to, rather than making you toggle the waveform yourself?
posted by acb at 8:01 AM on February 8, 2019


Oh gosh, this is great.
posted by cortex at 8:28 AM on February 8, 2019


Strangely hypnotic. Thanks OP for the post.
posted by Faintdreams at 8:57 AM on February 8, 2019


AFAIK the Speccy had a speaker toggle that you had to bit bang, just like the Apple ][. So you could do sample-based music. Although I don't know why the Apple music demos weren't nearly as cool.
posted by RobotVoodooPower at 9:41 AM on February 8, 2019 [1 favorite]


I remember one of the saving graces of the Tandy 1000 was that it had three voice audio on that tiny speaker.
posted by furtive at 10:38 AM on February 8, 2019


I spent hours upon hours upon hours programming a version of Gypsy Fantasy in BASIC(A) on that dang monophonic no-volume-control contraption. I've seen some amazing work come out of the demoscene since then, which of course I can't find right now.
posted by rhizome at 11:26 AM on February 8, 2019


ZX Spectrum (1982, single channel 10-octave beeper): Hold my beer ...

Sadly, that's the 3-channel AY-equipped Spectrum 128. To hear true multi-channel beeper music, you need to look up Tim Follin's work, such as Vectron
posted by scruss at 2:35 PM on February 8, 2019 [1 favorite]


Well, you have one bit of output

If you have enough timing resolution, though - not necessarily a problem. 256 Khz 1-bit audio would sound just great!
posted by Jon Mitchell at 4:16 PM on February 8, 2019


Other than obviously sounding awful, didn't the entire machine freeze whenever it played audio?

@acb -- yes. Including while playing the Windows 3.11 startup sound. whenever I navigated an IRQ conflict unsuccessfully, I'd fall back on this driver. I even managed to play parts of Myst with it. It was still kind of impressive given the technical limitations...
posted by cacophony at 4:31 PM on February 8, 2019


blacklist pcspkr

Thanks for mentioning! I added this to my module blacklist in Arch Linux, and now my tty doesn't beep at me when I hit backspace too many times. This will be great next time I'm at the library and find that I've uninstalled Xorg again.
posted by mammal at 8:01 PM on February 8, 2019 [1 favorite]


Correct me if I'm wrong, but wasn't there a program called MODPLAY that would let you play Amiga .mod files through the PC speaker, and it actually sounded halfway decent?

Dear god I'm old.
posted by panama joe at 9:19 PM on February 8, 2019


Oh. My. God. MODPLAY. IT LIVES!!!!

And oh man do I remember that spectrum analyzer, with its blippy moving rectangles! And then later when they added the "proper" waveform analyzer with that picture of the tropical beach! Oh man, the joy and wonder at being able to play something that sounded like MUSIC! on a COMPUTER! Who knew you could do a thing like that???
posted by panama joe at 9:30 PM on February 8, 2019 [1 favorite]


Fancy people with your speakers. In my day we made music with the floppy drive.
posted by bongo_x at 1:35 AM on February 9, 2019


Sudden flashbacks to Maniac Mansion and Zac McCracken! Thanks for posting.
posted by en forme de poire at 8:01 PM on February 9, 2019 [1 favorite]


> Fancy people with your speakers. In my day we made music with the floppy drive

I'm gonna have to stop you right there. This is using the system speaker, which makes sense when you think about how much a soundcard cost in 1986 (unobtanium). Floppy drives weren't even really sold separately yet, either.

The first of that kind of thing I ever heard of was with dot matrix printers, and even that was much later. I think the first drive orchestra I heard was probably something off Boing Boing, in their website era. It just took awhile for these devices to become trash cheap enough to burn up experimenting with.
posted by rhizome at 8:33 PM on February 9, 2019


I think the first drive orchestra I heard was probably something off Boing Boing, in their website era.

Not orchestra, just one floppy. I had something that did this around '92(?) but there were warnings that you could kill your floppy drive.
posted by bongo_x at 4:43 PM on February 10, 2019


Was it Imperial March? It's always Imperial March.
posted by rhizome at 5:25 PM on February 10, 2019


If you have enough timing resolution, though - not necessarily a problem. 256 Khz 1-bit audio would sound just great!

256kHz 1-bit audio would sound like 32kHz 8-bit audio (with some weird noisy artifacts unless a low-pass filter was used to smooth the 1-bit PCM down to something more like an 8-bit DAC).
posted by acb at 2:17 AM on February 11, 2019


Something like this?
posted by rhizome at 2:43 PM on February 11, 2019


Good lord, a CGA demo. I like the part where they show 1000 colors on the 4 color screen. The music's as awful as a Ceti Eel but technically amazing for the hardware.
posted by Nelson at 4:10 PM on February 11, 2019 [1 favorite]


It's incredible. IIRC, the techniques they use make it so it won't even run on an x86 emulator. It has to be an original IBM PC.

Now that I've listened to the album of the post topic, I'm game. It should be noted that this is the result of a sequencer+plugin process that greatly reduced the difficulty of laying the notes down. I really like that the plugin exports to just a plain, I guess 1.19MHz? bitstream. I don't know enough to get much out of that part except that it makes it usable in DOS. Impressive work!
posted by rhizome at 11:00 PM on February 11, 2019


Ooh, thanks for that explanation. Some of this stuff is bonkers, like "To ensure the cycle counting was consistent, several things were done including changing the system default DRAM refresh from it’s default interval of 18 to 19, to get the DRAM refresh periods to line up with CRTC accesses."

Back to the original post here, 8088 MHz is implementing a ProTracker player on a 4.77MHz PC with the PC speaker. They have exactly 288 cycles per sample in order to achieve 16kHz output. "Audio output was done using traditional Pulse-Width Modulation (PWM) techniques, such as the kind made popular by Access’s Realsound." More details in this post and the code is here.
posted by Nelson at 9:01 AM on February 12, 2019


« Older Should social workers be engaged in these...   |   Hand to hand, toe to toe, the trikitixa's boss in... Newer »


This thread has been archived and is closed to new comments