Compute the DFT of a single tone in the sandbox, and predict — before you read it off the screen — the exact bin the tone lands in, the frequency that bin represents, and what zero-padding does to the spacing between bins.
The DFT turns N samples into N frequency bins spaced f_s/N apart. Knowing which bin a tone lands in — and that zero-padding buys finer bin spacing but never finer resolution — is the difference between reading a spectrum and being fooled by one.
Open the sandbox. It opens on exactly this state — a single tone in bin 10 — so a Reset gets you here too. Each step names the one knob to change; leave everything else alone.
Tone 1 -> bin 10 N -> 64 f_s -> 48000 Hz
Window -> default Zero-padding -> 1x (change only in Step 3)
Watch the peak readout and the frequency-axis labels in panel 2 — every number you predict is printed there.
Keep the defaults: tone 1 in bin 10, N = 64, f_s = 48000 Hz. Bin k sits at k·f_s/N. Predict the Hz for bin 10, then read the peak readout.
The peak sits at k·f_s/N = 10 · 48000 / 64 = 7500 Hz — the centre frequency of bin 10.
Still the single unit-amplitude tone, sitting exactly on bin 10. The spectrum is calibrated for the window's gain, so a bin-centred unit tone reads the same height whatever window you pick. Predict the peak level in dB, then read it.
The peak reads 0 dB: a coherently-sampled unit tone puts all its energy in one bin, and the window-gain correction makes that bin read exactly 0 dB.
Set Zero-padding to 4x, so the transform length is L = N·4 = 256. Predict the new bin spacing f_s/L, then read it — and notice the resolution f_s/N = 750 Hz has not changed.
The bin spacing drops to f_s/L = 48000 / 256 = 187.5 Hz, but the resolution stays f_s/N = 750 Hz. Zero-padding interpolates between bins; it does not resolve anything finer.
Everything above is waiting in the sandbox. Add a second tone and watch two peaks, sweep a tone off a bin centre to see the leakage, change the window, and drag the zero-padding to watch the spacing shrink while the resolution holds.
- Placed a tone in bin 10 and read its frequency, k·f_s/N = 7500 Hz
- Confirmed the calibrated peak of a bin-centred unit tone reads 0 dB
- Zero-padded to 4x and watched the bin spacing shrink to 187.5 Hz while resolution held at 750 Hz
- Every value you predicted is the demo's own DFT arithmetic, not a picture