./jerome{m}jack in

~/Labs/Radio Lab.md · lab · 5 min · updated

Radio Lab

2026 · Rust · WebAssembly · Web Audio · DSP · Cyberspace Rooftop

Turn a real HF receiver onto the dead spaces between 3 and 18 MHz at two in the morning and the ionosphere stops sounding empty. Behind the hiss of atmospheric lightning static and ionospheric fading sit Cold War channel markers that have buzzed without interruption for forty years, mechanical intervals introducing five-digit one-time-pad cipher groups, sweeping magnetospheric lightning whistlers, over-the-horizon radar bursts hammering across thirty kilohertz of band, and slow-scan images painting themselves line by line out of frequency-modulated audio.

Radio Lab is a complete 3–18 MHz shortwave Software-Defined Radio whose entire RF front-end, atmospheric channel model, demodulator, 512-point FFT analyzer, and 12 synchronized transmissions are synthesized live in a zero-dependency Rust/WebAssembly DSP engine (radio.wasm, ~89 KB). Spin the brushed-steel VFO dial, drag across the scrolling HDR waterfall, hit auto-scan to hunt every ghost signal across the band, decrypt the E03 numbers station's one-time pad, watch 11232.0 kHz paint a live Kowloon megastructure schematic onto an amber SSTV CRT, uncover the spectrogram glyph hidden inside 16910.0 kHz, or tap live Morse to anyone else tuned to the shared 15555.0 kHz pirate band.

radio · liveClick ▶ audio to power the live 44.1 kHz Rust/Wasm SDR receiver (visual waterfall runs immediately). Spin the VFO wheel, drag or click any glowing streak on the waterfall, hit auto-scan, or click reveal all in the logbook to jump straight to any of the 12 ghost frequencies.open ↗

Inside the Rust/Wasm RF front-end

No MP3s, no WAV loops, and no Web Audio synth shortcuts live behind the dial — every sample coming out of the speaker and every vertical pixel scrolling down the waterfall is computed at 44.1 kHz inside site/crates/radio/src/lib.rs:

  1. Atmospheric channel (QRN + QSB) — A 3-pole Voss/Paul-Kellet pink noise generator mixed with Poisson-distributed lightning static crashes drives the HF noise floor, while independent slow multi-sine ionospheric fading envelopes drift each carrier in and out of lock.
  2. Real heterodyne beat tuning — Off-tuning a station by \Delta f introduces a genuine carrier beat whistle at |\Delta f| \cdot 1000\text{ Hz} attenuated by a Gaussian IF skirt, so sweeping past a strong signal produces the unmistakable shortwave swoop before snapping into clean demodulation.
  3. 2-stage biquad IF selectivity + AGC — Switching between AM, USB, CW (razor-sharp 720 Hz peaked filter), and RAW reconfigures two cascaded RBJ biquad bandpass filters (if_filt1, if_filt2) followed by fast-attack / slow-release Automatic Gain Control and a soft tanh limiter so strong carriers pull down the surrounding static floor just like an analog receiver.
  4. 512-point radix-2 Cooley–Tukey FFT + 256-bin RF passband — Every frame windows the real audio ring buffer with a Hann taper, transforms it in place, and blends the live audio spectrum with the wider \pm 48\text{ kHz} RF passband to drive the 60 fps spectrum trace and scrolling waterfall across Amber, Thermal, and Cyan phosphor LUTs.
  5. Parallel 3-formant speech synthesizer — Both UVB-76's eerie voice interruptions and the E03 Numbers Station's spoken cipher digits are synthesized on the fly from a sawtooth glottal pulse train filtered through three parallel vowel-formant biquads (F1, F2, F3) with consonant fricative bursts.

The 12 synchronized ghost transmissions

Every station is phase-locked to real wall-clock UTC (Date.now()), meaning two visitors on opposite sides of the planet tuned to 4625.0 kHz or 9996.0 kHz hear the exact same buzz, pip, cipher digit, and SSTV scanline at the exact same second:

Freq (kHz)CallsignModeWhat you hear & decode
3756.0S30 · The Pip (8S1Sh)USB50/min metallic Russian military channel marker pips, interrupted every 40 s by a formant-synthesized voice burst (JVB 90 12 44).
4625.0UVB-76 · The Buzzer (MDZhB)AMThe iconic 25/min gritty 111.5 Hz saw-buzz over 50 Hz mains hum, periodically halting for an eerie callsign interruption (MDZHB 74 19 88 04).
5408.0E03 · Lincolnshire PoacherAM16-note mechanical interval callup followed by 4 spoken five-digit cipher groups — feed the first 5-digit group into the built-in One-Time-Pad Decryptor to unlock a hidden rooftop dispatch.
6666.0G02 · Chime MatrixAMDetuned haunted celesta loop inspired by the Swedish Rhapsody numbers station, complete with analog tape wow/flutter and a 98 Hz subcarrier.
7040.0CW-01 · JM01 BeaconCWRazor-narrow 18 WPM Morse beacon (VVV DE JM01 CYBERSPACE K) with live CW tape readout.
8192.0Duga · Russian WoodpeckerRAWCold War 10 Hz / 16 Hz over-the-horizon radar hammering wideband comb-tooth interference across 30+ kHz of the waterfall.
9996.0RWM / CHU · Atomic ClockAMReal wall-clock UTC time ticks (1000 Hz second pips, 1200 Hz ten-second markers, 1500 Hz minute mark) plus 100 Hz BCD time-code pulses.
11232.0FAX-09 · Kowloon SSTVUSBReal FM slow-scan television (1200 Hz sync pulse + 1500–2300 Hz luminance) that paints a live 160×120 stepped megastructure & searchlight schematic onto the phosphor CRT — exportable as a PNG.
12840.0RTTY-77 · WintermuteUSB45.45-baud, 170 Hz-shift FSK radioteletype (2125 / 2295 Hz twin parallel waterfall rails) streaming Tessier-Ashpool ICE telemetry.
14230.0V-07 · Whistlers & PulsarUSBMagnetospheric lightning plasma dispersion sweeps (f \propto 1/\sqrt{t}) layered over millisecond radio pulsar PSR B1919+21 (1.3373 s period).
15555.0PIRATE-NET · Live Shared CWCWLive multiplayer Morse band bridged over the site's existing Cloudflare Durable Object (/api/presence, block 4010) — hold the brass key (K) or type a message to transmit live audio and waterfall blips to every other listener tuned in.
16910.0BLACKWALL-00 · Spectral SigilUSBAnomalous 16-harmonic chord transmission whose frequency-domain sidebands literally draw a glowing cyberpunk pyramid-eye + JM bitmap glyph straight onto the scrolling waterfall.

Also wired into Cyberspace

Take the elevator up to Level 02 · Rooftop Observatory inside Cyberspace and look beside the red-strobe NW Communications Spire: Radio Lab is mounted there as a weatherproof rooftop HF receiver rack wired directly into the antenna mast, playable right inside the 3D skyline.

Back to Labs · visit the rooftop antenna in Cyberspace · try encoding your own SSTV images in the Modem Lab · paint spectrograms in the Spectrogram Lab · see how this site works.