wopr
The low humming of the WOPR machine room in WarGames (1983), synthesised rather than sampled.
Thirty seconds, rendered by the same commit these pages document. There is no recording in it and no loop point: it would have kept going.
What you are hearing
Fifty-six sine partials between 91 Hz and 290 Hz, at frequencies measured off a recording of the real thing. They are not a harmonic series — there is no fundamental the rest are multiples of — because the sound is a room full of independent motors, transformers and fans rather than one vibrating thing. 98% of the energy is in the 80–160 Hz octave.
The slow throb is not a tremolo. The strongest partials sit about 3.7 Hz apart, so summing them beats at 3.7 Hz on its own; adding a modulator would be doing the same job twice, audibly. Each partial also drifts a fraction of a percent in frequency and a couple of decibels in level, the way an unregulated motor does, which is what keeps the whole thing from settling into a period the ear can find.
The ping and the pong are in the recording too. The ping is nearly a pure tone at 1188 Hz; the pong's partials land at 1.56, 1.86, 2.12 and 2.66 times its 527 Hz fundamental, which is not a harmonic series and is why it reads as a struck object rather than a beep. Both echo off the room at about 205 ms.
Running it
It plays when run from a terminal, as a PipeWire node of its own that a mixer can see and move, and writes a WAVE stream when redirected.
$ wopr
$ wopr --duration 30 --output hum.wav
$ wopr --bursts off --gain -26
Reading it
API documentation, generated from the doc comments, which carry most of the explanation of why each piece is shaped the way it is.
- GitHub github.com/jcollie/wopr
- Forgejo git.jcollie.dev/jeff/wopr
- Tangled tangled.org/jcollie.dev/wopr
- Radicle
rad:z2hpahcXcgvnjmbvU2gDmNSJQRWBB