A footnote to the PDP-1 page

Not only Spacewar!: the PDP-1 as a media machine

The same machine that ran the first video game was also one of the first computers people sat down and played music on, in real time, by hand. While Steve Russell and the others were building Spacewar! out of plotted points, Peter Samson was making the PDP-1 sing four-part harmony out of nothing but the flip-flops on its own control panel. The two efforts came out of the same room, the same Tech Model Railroad Club milieu, and the same insight: that a fast, interactive, programmable machine was an instrument, and that what it did was entirely a matter of how you timed its pulses.

a computer with no sound hardware
Four light bulbs, turned into voices

How the PDP-1 made sound

The PDP-1 shipped with no audio hardware at all. What it had was six program flags: flip-flops wired to six indicator lights on the operator's console, each one settable or clearable by a single CPU instruction. They were meant for status and debugging, a way for a running program to signal the operator. Samson heard them differently. A flip-flop switched on and off at an audio rate is a square-wave oscillator, so he drove four of them as one-bit tone generators, toggling each in software at the frequency of the note he wanted. There was no timer to lean on; with no sound hardware of any kind, pitch had to come from raw counting, the program busy-looping a precise number of the machine's five-microsecond cycles between each flip.

Four channels meant four independent voices. Their outputs were brought off the machine through a small passive network, resistors mixing the signals down to a stereo pair and capacitors forming low-pass filters to round off the hard edges of the square waves and damp the computer's electrical buzz, and into an amplifier. The result was unmistakably a 1-bit sound, precisely on pitch but with a rough, buzzy undertone, worst on the higher notes, so much so that Samson deliberately detuned the four parts by a couple of cents to stop chords collapsing into a single fused tone. Accounts differ on exactly where the four signals were tapped: the standard console flags on the restored machine now at the Computer History Museum, an added register of flip-flops on MIT's more heavily modified original, which is why DEC later paid Samson two hundred dollars for a version that needed no such outboard hardware. Either way it is the sound of a computer with no business making music doing it anyway, and exactly the sound you can hear below, the PDP-1 at the Computer History Museum playing Boards of Canada's Olson.

Joe Lynch, Boards of Canada "Olson" on a 1959 PDP-1 Computer (YouTube). Compiled with Samson's original Harmony Compiler on an emulator, then punched to paper tape and played on the real PDP-1.

The music and the game are the same kind of object. Spacewar! is a tight loop that plots points on the Type 30 fast enough to read as motion; the Harmony Compiler is a tight loop that flips a console light fast enough to read as pitch. Both turn the machine's one real talent, doing a simple thing on an exact schedule, into something that looks like magic. The display and the loudspeaker are just two places the same timed pulses come out.

the Harmony Compiler
Peter Samson, MIT, 1961

Compiling music from notation

Samson did not hand-time every note. He wrote the Harmony Compiler, which took a score typed in a compact text notation, a number for each note's position on the stave, another for its duration, with marks for articulation and baroque ornament, and translated it into a form the machine could play. Strictly it was two programs. The compiler turned the notation into an intermediate tape of vertical instants, the chord-by-chord state of all the parts at each moment, doing offline the laborious score-merging Samson had previously done by hand; a separate player then read that tape and sounded it live through the four channels. The compiling was the drudgery, the playing was real time. It grew out of an earlier music program Samson had written for MIT's TX-0 around 1960, after Jack Dennis pointed out that the machine's debugging loudspeaker could be made to play tunes, so the lineage of computer music at MIT actually begins a step before the game.

He could not resist a programmer's joke: mistype a note and the Flexowriter would switch to its red ribbon and print, after Pope, "To err is human to forgive divine." The compiler was general enough for many kinds of music but was, by Samson's own design, happiest with baroque counterpoint, where four clear contrapuntal lines suit four square-wave voices almost perfectly. Over time several hours of music were encoded for it: Bach fugues and inventions, the whole of Mozart's Eine kleine Nachtmusik (entered by Bill Ackerman, perhaps the longest single work ever played on a PDP-1), Chopin's Minute Waltz, Christmas carols and a run of popular songs. In 1962 the Harmony Compiler and its player became part of the stock software DEC shipped with new PDP-1 machines, which means that one of the first things a brand-new PDP-1 anywhere could do, out of the box, was play polyphonic music. For a piece of software written by a student to amuse himself and his friends, that is a remarkable distribution.

not the first, but a particular kind of first
A place in electronic music history

PDP-1 music

