Spectrum · landscape · persistent tones · replay

FFT landscape

The last ten seconds of sound, drawn as a landscape: frequency across, time into the distance, loudness as height. The page picks out tones that stay put, such as a faint whine somewhere in the house, keeps a log of when they come and go, and can replay what it captured with everything else turned down.

–sample rate
–per bin
–per frame
–parameters
Listen to –
Replay nothing playing
Start from
–drag to turn · pinch or Ctrl+scroll to zoom · double-click to reset

Seen from above: as captured, and after the filter

Move over the picture to read a frequency. Click to put the watch band there.

Spectrum now

Watch band log

–

What the landscape is

The sound is cut into short overlapping blocks. A Fourier transform turns each block into a list of how much of each frequency it holds. Blocks laid side by side make a surface. A steady tone is a ridge running along the time axis; a click is a wall across it; a voice is a set of ridges that bend.

Sharp in pitch or sharp in time

A long block separates frequencies that are close together but smears events in time. A short block does the opposite. One bin is the sample rate divided by the FFT size wide: 23 Hz for 2048 samples at 48 kHz, lasting 43 ms. You cannot have both narrow, and that is a property of waves, not of this program.

How a tone is found

For every frequency the detector compares the level with the median of its neighbours. Broad noise raises the whole neighbourhood, so only something narrow stands out. A frequency that stands out for a set share of the window is called persistent. Clicks are too wide and voices move too much to qualify.

Unusual is something else

The page also learns the usual quiet level of every frequency. A sound is unusual while it is well above that. A whine that never stops is persistent but soon stops being unusual; a tone that switches on is both. The replay can keep either kind.

What the replay does

The captured window is transformed block by block, each frequency in each block is turned up or down, and the blocks are put back together. Kept parts are amplified, the rest is turned down, and the result is brought up to full level. A tone 20 dB under the room noise becomes the only thing you hear.

Hunting a noise in the house

Put the watch band on the tone and leave the page open; the log shows when it comes and goes, which often points at the cause (a charger, a dimmer, a fridge, a heating pump). Then walk about with a laptop or phone and watch the level: it rises as you get closer. If the tone stays the same wherever you go, suspect the microphone or the computer itself.

What is measured, and what this page chose

Measured

  • The transform is a plain radix-2 FFT written out in this page and checked against the definition. Levels are calibrated so that a full-scale sine reads 0 dB with every window.
  • Frequencies of tones are read to a fraction of a bin by fitting a parabola through the peak and its two neighbours.
  • The replay filter keeps everything exactly when it is told to keep everything: transform, inverse transform and overlap-add return the input to within rounding.
  • The page asks the browser to switch off echo cancellation, noise suppression and automatic gain. Noise suppression in particular is designed to remove steady tones, which is the very thing being looked for.
  • Nothing is uploaded. Sound stays in this tab and is forgotten when the tab closes, apart from files you save yourself.

Chosen by this page, or outside its control

  • Levels are in dB below digital full scale, not sound pressure. Without a calibrated microphone the page cannot say how loud the tone is in the room, only how it compares with everything else.
  • Microphones in laptops and phones are uneven, usually weak above 10 kHz or so, and some systems filter the sound before the browser gets it whatever the page asks for. A tone can also come from the electronics of the microphone or computer and not from the air.
  • Nothing above half the sample rate can be seen: 24 kHz at the usual 48 kHz.
  • “Persistent”, “unusual” and all the thresholds are this page’s definitions. They are sliders because the right values depend on the room. Steady musical notes and humming appliances count as tones too.
  • The detector reports a tone up to a second after it starts, because it averages and waits to be sure. The log is that much late.
  • The demo signal is synthetic: filtered noise, mains hum, and made-up voices, clicks and thumps.
  • Browsers slow down pages in hidden tabs. Microphone analysis and the log keep running; the pictures and the demo signal do not.