What this site does
Sonalyzer turns sound into pictures you can read. Drop a recording, play one of the samples or use your microphone, and it draws a spectrogram: time from left to right, pitch from bottom to top, loudness as ink. Hover any point and it tells you the time, the frequency, the nearest note with its cents and the level in dB. Next to it are tools built on the same picture: a decoder for hidden messages, a lossless checker for fake FLACs, a key finder and a BPM finder for songs.
It runs in your browser, on a phone too, and it is free. There is no account and nothing to install.
How a picture is drawn
The sound is cut into short overlapping slices, each slice is weighted with a Hann window, and a fast Fourier transform measures how strong every frequency is in it. Each slice becomes one column of the picture. The FFT setting chooses the slice length, from 512 to 4096 samples; the Axis setting decides how frequencies are spaced up the picture (Linear, Log or Mel); the Range setting decides how many decibels below the loudest point still get ink.
The readout does not just report the pixel under your pointer. It snaps to the strongest peak nearby and refines it between bins, which is why it can name a note to the cent.
How it is tested
The drawing code has 22 automated tests, run before every update. The core of them compares our spectrum, frame by frame, with the answers from scipy and librosa, the two libraries most audio researchers use, on a set of test files: pure tones at 440 Hz, 1 kHz and 10 kHz, linear and log sweeps, white and pink noise, a chord, dial tones and a hidden word. Other tests check that a log sweep draws as a straight line, that the readout lands on the right note, that the key and tempo of each sample come out right and that every sample renders cleanly.
Who makes it
Sonalyzer is a small independent project. We read every message; write to hello@sonalyzer.com with a bug, a sound that drew strangely, or something you would like it to do.