The PDP-1 did not make the first computer music. Australia's CSIRAC had played popular tunes around 1950 to 1951, and the Ferranti Mark 1 at Manchester was recorded by the BBC playing God Save the King and other tunes in 1951, the earliest known recording of a computer making music. In the same year Samson's compiler was taking shape, 1961, John Kelly and Carol Lochbaum at Bell Labs had an IBM 7090 sing Daisy Bell (A Bicycle Built for Two), with an accompaniment by Max Mathews, the performance Arthur C. Clarke heard and gave to the dying HAL in 2001.

What the PDP-1 work represents is a different first: music as real-time, interactive, polyphonic software on a general-purpose machine, written inside a hacker culture, played for fun, and handed around as freely as the game beside it. The Bell Labs work was painstaking research output; the Harmony Compiler was something a student wrote on a machine he could touch, and that other students could load and run on a whim. That informality, the computer as an instrument you simply pick up, is something that made the interactive PDP-1 a very different machine.

from one bit to the green fridge
Peter Samson, 1961 and 1977

The arc: the light-bulb hacker built a landmark synthesiser

Peter Samson who in 1961 coaxed four-voice harmony out of four console lights went on, in 1977, to design the Systems Concepts Digital Synthesizer, universally known as the Samson Box. A one-off green cabinet costing on the order of $100,000, it was installed at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), where it served as the principal music-generation system for more than a decade and became one of the defining instruments of early digital synthesis. The arc from the PDP-1's one-bit flags to a purpose-built digital synthesiser running a whole research centre is, in miniature, the arc of computer music itself, from a clever abuse of debugging lights to dedicated hardware.

The same small group treated the computer not as a calculator but as something to perform with, and reading Spacewar!'s code closely you keep finding that attitude in it: the machine made to do more than arithmetic, by people who were listening as well as watching.

the machine that listened
Raj Reddy · speech recognition

And it learned to listen, too

Raj Reddy at Stanford in the 1960s
Raj Reddy at Stanford. Click to view full size.
If the music and the game are the machine's voice, speech was its ear. Raj Reddy grew up in the farming village of Katur in India, the only member of his family to gain an advanced education, and took a degree in civil engineering at Guindy Engineering College in 1958. In 1963 he came to Stanford as a PhD student, and in early 1964, for a class project suggested by John McCarthy, he began work on speech recognition, using the Stanford AI Lab's newly acquired analog-to-digital converter and its PDP-1 to process speech waveforms. Partly because of his multilingual background, and partly because the PDP-1 had that converter, the first program he wrote on the machine was a vowel recogniser. He chose the topic, among several McCarthy had offered, because he was drawn to natural languages and what computers might reveal about them.

The class project became a life's work. Reddy completed his PhD under McCarthy in 1966, on speech recognition, the first doctorate granted by Stanford's newly formed Department of Computer Science. He went on to found the Robotics Institute at Carnegie Mellon in 1979, the first robotics department at any US university, and to build further centres there for language, human-computer interaction, machine learning and software research, an expression of his conviction that computing is a broader field, with wider social impact, than the study of computers themselves. In 1994 he shared the Turing Award. The through-line runs from that PDP-1 vowel recogniser to the voice interfaces now in every pocket; the computer that drew Spacewar! and played Bach was also, in his hands, learning to listen.

Computer History Museum, 2021 CHM Fellow Awards Honoring Raj Reddy: Raj Reddy and the PDP-1 (YouTube).

In a 2021 oral history, Reddy remembered what that access meant. Silicon Valley in 1963 was apricot orchards: "there was no Silicon and there was no Valley," he recalled. McCarthy's new ARPA grant had bought the AI lab its own PDP-1, and once the MIT crowd, Steve Russell among them, went home, the machine sat empty. Newly arrived and with little else to do, Reddy took it: "I had access to the whole PDP-1 with no one to bother me from about 5:00, 6:00 P.M. in the evening until 7:00, 8:00 A.M. in the morning. So I would work every night, seven days a week, all night." Computer time elsewhere ran to a thousand dollars an hour; here it was free for the taking, and a class project became a life's work.

He also put his finger on why this particular machine could become an instrument at all. The PDP-1, he noted, came with things "that were never part of conventional computer architecture," because its origins lay at Lincoln Laboratory, home of the TX-2 and the LINC, where engineers were "already experimenting with these kinds of other I/O devices than just conventional data in and data out." The analogue-to-digital converter that let Reddy feed speech into the machine is exactly that inheritance, the same openness to unconventional input and output that let the PDP-1 be a screen, a loudspeaker and, in his hands, an ear.

So the PDP-1 was never only a calculator, or only a screen. It drew the first video game, played four-part harmony, and helped teach a computer to listen. Image and sound, output and input: a media machine in the fullest sense, in the hands of people who treated it as something to perform with, and to speak to.

← The PDP-1 page   Peter Samson →

sources
On this page

References