noisemoon › blog › calibrate feature, walked through
The calibrate feature, walked through
NoiseMoon has a button labeled "tune to your room." Tap it, the moon listens through your microphone for ten seconds, then it tunes the noise to mask whatever's loudest in your environment. Here's exactly what happens, why it works, and why nothing leaves your device.
What you do
- Open NoiseMoon. Find the tune to your room button under the tools ✨ heading.
- Tap it. Your browser asks permission to access the microphone.
- Stay quiet. Don't make any new noise — the calibration listens for what's already there.
- An overlay shows "Listening to your room…" with a progress bar.
- Ten seconds later, the noise color and tilt switch automatically to match your room.
That's the whole user interaction. There's a status line below the button afterward: something like Velvet · calibrated to room. You can override the choice by tapping a different soundscape, or run calibrate again if your environment changes.
What's happening inside
The calibrate flow does three things: capture audio, analyse spectral content, choose the best masking response.
1. Capture
The browser opens an audio context using the standard Web Audio API and a MediaStreamSource tied to your microphone. The mic's signal is fed into a band-pass filter chain and an analyzer node. No file is created. No upload is made. The audio is consumed in real time and never written to disk.
The mic capture lasts exactly ten seconds. After ten seconds, the audio context is closed and the stream is released. Nothing about the audio persists past that moment.
2. Analyse
While capture is happening, the analyzer node computes a Fast Fourier Transform of the incoming audio at regular intervals (every ~100 ms). The FFT splits the signal into frequency bands. NoiseMoon's calibrate flow groups the result into six broad bands corresponding to the spectrum's main regions:
- Sub-bass (20-60 Hz) — very low rumble
- Bass (60-250 Hz) — HVAC, traffic, refrigerators
- Low-mid (250 Hz-1 kHz) — voices, household sounds
- Mid (1-4 kHz) — speech intelligibility band
- High-mid (4-12 kHz) — clicks, sibilance
- Air (12-20 kHz) — squeaks, electronic interference
The analyser averages the band energies over the full ten seconds. The result is a vector of six numbers describing your room's noise profile: how much energy is in each band.
3. Choose
NoiseMoon then matches your room profile to the soundscape preset that masks it best. Each soundscape has a known spectral footprint — Spaceship is broadband mid-heavy, Submarine is bass-heavy, Cathedral is reverberant pink with mid-frequency emphasis, etc. The calibrate logic picks whichever preset has the most overlap with where your room's energy is concentrated, plus an appropriate tilt setting (warm-to-bright slider).
If your room is dominated by HVAC bass, you'll get something low and warm. If it's dominated by speech-band content (a noisy office), you'll get something brighter that masks the speech band more aggressively. If your room is genuinely quiet, calibrate will tell you so — "Your room is already quiet" — and skip the change.
What never leaves your device
The audio captured during calibration never leaves your device. There is no upload. There is no server. There is no third-party processing service. The Web Audio API runs entirely in your browser, the FFT is computed locally, the band averages are computed locally, the matching logic is local. The result — which is just "switch to the Velvet preset with tilt 0.45" — is local too.
The microphone audio exists for ten seconds in your browser's audio buffer. Then it's gone.
You can verify this yourself. Open NoiseMoon's network monitor (the small "0 calls" indicator in the footer). Run calibrate. The counter doesn't tick up. There's no outgoing call associated with calibration, because calibration is a self-contained client-side computation.
Why this is structurally different from what other apps do
Most apps that involve a microphone send the audio somewhere — for transcription, for AI processing, for analytics, or for "improving the model." Even if they don't store the audio, they typically transmit it for processing. NoiseMoon's calibrate flow doesn't transmit anything because the analysis is simple enough to run on a phone in real time. A six-band FFT averaged over ten seconds is an embarrassingly small computation by modern standards. It doesn't need a server.
This isn't a privacy feature we added on top of a server-based design; it's the consequence of using on-device DSP in the first place. The privacy story falls out of the architecture rather than being an opt-in setting.
Why it works as well as it does
Acoustic masking efficacy isn't about volume — it's about spectral overlap. To mask a sound, you need noise that has energy in the same frequency band. White noise masks everything because it has energy everywhere. Brown noise masks low rumble well but does poorly against speech because brown has very little energy in the speech band.
Calibrate uses your room's spectral profile to pick the noise that overlaps best. If your room's loudest content is in the speech band, calibrate picks a soundscape with strong speech-band energy. The result is more efficient masking at lower volumes — you don't have to crank the noise to drown out the room, because the noise is concentrated where the room's content is.
When to use calibrate
- When you switch environments (home to office, plane to hotel, etc.). Your noise profile is different, and the right preset may be different too.
- When the default preset feels off — too bright, too dark, or not effective.
- When you want a small, low-stakes thing to try with a sleep or focus app you've been using for a while.
You don't need to use calibrate. The default presets work well for most rooms most of the time. Calibrate is the optimisation pass for when "good" isn't quite enough.
Try it
Open NoiseMoon, scroll to the tools section, tap tune to your room. Stay quiet for ten seconds. See what the moon picks for you.
← back to noisemoon.com