Ultrasound Modem
Send short text messages between two nearby devices over near-ultrasonic sound: four-tone FSK around 17 kHz at 40 bits per second, with clock recovery and a checksum.
Transmit2 B · ≈ 1.2 s
Turn the volume up and keep the devices within a metre or two. Most adults can barely hear these tones, but pets and kids might.
Receive
15 kHzSignal 0%19 kHz
not listening
Received
—
How it works
- The sender plays one of four tones — 16.0, 16.6, 17.2 or 17.8 kHz — for 50 ms per symbol; each tone stands for two bits, so a symbol period carries a quarter of a byte and the link runs at 40 bits per second, about five characters a second.
- A message is one frame: an 8-symbol alternating preamble, a length byte, the text as UTF-8, and a CRC-8. The whole frame is scheduled on the audio clock, so its timing does not depend on the browser’s timers.
- The receiver takes a 1024-point FFT of the microphone many times per symbol and asks which of the four tones is loudest relative to the noise floor around them, rather than whether a single tone is present. That relative decision is what makes it work through a phone’s automatic gain control and noise suppression, which quietly squash a steady tone after a moment.
- The preamble’s transitions are used to lock the receiver’s clock to the sender’s; every later symbol is a majority vote over the middle of its period, so a few misread FFT frames do not flip a bit. The checksum catches what does get through.