Living Document Notice
Published 2026-09-17. The evolving architecture, revisions, and connected notes for this dispatch live in the Stax Digital Garden.
Procedural Audio Architecture for Passive Radar Contacts
Summary
Interactive web applications typically handle auditory feedback by loading static sampled sound files. Developers bundle collections of .wav or .mp3 assets for clicks, notifications, and chimes. In an ambient telemetry instrument, static audio assets exhibit major flaws: they consume HTTP bandwidth, introduce playback latency while the browser decodes compressed streams, and lack the parametric flexibility needed to express multi-dimensional physical data.
Hushwire implements a zero-asset procedural audio engine using the browser’s native Web Audio API. Rather than playing recorded audio, the engine synthesizes discrete acoustic feedback directly from math: parameterizing sine oscillators, biquad lowpass filters, and exponential gain decay envelopes. When an observer inspects an aircraft contact or enables quiet sweep-pass tones, the frequency and harmonic profile dynamically encode the target’s altitude and range. This dispatch explores the procedural synthesizer topology, pitch quantization scales, and the restraint required to design calm acoustic instruments.
Why Sampled Audio Assets Fail Precision Instruments
Embedding static audio files into an operational dashboard introduces noticeable operational friction:
[ User Action / Event ] ──► fetch("blip.mp3") ──► decodeAudioData() ──► AudioBufferSourceNode
│ │
Network Latency CPU Decode Latency
│ │
▼ ▼
Static Fixed Tone (No Dynamic Parametric Tuning)
- Network Overhead: Even small audio files (15 KB to 50 KB) accumulate across initial page payloads, slowing startup on restricted network connections.
- Timing Jitter: Triggering HTML5
<audio>elements or managing asynchronousdecodeAudioDatapromises introduces jitter between visual canvas events and auditory clicks. - Monolithic Timbre: A pre-recorded beep sounds identical whether an aircraft is hovering at 500 feet or cruising at 39,000 feet. Making sound informative requires hundreds of audio files or pitch-shifting algorithms that produce metallic artifacts.
The Procedural Synthesizer Graph
The Web Audio API allows clients to build modular DSP signal chains in JavaScript. In Hushwire, the synthesis graph is constructed once on initial user gesture and operates with microsecond precision:
┌─────────────────────┐
│ OscillatorNode │ (Sine / Soft Triangle Wave)
│ Freq = f(alt) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ BiquadFilterNode │ (Lowpass Filter, Q=1.2, Cutoff=1800Hz)
│ Warm CRT Acoustic │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ GainNode │ (Exponential Attack / Decay Envelope)
│ τ_attack = 2ms │
│ τ_decay = 85ms │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ AudioDestinationNode│ (Hardware Output)
└─────────────────────┘
By keeping the signal chain simple and terminating nodes immediately after envelope decay, the audio thread consumes negligible CPU (under 0.2% on standard desktop processors).
Translating Telemetry into Harmonic Pitch
To ensure that procedural feedback remains musically coherent and non-abrasive, frequencies are quantized to a five-note pentatonic scale rather than a continuous linear pitch bend. Continuous slides often sound like sirens or alarms, triggering autonomic stress responses. Pentatonic intervals sound naturally harmonic and unobtrusive.
Hushwire maps target altitude () across two octaves of an F-minor pentatonic scale (F3 to C5):
// Pentatonic pitch frequencies in Hertz
const PENTATONIC_SCALE = [
174.61, // F3 (Surface to 3,000 ft)
207.65, // Ab3
233.08, // Bb3
261.63, // C4
311.13, // Eb4
349.23, // F4
415.30, // Ab4
466.16, // Bb4
523.25 // C5 (Above 35,000 ft)
];
export function altitudeToFrequency(altFeet: number): number {
const clampedAlt = Math.max(0, Math.min(altFeet, 45000));
// Normalize to scale index [0, 8]
const index = Math.floor((clampedAlt / 45000) * (PENTATONIC_SCALE.length - 1));
return PENTATONIC_SCALE[index];
}When an observer clicks or hovers over a low-flying approach aircraft, the system emits a deep, resonant 174 Hz tone. A high-altitude transcontinental jet produces a crisp, light 523 Hz pip. The observer learns to identify traffic categories purely by ear.
Synthesis Implementation with Zero Acoustic Clicks
Abrupt changes in audio amplitude cause speaker cones to jump instantaneously, generating harsh DC clicks or popping noises. Hushwire eliminates clicks using micro-second exponential ramps on the GainNode:
export class RadarAcousticEngine {
constructor() {
this.ctx = null;
this.masterGain = null;
}
// Initialize on first explicit user interaction to comply with Autoplay policy
public init() {
if (this.ctx) return;
const AudioContextClass = window.AudioContext || window.webkitAudioContext;
this.ctx = new AudioContextClass();
this.masterGain = this.ctx.createGain();
this.masterGain.gain.setValueAtTime(0.15, this.ctx.currentTime); // Low baseline volume
this.masterGain.connect(this.ctx.destination);
}
public playContactPing(altitudeFeet, distanceNm) {
if (!this.ctx || this.ctx.state !== "running") return;
const now = this.ctx.currentTime;
const freq = altitudeToFrequency(altitudeFeet);
// 1. Create Oscillator
const osc = this.ctx.createOscillator();
osc.type = "sine";
osc.frequency.setValueAtTime(freq, now);
// 2. Warm Lowpass Filter
const filter = this.ctx.createBiquadFilter();
filter.type = "lowpass";
filter.frequency.setValueAtTime(1400, now);
filter.Q.setValueAtTime(1.0, now);
// 3. Attack / Decay Envelope
const noteGain = this.ctx.createGain();
noteGain.gain.setValueAtTime(0.0001, now);
// Smooth 4ms attack prevents popping
noteGain.gain.exponentialRampToValueAtTime(0.6, now + 0.004);
// Protracted 90ms decay simulates acoustic CRT chassis ring
noteGain.gain.exponentialRampToValueAtTime(0.0001, now + 0.095);
// Connect node graph
osc.connect(filter);
filter.connect(noteGain);
noteGain.connect(this.masterGain);
// Trigger synthesis and schedule teardown
osc.start(now);
osc.stop(now + 0.100);
// Garbage collection cleanup
osc.onended = () => {
osc.disconnect();
filter.disconnect();
noteGain.disconnect();
};
}
}Sound Design Principles for Calm Observatories
| Audio Property | Notification-Heavy Web App | Hushwire Procedural Sound |
|---|---|---|
| Asset Origin | Downloaded .mp3 sample files | Native Web Audio synthesis in-memory |
| Autoplay Behavior | Plays autonomously on incoming alerts | Completely silent until user interacts or opts in |
| Sound Duration | 500 ms to 1,500 ms melodies | 80 ms to 95 ms micro-pips |
| Information Content | Binary (alert vs no alert) | Parametric (pitch encodes altitude, gain encodes range) |
| Acoustic Pressure | Piercing high-frequency transients | Filtered sine waves with gentle exponential envelopes |
By synthesizing audio purely on demand, Hushwire maintains zero external asset dependencies, zero network requests for sound files, and delivers a tactile, acoustic connection to the physical airspace overhead.
- Directus Target: hushwire
- Garden Source Reference: Web Audio Engines, Procedural Sound Design, MOC - Fleet Operations, MOC - Bosun PKM Tools