Audio signals explained with calculated, modelled examples. This page is silent by default, never requests microphone access, and never converts a digital amplitude into a sound pressure at an ear.
Browse the full contents · 20 sections
How to read the model labels
Every number, graph and spectrum on this page is calculated / modelled, not measured from hardware. The aliasing lab uses a simulated sample rate that you choose (default simulated rate: 8000 samples per second). Changing it does not change your device, your hardware converter, or your browser's actual AudioContext.sampleRate. If you choose to start the optional tone, the page displays the actual AudioContext sample rate separately, exactly as the browser reports it. No sound plays unless you press Play, and Stop silences it immediately.
A decibel never describes an amount on its own. It describes a comparison. When someone says a signal rose by 6 dB, they are saying how it changed relative to something else, not how large it is in volts, watts, pascals, or digital code values. When someone says a level is −12 dBFS or 94 dB SPL, the letters after dB name the reference that turns the comparison into a level. Lose track of the reference and the number becomes decoration: precise-looking, but meaningless. This article builds the idea slowly, from plain ratios to the three references you will meet most often in audio work, and it keeps returning to one discipline: always ask, ratio of what, to what? [S1][S4]
Start with the ratio itself. If one power is twice another, the ratio is 2. If one amplitude is half another, the ratio is 0.5. Ratios multiply as changes chain together: doubling and then doubling again gives a ratio of 4, and ten doublings give a ratio of 1024. Human work with audio routinely spans ratios of a million or more, so adding small numbers is easier than multiplying large ones. Logarithms do exactly that conversion. A base-10 logarithm turns multiplication into addition, which is why the decibel is built from log10. The bel was defined as log10 of a power ratio, and the decibel is one tenth of a bel, hence the factor of 10 in the power formula. The unit honours Alexander Graham Bell, but the mathematics matters more than the name: decibels add where ratios multiply. [S1]
Why there are two formulas: 10 log and 20 log
For powers, the definition is direct: level difference in decibels equals 10 log10(P1 / P0), where P0 is the reference power and P1 is the power being described. Doubling power gives 10 log10(2), which is about +3.01 dB. Halving power gives 10 log10(0.5), which is about −3.01 dB. A tenfold power increase is exactly +10 dB, and a hundredfold increase is exactly +20 dB. These anchor points are worth memorising because they let you sanity-check any calculator output in seconds. [S1][S4]
Amplitudes need the second formula because, in the systems where the comparison is usually made, power is proportional to the square of amplitude. Voltage across a fixed resistance, sound pressure in a fixed acoustic impedance, and the sample value of a digital sinusoid all follow this pattern when the comparison conditions are held constant. Square the amplitude ratio inside the power formula and the logarithm doubles: 10 log10((A1/A0)2) equals 20 log10(A1/A0). So amplitude ratios use 20 log10, not because there are two kinds of decibel, but because there is one definition applied to a squared quantity. Doubling amplitude therefore gives 20 log10(2), about +6.02 dB, and it also quadruples power, which checks out: 10 log10(4) is also about +6.02 dB. If your amplitude route and your power route disagree, you have mixed the formulas, and every downstream number inherits the error. [S1]
The practical rule is a single question asked before any calculation: is the number in my hand a power-like quantity or an amplitude-like quantity? Watts, milliwatts, and intensity in watts per square metre are power-like, so use 10 log. Volts, pascals of sound pressure, and dimensionless digital sample values are amplitude-like, so use 20 log. The calculator on this page keeps the two modes separate for exactly this reason. It will not guess for you, because guessing is how a factor-of-two error in decibels — which can mean a factor of hundreds in the underlying ratio when compounded — enters a budget or a mix decision unnoticed.
Worked examples you can check by hand
Example one: amplitude halved. A fader move, a gain stage, or a distance change leaves the amplitude at 0.5 times its previous value. The change is 20 log10(0.5) = −6.02 dB. The corresponding power ratio is 0.25, and 10 log10(0.25) = −6.02 dB as well. Example two: power halved. The change is 10 log10(0.5) = −3.01 dB, and the amplitude ratio that produces it is the square root of 0.5, about 0.7071. Example three: amplitude multiplied by ten. The change is +20 dB, and power has multiplied by one hundred. Example four: a ratio of 1 means no change, 0 dB, in either formula, because log10(1) is zero. Example five: a ratio of zero is a special case. Log10(0) is undefined as a finite number and tends to minus infinity, so a silent digital signal — all samples exactly zero — sits at −∞ dBFS, not at some very negative finite number and never at NaN. Tools on this page state that explicitly instead of printing a misleading figure. [S1]
A useful mental table follows. Amplitude ratios of 2, 1, 0.5, 0.1, and 0.01 correspond to about +6.02, 0, −6.02, −20, and −40 dB. Power ratios of 2, 1, 0.5, 0.1, and 0.01 correspond to about +3.01, 0, −3.01, −10, and −20 dB. Notice how the same decibel step means different ratio steps depending on which quantity you track. A statement like “down 6 dB” is complete only when the listener knows whether the speaker tracked amplitude or power — although, reassuringly, a correctly computed change in decibels is the same physical change either way, because the formulas are consistent by construction.
dBFS: decibels relative to digital full scale
In a digital system there is a largest representable magnitude. Decibels relative to full scale, written dBFS, take that maximum as the reference. For peak sample values, the level is 20 log10(|A| / Amax), so a sample at the maximum reads 0 dBFS and every smaller sample reads a negative number: half scale is about −6.02 dBFS, one tenth is −20 dBFS, and one thousandth is −60 dBFS. [S2][S5] Nothing in a fixed-point file can exceed 0 dBFS; attempting to store a larger value clips. Floating-point processing inside a program can temporarily exceed full scale without clipping at that stage, but the excess is not free headroom at the output — it must be brought back within range before fixed-point storage or conversion, or it will clip there instead.
RMS values in dBFS carry a convention trap that deserves slow reading. One convention reports the plain mathematical RMS of a waveform relative to full scale, so a full-scale sine wave, whose RMS is its peak divided by √2, reads about −3.01 dBFS RMS. Another convention, codified in AES17-style measurement practice, defines the reference so that a full-scale sine wave reads 0 dBFS RMS, which shifts RMS readings by about +3.01 dB relative to the plain convention and makes a full-scale square wave read about +3.01 dBFS RMS. [S2] Neither convention is a mistake; they are different agreements about the reference for RMS. The mistake is comparing numbers from two meters without checking which agreement each meter follows. Whenever this site reports an RMS level in dBFS, it uses the plain mathematical convention and says so: RMS amplitude divided by full-scale amplitude, then 20 log10. If you compare with another tool, check its convention before you argue with its numbers.
Headroom is simply the distance, in decibels, between a signal's level and 0 dBFS. A peak at −12 dBFS has 12 dB of peak headroom. Headroom says nothing by itself about how a recording sounds, how noisy it is, or how loud it will seem on playback. It is a statement about digital code values only. That limitation is not a flaw in dBFS; it is the definition doing its job. Problems begin only when a reader asks dBFS to answer questions it was never designed to answer — above all, questions about sound pressure at an ear.
dB SPL: a different reference, in air
Sound pressure level, written dB SPL, is an amplitude-style level for sound pressure in a physical medium, conventionally air. Its reference pressure is 20 micropascals (20 µPa, or 2 × 10−5 Pa), and the level is 20 log10(p / 20 µPa), where p is usually an RMS pressure measured over a stated time and, in many practical measurements, with a stated frequency weighting. [S4] This page states the definition because you cannot understand the counterexample in the next section without it. It does not measure SPL, it does not report SPL values for any device, and no number produced by the tools here is an SPL value. Measuring SPL requires a calibrated acoustic measurement chain — a microphone with known sensitivity, a calibrator or traceable calibration, and stated conditions. A browser tab has none of those by default.
Keep the two scales side by side and their independence becomes obvious. dBFS is anchored to a code value inside a file or device. dB SPL is anchored to a pressure in air. Between them sit a digital-to-analogue converter, an amplifier gain setting, a loudspeaker or headphone with its own sensitivity, a listening distance or coupling, and a room or ear canal. Change the volume knob and the SPL changes while every dBFS value in the file stays identical. Change the file's gain and the dBFS values change while a listener who compensates with the volume knob may end up at a similar SPL. There is no fixed conversion, no universal offset, and no honest shortcut from one scale to the other without calibration data for the specific playback chain at the specific setting in use.
The central counterexample: treating dBFS as sound pressure
Consider a claim of the form: “This tone is at −20 dBFS, so it reaches the listener at such-and-such a level in dB SPL.” The claim fails at the reference step. −20 dBFS says the sample amplitude is one tenth of digital full scale. It says nothing about volts at the converter output until a converter specification is supplied, nothing about acoustic pressure until transducer sensitivity and gain are supplied, and nothing about the pressure at an eardrum until distance, coupling, and environment are supplied. The same −20 dBFS tone can be inaudible through one playback chain at a low setting and uncomfortably strong through another chain at a high setting — this page deliberately makes no judgement about either case, because it has no calibrated measurement of either chain. The correct response to the claim is not a better guess; it is a request for the missing calibration chain. Any tool, chart, or post that converts a browser's digital amplitude directly into an ear-level pressure without that chain is inventing numbers, however confident its formatting looks.
A second, quieter counterexample concerns meters. A browser analysis display may report frequency data in decibels — for example, the Web Audio AnalyserNode method getFloatFrequencyData returns a decibel value per frequency bin, spread linearly from 0 Hz to half the context sample rate, with silence represented as −Infinity. [S6] Those decibels are relative to the analyser's internal scaling and smoothing choices, not a promise about SPL, and not even automatically the same convention as a sample-peak dBFS meter. Reading the documentation for what a given decibel display is referenced to is not pedantry; it is the whole skill this article is trying to teach, applied to a real interface you may already use.
Peak and RMS: two honest answers to different questions
Peak amplitude is the largest absolute sample value in a stated interval. It answers a clipping question: how close did the waveform come to the ceiling? RMS, root mean square, answers an energy-like question: square every sample, average the squares, and take the square root. For a sine wave, RMS equals peak divided by √2, about 0.7071 times the peak, which is −3.01 dB relative to the peak. For a square wave that sits at its extremes, RMS equals peak. For a short click in a long silence, RMS over the whole interval can be tiny while the peak is at full scale. Neither number is the “real level” in isolation. Peak without RMS hides how sustained a signal is; RMS without peak hides how close it came to clipping. Crest factor — the ratio of peak to RMS, often expressed in decibels — names the gap between them and is a compact way to describe how spiky a signal is. [S5]
Time window matters for RMS in a way beginners often miss. RMS over one cycle of a steady sine is stable. RMS over a whole song mixes verses, choruses, and silences into a single figure that describes the file as a whole but no moment within it. Short-window RMS tracks the signal's changing strength but jumps with the window choice. Whenever you read or report an RMS value, the window belongs in the same sentence: RMS over what interval, with what convention, relative to what reference? This site's examples use one full cycle or a stated block of samples, calculated — modelled, not measured from hardware — so you can reproduce them exactly.
Inter-sample peaks add one more boundary. Sample values are points on a waveform, not the whole waveform. A reconstructed analogue signal, or an oversampled view of the digital one, can peak between samples at a value higher than any stored sample. Meters that estimate that reconstructed peak are called true-peak meters, and their readings are labelled dBTP to keep them distinct from sample-peak dBFS. [S2] The distinction matters when a file that never quite reaches 0 dBFS sample peak still clips a converter or a lossy encoder downstream. For the scope of this first edition, the lesson is definitional: know whether your peak number is a sample peak or an estimated true peak before you spend your last decibel of headroom.
Boundaries, edge cases, and what decibels cannot do
Decibels compress huge ranges, but they also hide absolute size. Two signals can both be “down 6 dB” while one is a whisper-quiet digital file and the other is a full-scale master; the change is the same, the levels are not. Decibels also assume you compare like with like: the same quantity type, under conditions where the power–amplitude square relationship holds if you cross between them. Comparing voltages across very different impedances with the 20 log shortcut, without checking the power relationship, is a classic way to publish a confident wrong number. Negative ratios do not occur for magnitudes — use absolute values for amplitude and non-negative powers — and zero, as noted, maps to −∞ rather than to a finite floor. Finally, adding decibel values corresponds to multiplying ratios only when the values describe chained ratios on a consistent basis; adding two unrelated absolute levels, such as two dBFS readings, does not produce a meaningful combined level without returning to linear values, summing appropriately for the signal relationship — coherent or incoherent — and converting back.
What this framework deliberately does not do is judge hearing. This site gives no “safe volume,” no exposure guidance, and no conclusion about any listener's hearing, because those judgements require calibrated acoustic measurement and qualified guidance, neither of which a general educational page with browser tools can supply. If you need exposure or hearing answers, use calibrated measurement and appropriate professional sources. What the framework does give you is transferable: the ability to read any decibel claim, find its reference, check its formula against its quantity type, and reproduce its arithmetic. That ability survives every change of device, file format, and meter design.
How to practise, and where to go next
Practise with the calculator below. Enter an amplitude ratio of 2 and confirm +6.02 dB; switch to power mode, enter 2, and confirm +3.01 dB; then enter 0 in either mode and observe the explicit −∞ handling. Work one example backwards: −20 dB in amplitude terms is a ratio of 10−20/20 = 0.1. Then read the two guides on this page. Sampling explains where digital sample values come from and how aliasing invents frequencies that were never in the source. Phase and comb filtering explain why two copies of a signal, shifted in time, can reinforce at some frequencies and cancel at others. Both guides reuse the same habits: name the quantity, name the reference or condition, show the arithmetic, and state the boundary where the simple model stops.
Further reading, in order: the LibreTexts decibels chapter for a textbook treatment of the two formulas [S1]; the CCRMA “Specific dB Scales” notes for dBFS in context among other referenced scales [S5]; the dBFS reference summary for AES17 RMS conventions and true-peak notation [S2]; and the MDN Web Audio documentation for what browser decibel displays actually report [S6][S7]. Treat any source that states a decibel value without a reference as unfinished, including, if you ever find one, a page on this site — the reference is part of the number.
The concrete problem. A spectrum display shows a clean peak at 2000 Hz. The signal that was actually sampled contained no 2000 Hz component at all — it contained a single 6000 Hz tone, sampled at a simulated rate of 8000 samples per second. Nothing malfunctioned. The analyser did not misread the data, and the data did not contain a hidden 2000 Hz signal waiting to be uncovered. The samples of the 6000 Hz tone are, point for point, identical to samples of a 2000 Hz tone, so every correct analysis of those samples must report 2000 Hz. This article explains why that identity is unavoidable, how to predict exactly where any frequency will land after sampling, and how the frequency view — the spectrum produced by a Discrete Fourier Transform — should be read once aliasing is understood. Everything is calculated with stated, simulated sample rates; choosing a number here changes a model, never your hardware.
Background: what a sample is, and what it throws away
A continuous signal assigns a value to every instant of time. A sampled signal keeps the value at a regular grid of instants — one number every T seconds, where T = 1 / fs and fs is the sample rate — and discards everything between the grid points. That discard is the whole subject. If the original signal wiggles slowly compared with the grid spacing, the kept points trace its shape faithfully and the discarded detail is redundant. If the signal wiggles faster than the grid can follow, different continuous signals pass through exactly the same grid points, and no later processing can tell which one was present. Sampling is therefore not a degraded copy of a signal; it is an exact record of one equivalence class of signals, and the engineering question is always whether the class collapses to a single member for the signals you care about.
The Nyquist–Shannon sampling theorem states the condition under which it does: a signal containing no frequencies above B hertz is completely determined by samples spaced less than 1/(2B) seconds apart, so a sample rate fs strictly greater than 2B suffices for ideal reconstruction of that band-limited signal [S3]. Half the sample rate, fs/2, is the Nyquist frequency — the folding boundary of the sampling system. Twice a signal's bandwidth, 2B, is the Nyquist rate — a property of the signal, not the system. The guide on this page works the vocabulary and a first example step by step; this article takes the next step and treats the spectrum itself as the object of study.
The model: sampling copies the spectrum
The cleanest mental model of sampling is multiplication by an impulse train: a sequence of infinitely short spikes at each sampling instant. Multiplication in time corresponds, in the frequency domain, to the original spectrum being copied and re-centred at every multiple of the sample rate: at 0, ±fs, ±2fs, and so on, indefinitely. Reconstruction is then conceptually simple — an ideal low-pass filter keeps the copy centred at 0 and discards the rest. The theorem's condition is exactly the condition that the copies do not overlap. If the signal's highest frequency B satisfies 2B < fs, neighbouring copies are separated by a gap, the filter has something clean to select, and the original is recoverable in principle.
When the copies do overlap, the overlap region contains sums. A component at frequency f above the Nyquist frequency falls inside the baseband copy at a mirrored position, and once two spectral contributions have been added into the same samples, there is no operation — no filter, no resampling, no machine learning, no patience — that can separate them again, because the samples genuinely do not record which contributor produced which part of each value. This is the evidence behind the guide's blunt rule that anti-alias filtering must happen before sampling: prevention is the only stage at which the unwanted component still exists as a separate, removable thing.
Step by step: the folding rule
The apparent frequency of a component at true frequency f sampled at fs is the smallest value of |f − k·fs| over all integers k, which always lands in the range 0 to fs/2 [S3]. Read the rule as a walk along the frequency axis. From 0 up to fs/2, apparent equals true: the component is inside the baseband and nothing folds. From fs/2 up to fs, the apparent frequency runs backwards from fs/2 down to 0 — the spectrum mirrors at the Nyquist frequency. From fs to 3fs/2 it runs forwards again, and the mirror pattern repeats with period fs forever. Two consequences follow immediately. First, aliasing is deterministic: given f and fs, the landing position is arithmetic, not a matter of opinion or of analyser quality. Second, aliasing is many-to-one: infinitely many true frequencies — f, and every frequency that folds onto the same point — share one apparent frequency, which is why the sampled record cannot testify about which one was present.
Phase adds one subtlety worth stating once. Folding can invert the apparent phase or sign of a component depending on which mirror segment it came from, so two components that fold to the same apparent frequency may reinforce or partially cancel depending on their original phases. The frequency prediction is exact; the amplitude at the landing point depends on the vector sum of everything that landed there. A spectrum peak at an alias position is therefore evidence about the sum of contributions, never about a single source.
A complete worked example
Take a simulated sample rate fs = 16000 Hz, so the Nyquist frequency is 8000 Hz, and a signal with three sine components: 3000 Hz at amplitude 1.0, 11000 Hz at amplitude 0.6, and 19000 Hz at amplitude 0.3. Predict each landing before looking at any display. The 3000 Hz component is below 8000 Hz, so it stays at 3000 Hz with amplitude 1.0. The 11000 Hz component lies in the first mirror segment, between 8000 and 16000 Hz: |11000 − 16000| = 5000 Hz, so it appears at 5000 Hz with amplitude 0.6. The 19000 Hz component lies in the next forward segment, between 16000 and 24000 Hz: |19000 − 16000| = 3000 Hz, so it appears at 3000 Hz with amplitude 0.3 — the same bin region as the genuine 3000 Hz component. The displayed spectrum will therefore show a peak at 5000 Hz that corresponds to nothing the source contained at 5000 Hz, and a peak at 3000 Hz whose height is the phase-dependent sum of a genuine amplitude-1.0 component and an aliased amplitude-0.3 component: anywhere from 0.7 to 1.3 depending on their relative phase at the sampling instants. Every number in this paragraph is reproducible in the lab below by entering the frequencies one at a time; the lab's readout applies exactly the smallest-|f − k·fs| rule and its DFT display confirms the landing bin.
Now change one number: raise the simulated rate to 48000 Hz. The Nyquist frequency becomes 24000 Hz, all three components (3000, 11000, 19000 Hz) sit below it, no copies overlap for these components, and the spectrum shows three peaks at their true frequencies with their true amplitudes. Nothing about the signal changed — only the grid. That contrast is the practical content of the sampling theorem: aliasing is a relationship between a signal and a rate, never a property of the signal alone.
The frequency view: reading a DFT without fooling yourself
The Discrete Fourier Transform of a block of N samples taken at rate fs reports components at bin frequencies k·fs/N for k = 0 … N/2, so the bin spacing is fs/N hertz. Three reading rules follow. First, a peak's bin is the nearest grid point, not a measurement of infinite precision: with N = 256 at a simulated 44100 Hz, bins sit 172.27 Hz apart, and a 1000 Hz tone's largest bin is bin 6 at 1033.6 Hz — the display is honest, the grid is coarse. Second, a component that falls between bins spreads energy into neighbouring bins, an effect called spectral leakage, whose shape is governed by the window function applied before the transform; the window guide on this page treats that trade-off in full. Third, the time–frequency bargain is unavoidable: finer bin spacing requires a longer block, and a longer block averages over a longer stretch of the signal's life, so a spectrum is always a statement about an interval, never about an instant.
Aliasing and the DFT interact in one more way that repays attention. The DFT of sampled data can only ever report frequencies in the baseband 0 to fs/2, because that is all the samples can represent. It will never flag a peak as "possibly an alias" — from the samples alone, an alias and a genuine component are the same object. The only alias detection available is external knowledge: you know the source could contain energy above the Nyquist frequency, or you change the sample rate and watch which peaks move. That second test is decisive and cheap in a model: genuine baseband components stay put when fs changes, while aliases move to a new landing computed by the same folding rule. If a peak moves when only the rate changes, it was never at the frequency the first display claimed.
Counterexample and alternative explanation
The tempting alternative explanation of the opening problem is that the analyser, the DFT length, or the window "caused" the 2000 Hz peak, and that a better tool would have shown the truth. The counterexample is constructive: write down the samples. At fs = 8000 Hz, a 6000 Hz sine sampled at n/8000 seconds takes values sin(2π·6000·n/8000) = sin(1.5πn), and a 2000 Hz sine takes values sin(0.5πn) = −sin(1.5πn) at integer n — the same magnitudes in the same order, differing at most by an overall sign. Two data files that agree sample for sample cannot yield different spectra under any correct analysis, so the 2000 Hz report is not an artefact of the tool; it is the only answer the data supports. The failure happened earlier, at the sampling instant, when the grid was chosen too coarse for the content presented to it. Blaming the display is not just unfair — it sends the fix to the wrong stage of the chain.
A second alternative explanation deserves a fair hearing: perhaps the peak is a harmonic or an intermodulation product generated by some nonlinearity. That is a real phenomenon in real chains, and the way to distinguish it is the rate-change test above plus an amplitude test: distortion products of a 6000 Hz tone sit at multiples or combinations of frequencies actually present and their levels track the fundamental's level nonlinearly, whereas an alias sits exactly where the folding rule predicts and moves exactly as the rule predicts when fs changes. In the calculated world of this page there is no nonlinearity in the model at all, yet the peak appears — proof that folding alone is sufficient to explain it.
Boundaries of the model
The theorem assumes a perfectly band-limited signal, ideal sampling instants, and an ideal reconstruction filter. Real signals are not perfectly band-limited, real filters transition over a band rather than at a wall, real clocks jitter, and real quantisers round each sample to a finite grid — a separate error mechanism, treated in the reference entries on quantisation and dither, which adds noise-like error but does not move frequencies. Practical design therefore keeps wanted content comfortably below the Nyquist frequency, with a guard band sized to the anti-alias filter's transition width. None of this softens the folding rule itself, which is exact arithmetic for the ideal sampler and the correct first approximation everywhere else. Finally, the boundary this site never crosses: all rates here are simulated unless a tool explicitly reports your browser's actual AudioContext.sampleRate, and no spectrum on this page is a measurement of any physical sound.
Further reading
Start with the sampling theorem statement and its conditions [S3], then the step-by-step guide on this page for the vocabulary of Nyquist frequency versus Nyquist rate. The CCRMA spectral analysis notes [S10] develop windows, leakage, and zero padding with the same calculate-everything discipline used here. For the browser side, MDN's AnalyserNode documentation [S6] states exactly what a common in-browser spectrum display reports — a decibel value per bin, spread linearly from 0 to half the context sample rate — which is a useful reminder that every frequency view has a stated grid, a stated window, and a stated normalisation, or it is not finished.
The concrete problem. Two copies of the same 1000 Hz sine wave, each of amplitude 1, are added together. Depending on one number — the phase difference between them — the result can have amplitude 2, amplitude 0, or anything in between. No gain control moved, no filter was applied, and neither copy changed. The only difference is alignment in time. This article builds the complete picture: what phase is, how a delay manufactures a frequency-dependent phase shift, why addition then reinforces some frequencies and cancels others (the comb pattern), and where the clean two-copy model stops describing real multi-path situations. Every claim is calculated from the addition rule for sinusoids; the phase lab on this page lets you reproduce each number.
Background: cycles, degrees, and the reference instant
A sinusoid repeats every period T = 1/f seconds. Phase names a position within that cycle: 0° at a rising zero crossing by the convention used here, 90° at the positive peak, 180° at the falling zero crossing, 270° at the negative peak, and 360° back at the start. Phase is only meaningful relative to something — a reference instant, a reference signal, or a stated convention — because sliding the time origin slides every phase by the same amount while changing nothing physical. What survives any choice of origin, and what all the results below depend on, is the phase difference between two signals of the same frequency. A phase difference is also what a time delay produces, which is the bridge between this article and the guide's comb-filter treatment: a delay Δt at frequency f is a phase difference of 360° × f × Δt, so a fixed delay is a small phase difference at low frequencies and many whole cycles plus a remainder at high frequencies.
The model: adding sinusoids of the same frequency
Addition of sampled signals is pointwise: each output sample is the sum of the input samples at that instant. For two same-frequency sinusoids of amplitudes A1 and A2 with phase difference φ, the sum is a single sinusoid of the same frequency whose amplitude is √ (A1² + A2² + 2·A1·A2·cos φ). This is the law of cosines wearing a signal-processing coat: each sinusoid behaves like a rotating vector (a phasor), and the sum's amplitude is the length of the vector sum. Check the corners. φ = 0°: cos φ = 1 and the amplitude is A1 + A2 — full reinforcement. φ = 180°: cos φ = −1 and the amplitude is |A1 − A2| — maximal cancellation, reaching exactly zero when the amplitudes are equal. φ = 90°: cos φ = 0 and the amplitude is √(A1² + A2²) — for equal amplitudes, √2·A, the quadrature case. The formula is exact for steady sinusoids, and the phase lab on this page evaluates it live alongside a drawn waveform so the algebra and the picture can be checked against each other.
Two different frequencies, by contrast, do not settle into a single sinusoid: their phase difference drifts continuously, the sum's envelope waxes and wanes, and the spectrum simply contains both components. Interference in the strong sense of this article — stable reinforcement and cancellation at a frequency — is a same-frequency phenomenon, which is why a delay, acting on a signal containing many frequencies, produces a different verdict at each frequency rather than a single overall effect.
Step by step: from delay to comb
Step 1: fix a delay Δt and add a signal to its delayed copy at equal amplitude. Step 2: at any frequency f, the copy's phase difference is φ = 360° × f × Δt. Step 3: whenever f × Δt is a whole number, φ is a whole number of cycles — the copy is in phase and that component doubles, +6.02 dB. Step 4: whenever f × Δt is a whole number plus one half, φ is an odd multiple of 180° — the copy is in antiphase and that component cancels, ideally completely. Step 5: read off the pattern — peaks at f = n/Δt, notches at f = (n + 0.5)/Δt, with uniform spacing 1/Δt between neighbouring peaks. Plotted against frequency the response alternates peak, notch, peak, notch like the teeth of a comb: comb filtering. The guide on this page works a 1 ms example in full; the new step here is to see the comb not as a filter someone designed but as the addition formula evaluated at many frequencies at once — one mechanism, many verdicts.
A complete worked example
Let a signal be added to its copy delayed by Δt = 0.25 ms (0.00025 s), at equal amplitude. The peak spacing is 1/Δt = 4000 Hz, so peaks sit at 0, 4000, 8000 Hz and notches at 2000, 6000, 10000 Hz. Now evaluate three specific components with the addition formula. At 1000 Hz: φ = 360 × 1000 × 0.00025 = 90°, so the summed amplitude is √2·A ≈ 1.414A, which is +3.01 dB relative to one copy alone. At 2000 Hz: φ = 180°, the summed amplitude is 0 — a complete notch for that component, −∞ dB in the ideal model. At 3000 Hz: φ = 270°, cos φ = 0 again, so the amplitude is √2·A, +3.01 dB — note that 270° is quadrature just as 90° is, because what matters is cos φ. At 4000 Hz: φ = 360°, a full cycle, amplitude 2A, +6.02 dB. One delay, four frequencies, four different outcomes — 0, +3.01, +3.01, +6.02 dB — all from a single cosine. If instead the delayed copy arrives at half amplitude (0.5A, −6.02 dB), the same delay gives a 2000 Hz sum of A − 0.5A = 0.5A (−6.02 dB relative to A): the notch survives but is only 6.02 dB deep instead of infinitely deep, while the 4000 Hz peak becomes 1.5A (+3.52 dB). Unequal amplitudes compress the whole comb toward the stronger signal's level, a fact the recognition guide on this page uses in reverse to estimate level differences from measured notch depth.
Delay is not phase shift: the group-delay boundary
A true time delay shifts every frequency by the same time, hence by a phase proportional to frequency. A generic phase shifter need not: it can impose any phase-versus-frequency curve, and only the slope of that curve corresponds to a delay-like behaviour. The precise notion is group delay, defined as the negative derivative of phase with respect to angular frequency, −dφ/dω, which gives the delay experienced by a narrowband group of frequencies around each point of the spectrum. For a pure delay, group delay is the constant Δt everywhere. For real filters and real acoustic paths it varies with frequency, which is one reason real summed responses show irregular combs rather than the perfectly periodic pattern of the worked example: each frequency region effectively experiences a slightly different Δt, so the teeth wander. When a measured response's notch spacing is not constant, the correct conclusion is not that the addition formula failed; it is that the single-constant-delay model has reached its boundary and a frequency-dependent delay is needed.
A second worked example: unequal copies
Real addition rarely involves equal copies, so run the same machinery with a delayed copy at 0.8 of the direct amplitude and a delay of Δt = 0.5 ms. The spacing is 1/Δt = 2000 Hz: peaks at 0, 2000, 4000 Hz, notches at 1000, 3000, 5000 Hz. At a peak the sum is (1 + 0.8)A = 1.8A, which is 20 log10(1.8) ≈ +5.11 dB relative to the direct signal alone. At a notch the sum is (1 − 0.8)A = 0.2A, which is 20 log10(0.2) ≈ −13.98 dB. The full peak-to-notch swing is therefore about 19.1 dB — large, clearly visible, and still infinitely far from the complete cancellation of the equal-amplitude case. Now evaluate one in-between frequency, 500 Hz: the phase difference is 360 × 500 × 0.0005 = 90°, so cos φ = 0 and the summed amplitude is √(1 + 0.64) = √1.64 ≈ 1.28A, about +2.15 dB. Notice what the example teaches: with unequal copies, the quadrature frequencies no longer give the tidy √2 of the equal case, because the cross term vanishes but the two squared terms no longer match. Every number still comes from the same single formula — amplitude ratio and phase difference in, summed amplitude out — which is why the phase lab accepts any ratio from 0 to 2 rather than only the symmetrical cases.
The example also exposes a measurement subtlety. Suppose you observe only the notch depth, −13.98 dB relative to the direct signal, and want the ratio. The notch gives |1 − r| = 0.2, which has two solutions, r = 0.8 and r = 1.2: a slightly weaker copy and a slightly stronger copy produce the same notch. The peak resolves the ambiguity — (1 + r) is 1.8 in the first case and 2.2 in the second — so a careful reading uses peaks and notches together. Interference data is generous, but only to readers who collect the whole pattern instead of a single dramatic dip.
Phase in the frequency view
Every DFT bin carries two numbers, not one: a magnitude and a phase. Most spectrum displays draw only the magnitude, which is why two signals can share an identical-looking spectrum while differing completely in time — a signal and its delayed copy are the standard example, since delay changes every bin's phase by an amount proportional to frequency while leaving every magnitude untouched. Discarding phase is a legitimate display choice, but it should be a conscious one: any question involving timing, addition, or cancellation lives in the discarded half of the data. Conversely, when a magnitude display does change after a delay is introduced, something else must have changed too — a second path was added, a level moved, a filter entered — because delay alone cannot do it. That single inference, applied calmly, prevents a large family of misdiagnoses.
Counterexample and alternative explanation
Consider a measured response with a dip at 2000 Hz, and the claim that a delayed copy must be responsible. The comb model makes falsifiable predictions: a single delay producing a notch at 2000 Hz has Δt = 0.25 ms (first notch at (0 + 0.5)/Δt) and must also produce notches at 6000 and 10000 Hz and peaks at 0, 4000, 8000 Hz, all at predictable depths set by the level ratio. If the response shows the 2000 Hz dip but flat behaviour at 4000 and 6000 Hz, the single-delay explanation fails its own predictions, and an alternative — a resonance, a filter in one path, a band-limited reflection that never carried the higher frequencies — fits better. This is the general discipline: interference explanations are strong exactly because they predict a whole family of features from one parameter. Accept them when the family appears; reject them when only the convenient member appears.
The opposite error also occurs: attributing a genuine comb to "the room" or "the equipment" as an unexplained character. If notches are evenly spaced in frequency, the spacing alone hands you the delay — Δt = 1/(spacing) — and the notch depth hands you the level ratio, as the recognition guide shows. A pattern that regular is a signature, not a mystery.
Boundaries of the model
The addition formula assumes steady sinusoids, a linear system (outputs add without generating new frequencies), and a fixed phase difference. Real signals start, stop, and change; during transients the steady-state verdict does not yet apply. Real paths add frequency-dependent level changes on top of delay, multiple delayed copies at once (which superpose several combs), and, in acoustic settings, geometry that makes the delay depend on position — move the observation point and the whole comb slides. Nonlinear stages break the model differently, by creating components at new frequencies that then interfere on their own terms. None of this rescues vague talk about phase: in every extension, the work is still to name each copy, its delay, and its level, frequency by frequency. And the standing boundary of this site applies unchanged — everything here is calculated addition of modelled signals; no claim is made about what any listener hears, prefers, or should do about it.
Further reading
The guide on this page, Phase, Delay and Comb Filtering, is the short version of this article and a good first pass. The reference entries on phase, group delay, coherent addition, and comb-related questions below give the vocabulary in small pieces. For a textbook treatment of phasor addition and group delay, any standard signals-and-systems text's chapter on Fourier analysis applies; the window and spectrum-reading skills from the sampling article are the natural companion, because a comb response is most often met as a picture in a frequency view — and now you know how to read one, and what would prove the reading wrong.
Sampling and Aliasing, Step by Step
Sampling turns a continuously varying signal into a sequence of numbers, one number per sampling instant. The sampling rate, written fs and measured in samples per second (hertz), is how often those instants occur. The sampling period is T = 1 / fs. Everything in this guide is calculated with a stated, simulated sampling rate for illustration. Choosing a number in the experiment below does not change your hardware, your browser's AudioContext rate, or any real converter — it changes only the model. That separation is the first step to understanding the subject honestly. [S3]
Step 1 — State the condition. The Nyquist–Shannon sampling theorem says that a signal containing no frequencies above B hertz can be completely determined from samples spaced less than 1/(2B) seconds apart — equivalently, a sampling rate fs greater than 2B is sufficient for perfect reconstruction of that band-limited signal under ideal conditions. [S3] The quantity fs/2 is called the Nyquist frequency: the highest frequency this sampling rate can represent unambiguously. The quantity 2B is called the Nyquist rate for that signal. Keep the two terms apart; swapping them is the most common vocabulary error in the whole topic. Note the strictness at the edge: content exactly at fs/2 is phase-sensitive — a cosine there can sample as alternating extremes while a sine of the same frequency and amplitude can sample as all zeros — so practical systems keep wanted content comfortably below the Nyquist frequency and filter before sampling.
Step 2 — See why sampling copies the spectrum. Sampling can be modelled as multiplying the signal by a regular train of impulses. In frequency, that operation copies the original spectrum to every multiple of fs: centred at 0, ±fs, ±2fs, and so on. If the copies do not overlap, an ideal low-pass filter can select the original copy and discard the rest, which is the reconstruction the theorem promises. If the copies do overlap, the overlapping region contains sums that cannot be separated afterwards. No later filtering, resampling, or clever processing can un-mix them, because the information distinguishing the contributors was lost at the sampling instant. This is why anti-alias filtering, when it is needed, must happen before sampling, in the analogue or higher-rate domain — after sampling is too late.
Step 3 — Work an aliasing example. Take a simulated sampling rate fs = 8000 Hz, so the Nyquist frequency is 4000 Hz. Present a 6000 Hz sinusoid. It exceeds the limit, so it folds. The apparent (alias) frequency is the smallest value of |f − k·fs| over integers k. With k = 1: |6000 − 8000| = 2000 Hz, which lies inside 0 to 4000 Hz. The samples of the 6000 Hz tone coincide with samples of a 2000 Hz tone (with a possible sign or phase difference depending on waveform phase), so any analysis of the samples alone reports 2000 Hz. The model did not make an arithmetic error; 2000 Hz is genuinely what the sampled data represents. Try it in the lab below: set frequency 6000 and simulated rate 8000 and read both the time-domain sample points and the spectrum together.
Step 4 — Check a case that does not alias. With fs = 44100 Hz, the Nyquist frequency is 22050 Hz. A 1000 Hz tone sits far below it, the spectral copies do not overlap for that component, and the apparent frequency equals the true frequency: 1000 Hz. The DFT display in the lab should place its peak at the 1000 Hz bin (within the bin spacing set by the DFT length). “No aliasing” does not mean “perfect in every respect” — quantisation, jitter, filtering, and finite observation windows still matter in real systems — it means only that this particular failure, frequency folding, does not occur for content that satisfies the condition.
Step 5 — Predict before you peek. The folding pattern is a mirror. As a true frequency rises from 0 toward fs/2, the apparent frequency rises with it. From fs/2 toward fs, the apparent frequency falls back toward 0. From fs upward the pattern repeats. So at fs = 8000 Hz: 5000 Hz appears at 3000 Hz, 7000 Hz appears at 1000 Hz, 8000 Hz appears at 0 Hz (a constant, phase-dependent value), and 9000 Hz appears at 1000 Hz again. Writing a prediction table like this before opening a spectrum display is the fastest way to build intuition, and the lab below grades your predictions instantly. Remember also that real signals contain many frequencies at once: every component above the Nyquist frequency folds independently, so a rich out-of-band signal can scatter false components across the whole baseband.
Boundaries. The theorem assumes a band-limited signal and ideal sampling. Real signals are never perfectly band-limited, real filters roll off over a transition band rather than at a wall, and real converters add their own imperfections. Engineering practice therefore leaves a guard band between the highest wanted frequency and the Nyquist frequency. None of that weakens the theorem; it defines the gap between a sufficient mathematical condition and a robust product design. Your next step is the lab: vary one number at a time, predict the apparent frequency with |f − k·fs| first, and only then look at the spectrum.
Phase, Delay and Comb Filtering
Phase describes where a periodic signal is in its cycle at a reference instant, usually expressed in degrees or radians: a full cycle is 360° or 2π radians. Delay describes a shift in time. The two are linked for a sinusoid by a simple relation: a delay of Δt seconds at frequency f hertz is a phase shift of 360° × f × Δt. That single equation explains why a fixed delay is a small phase shift at low frequencies and many full cycles at high frequencies — and why adding a signal to a delayed copy of itself treats every frequency differently. Everything here is calculated from that model; no listening judgement is needed or offered.
Adding two signals. When two signals are added, sample by sample, the result at each instant is the plain sum. Take two sinusoids of the same frequency and equal amplitude A. If they are in phase (phase difference 0°), peaks meet peaks and the sum has amplitude 2A. If they are exactly out of phase (phase difference 180°), peaks meet troughs and the sum is zero at every instant: two equal-amplitude, exactly opposite-phase sinusoids cancel completely. At 90° the sum has amplitude √2 × A, because the components are in quadrature. At a general phase difference φ, the summed amplitude is 2A·|cos(φ/2)|. Check the endpoints: φ = 0 gives 2A, φ = 180° gives 0. This is linear addition, not a trick — and the complete-cancellation case is a calculation you can verify in the question-and-answer section below.
From phase to comb filtering. Now replace the fixed phase shifter with a fixed delay. Add a signal to its own copy delayed by Δt. At frequencies where f × Δt is a whole number, the delayed copy is in phase and the sum doubles (+6.02 dB for that component). At frequencies where f × Δt is a whole number plus one half, the copy is out of phase and the sum cancels (a notch, ideally to −∞ dB for that exact component). Peaks therefore sit at f = n / Δt and notches at f = (n + 0.5) / Δt, for n = 0, 1, 2, … Plotted against frequency, the response looks like the teeth of a comb, which is why the effect is called comb filtering. The spacing between neighbouring peaks (and between neighbouring notches) is 1 / Δt hertz.
A numerical example. Let the delay be Δt = 1 millisecond (0.001 s). Then 1 / Δt = 1000 Hz. Peaks occur at 0, 1000, 2000, 3000 Hz and so on. Notches occur at 500, 1500, 2500 Hz and so on. A 500 Hz component delayed by 1 ms is shifted by 360° × 500 × 0.001 = 180°, so it cancels. A 1000 Hz component is shifted by 360°, a full cycle, so it reinforces. Halve the delay to 0.5 ms and everything spreads out: peaks at multiples of 2000 Hz, notches at 1000, 3000, 5000 Hz. Double the delay to 2 ms and everything squeezes: peaks every 500 Hz, notches at 250, 750, 1250 Hz. Short delays put wide-spaced, broad features in the audible spectrum calculation; long delays put many narrow features close together. The arithmetic is identical either way — only 1 / Δt changes.
Unequal amplitudes and real paths. Complete cancellation needs equal amplitudes at the point of addition. If the delayed copy is quieter — say half the amplitude (−6.02 dB) — the notch no longer reaches zero. At the notch frequency the sum is A − 0.5A = 0.5A, which is −6.02 dB relative to A, while at a peak the sum is 1.5A, about +3.52 dB relative to A. The comb is still there, but its teeth are shallower: roughly 9.5 dB from peak to notch in this example instead of an infinite depth. Real acoustic reflections, real electronic paths, and real room responses almost always involve unequal levels, multiple delays at once, and frequency-dependent losses, so real responses show families of irregular peaks and dips rather than one perfect comb. The single-delay, equal-amplitude model is the clean limiting case that makes the pattern legible — learn it first, then expect messier versions of it.
What to take away. Phase is not an abstract decoration on a waveform; with delay, it decides frequency-by-frequency whether addition reinforces or cancels. Before analysing any “mystery dip” in a measured or calculated response, ask three questions. Is there a second path or copy of the signal? What is its delay relative to the first? What is its level relative to the first? The peak and notch formulas, f = n / Δt and f = (n + 0.5) / Δt, will then predict where trouble should appear, and a mismatch between prediction and observation tells you the model — a single delay — is too simple for that case. That is a productive failure: it points at multiple paths, filtering in one path, or a delay that is not constant with frequency.
Choosing a Window Function
The question. Your spectrum of a steady tone shows either a tall thin spike with ripples across the whole display, or a shorter, wider hump with a clean floor — depending on a setting labelled "window". Which setting should you choose, and what does each choice cost? A window function is a shaped weighting multiplied by the sample block before the DFT. It exists because a DFT block is finite: the transform treats the block as one period of an endless repeating signal, so any mismatch between the block's first and last samples becomes a sharp edge, and sharp edges spread energy across all bins — spectral leakage. Tapering the block's ends toward zero softens that edge at a price. Choosing a window is choosing which price to pay.
The three currencies. Every window trades among three quantities. (1) Main-lobe width: how many bins a single pure tone occupies around its peak. A wider main lobe merges two close tones into one hump. (2) Side-lobe level and falloff: how much of a strong tone's energy leaks into distant bins, where it can bury a weak neighbour. (3) Scalloping loss and amplitude accuracy: how much the peak reading drops when the tone falls exactly between bins, and whether a known correction factor exists. Published figures for the classic windows (Harris, 1978 [S9]) make the trade concrete: the rectangular window (no taper) has the narrowest main lobe but side lobes only about −13 dB down and a worst-case scalloping loss of about 3.92 dB; Hann has side lobes near −31 dB, scalloping loss about 1.42 dB, and a main lobe twice as wide; Hamming sits between, with side lobes near −43 dB but slower far falloff than Hann.
Amplitude bookkeeping. A tapered window reduces the block's average weight, so raw DFT magnitudes shrink by the window's coherent gain — the mean of the window values. For Hann that mean is exactly 0.5, so a correctly normalised display multiplies magnitudes by 2 to recover true sine amplitudes; for Hamming the gain is about 0.54; for rectangular it is 1. If a spectrum display does not state its window and its correction, its amplitude numbers are unfinished — the same discipline as a decibel without a reference. Noise measurements need a different correction again (the window's equivalent noise bandwidth, 1.5 bins for Hann, 1.0 for rectangular), which is why a noise floor reading and a tone reading from the same display can legitimately use different scale factors.
A decision procedure. Ask what the display must decide. Separating two close tones of similar level: favour a narrow main lobe — rectangular if the tones are strong and the block is long, Hann as the safer default. Finding a weak tone near a strong one: favour low side lobes and fast falloff — Hann, or a dedicated high-dynamic-range window if your tool offers one. Measuring one tone's amplitude accurately: favour low scalloping loss plus the correct coherent-gain correction — Hann with its factor of 2 is the common, checkable choice. Surveying an unknown signal: start with Hann; it is the balanced default precisely because its worst case in each currency is moderate. Whatever you choose, record the window, the block length, and the normalisation next to the result — the lab on this page states all three for exactly this reason.
Boundary. No window creates information. A window redistributes the evidence in a fixed block of samples among the three currencies above; it cannot separate tones closer than the block length allows, and it cannot repair aliasing, which happened before the block existed. If two tones must be resolved and the window choice is agonising, the real fix is a longer block, not a cleverer taper.
Choosing an FFT Length
The question. The same signal, analysed at FFT lengths 256 and 4096, gives two different-looking spectra: one coarse and stable, one finely detailed but slower to react. Which length is right? The DFT of N samples at rate fs places bins every fs/N hertz and observes N/fs seconds of signal. Length is therefore a single dial controlling two coupled quantities: frequency spacing and observation duration. Choosing it well means deciding which of those two your question actually needs.
The arithmetic, at a simulated 44100 Hz. N = 256: bin spacing 44100/256 ≈ 172.27 Hz, block duration 256/44100 ≈ 5.8 ms. N = 1024: spacing ≈ 43.07 Hz, duration ≈ 23.2 ms. N = 4096: spacing ≈ 10.77 Hz, duration ≈ 92.9 ms. N = 16384: spacing ≈ 2.69 Hz, duration ≈ 371.5 ms. Read the table both ways. Finer spacing is bought only with longer observation; there is no setting that yields 2.69 Hz spacing from 6 ms of signal, because the information distinguishing two tones 3 Hz apart accumulates over a substantial fraction of a second of their relative phase drift.
Resolution is not spacing. Bin spacing is the grid; resolution is the ability to show two tones as two peaks, and it is set by the window's main-lobe width measured in bins. With a Hann window (main lobe about 4 bins wide null-to-null), two tones need roughly 4 × (fs/N) hertz of separation to appear as distinct peaks. Worked check: tones at 1000 and 1100 Hz (100 Hz apart) at 44100 Hz. With N = 256, spacing is 172 Hz — the tones fall inside one main lobe and merge. With N = 4096, spacing is 10.77 Hz, the Hann main lobe spans about 43 Hz, and 100 Hz of separation resolves cleanly. Zero padding — appending zeros to lengthen the DFT — interpolates the existing spectrum onto a finer grid and can make a single peak's position easier to read, but it adds no new evidence and does not improve this two-tone resolution at all [S10].
The time side of the bargain. A long block averages everything inside it. A tone that starts halfway through a 371 ms block appears at reduced amplitude, smeared with the silence before it; a short transient contributes its energy spread thinly across the whole block's spectrum. If the question is "what frequencies are present in this steady passage", long is good. If the question is "when did the character change", long is bad, and the standard answer is a shorter block advanced in overlapping steps — many spectra over time rather than one spectrum over all time. Overlap does not change the per-block trade-off; it only samples the sequence of spectra more densely.
A decision procedure. (1) Name the smallest frequency separation that must be resolved, call it Δf. (2) With your window's main-lobe width W bins, require N ≥ W × fs/Δf, then round up to a convenient length. (3) Check the duration N/fs against the signal: the content must stay roughly steady for that long, or the spectrum describes a mixture. (4) If both demands cannot be met at one rate, that is a fact about the signal and the rate, not a settings failure — say so in the report. The lab on this page fixes N = 256 and states it, which is why its readouts always quote the 172.27 Hz-style spacing for the chosen simulated rate rather than pretending to pinpoint precision.
Boundary. Longer is not "more accurate" in general; it is finer in frequency and coarser in time, simultaneously. And no length repairs aliasing: bins only ever span 0 to fs/2, whatever N you choose.
Converting Between dBFS Readings
The question. One meter says a file's level is −15.01 dBFS, another says −12 dBFS, and a third mentions +3.01 — and all three are describing the same full-scale sine wave. Converting between dBFS readings is not unit conversion like metres to feet; it is convention translation. This guide gives the three conversions that account for nearly every disagreement: peak to RMS for a known waveform, plain RMS to AES17 RMS, and sample peak to true peak — plus the one conversion that does not exist, to sound pressure at an ear.
Peak ↔ RMS for a known waveform. The gap between a waveform's peak and its RMS is its crest factor, a property of the waveform's shape. Sine: RMS = peak/√2, so RMS in dBFS is the peak reading minus 3.01 dB. A full-scale sine peaking at 0 dBFS has plain RMS −3.01 dBFS; a sine peaking at −12 dBFS has plain RMS −15.01 dBFS. Square wave at its extremes: RMS = peak, difference 0 dB. Triangle and sawtooth: RMS = peak/√3 ≈ 0.5774 × peak, difference about −4.77 dB. These conversions are exact only when the waveform really is the named shape over the stated interval; for music or speech there is no fixed peak-to-RMS conversion, only a measurement over a stated window.
Plain RMS ↔ AES17 RMS. The AES17 measurement convention defines its reference so that a full-scale sine wave reads 0 dBFS RMS. The plain mathematical convention reads that same sine as −3.01 dBFS RMS. The conversion is therefore a constant shift: AES17 reading = plain reading + 3.01 dB, for any waveform, because only the reference moved. Worked check with the square wave above: a full-scale square has plain RMS 0 dBFS, so it reads +3.01 dBFS on an AES17-convention meter — a positive RMS level that startles people meeting the convention for the first time, and is correct within it. Before arguing with any RMS figure, ask which convention produced it; a 3.01 dB disagreement with no other difference is the fingerprint of this one.
Sample peak ↔ true peak. Sample peak is the largest stored sample magnitude, in dBFS. True peak, in dBTP, estimates the peak of the reconstructed waveform between samples, typically by oversampling. True peak is greater than or equal to sample peak for the same signal, and the gap is signal-dependent — there is no constant conversion. A file at −0.3 dBFS sample peak can exceed 0 dBTP; the only honest conversion is to measure with a true-peak meter and report which quantity you are quoting.
What does not convert. dBFS of any flavour — peak, RMS, plain, AES17, true peak — describes code values relative to digital full scale. None of them converts to decibels of sound pressure at a listener's ear, because converter output level, amplifier gain, transducer sensitivity, and distance or coupling intervene, all unspecified by the file. Any chart offering a fixed dBFS-to-ear offset has silently assumed a whole playback chain. This site states the SPL definition for completeness in the feature article and never performs that conversion.
A fourth trap: combined levels do not convert at all. Two files reading −12 dBFS and −12 dBFS do not combine into a −9 or a −6 dBFS result by any conversion table. Combination happens in the linear domain, and the answer depends on the signals' phase relationship: coherent in-phase addition of two equal amplitudes gives +6.02 dB, incoherent addition gives +3.01 dB, and antiphase gives silence. Any workflow that needs a combined figure must return to linear values, add appropriately for the relationship, and convert back — the dBFS conversion guide can translate conventions, but it cannot substitute for that addition.
A reporting habit that prevents all of this. Quote every level as four fields: value, quantity (peak / RMS / true peak), convention (plain or AES17 for RMS), and interval (whole file, one cycle, a stated window). "−15.01 dBFS, RMS, plain convention, whole file" cannot be misunderstood; "−15 dB" can be misunderstood in at least four ways, three of which this guide just enumerated.
Choosing a Sample Rate
The question. A recorder or a model offers 8000, 16000, 44100, 48000, or 96000 samples per second. Higher costs more storage, more computation, and wider-bandwidth everything. What does the choice actually buy, and how low can you go? The sample rate sets exactly one hard boundary — the Nyquist frequency fs/2, above which content folds into the baseband as aliases — and a set of softer margins around it. Choosing a rate is sizing those margins for the content you intend to keep.
Step 1: name the highest frequency you must keep. Call it B. The theorem's floor is fs > 2B, but that floor assumes a perfectly band-limited signal and an ideal filter. Real anti-alias filters need a transition band between "kept" and "rejected", so the working rule is fs = 2B plus a guard band wide enough for the filter you actually have. If B = 8000 Hz must be kept and the filter transitions over roughly an octave of model margin, 44100 Hz (Nyquist 22050 Hz) is roomy while 16000 Hz (Nyquist exactly 8000 Hz) leaves no transition room at all — content exactly at the Nyquist frequency is phase-sensitive and can sample as anything from full amplitude to zeros depending on phase, as the experiments section demonstrates.
Step 2: inventory what lives above B. Aliasing folds out-of-band energy into the baseband; it does not politely discard it. A rate is only safe if the signal presented to the sampler is band-limited, by the source itself or by an anti-alias filter before the sampler. Ultrasonic content, switching noise, and strong high harmonics are all candidates to fold down. Choosing a higher rate moves the folding boundary up — 48000 Hz pushes it to 24000 Hz, 96000 Hz to 48000 Hz — which relaxes the filter's job but never removes it: something above any finite Nyquist frequency can still fold.
Step 3: count the real costs. Doubling the rate doubles stored samples per second and roughly doubles per-sample processing, and it doubles the span your analysis windows must cover for the same frequency resolution (bin spacing is fs/N, so N must double to hold spacing constant). What it does not do is improve the representation of content already far below the Nyquist frequency in any automatic way: a 1000 Hz tone at 44100 Hz and at 96000 Hz is the same tone on a finer grid, with identical aliasing status (none) and identical theoretical recoverability. Spend rate on bandwidth and filter margin, not on reassurance.
Step 4: match the chain. A rate chosen at capture follows the material through editing, analysis, and delivery. Mismatched rates force resampling, which is itself a filtering operation with its own transition band and its own opportunity to fold content if done carelessly. Where a delivery rate is fixed by the destination (for example 44100 or 48000 Hz in common audio practice), capturing at that rate, or at an exact integer multiple of it with a proper decimation filter, keeps the chain simple. The common pair 44100/48000 differ by a non-integer ratio, which is why converting between them is a real computation rather than a decimation.
A note on multiples. When material captured at a high rate must be delivered at a lower one, exact integer ratios (96000 to 48000, 88200 to 44100) allow decimation — filter, then keep every second sample — which is the cleanest form of rate conversion. Non-integer conversions interpolate instead, and their quality rests entirely on the interpolation filter. Prefer planning the pair of rates together over repairing an awkward ratio later.
Boundary. Every rate in this guide is a model parameter. In the browser tools here, the lab's rate is explicitly simulated and labelled, while actual playback, if you start it, uses your browser's real AudioContext.sampleRate, displayed separately. No choice on this page changes your hardware, and a higher simulated rate in the lab changes nothing except the model's folding boundary — which is, of course, exactly the lesson.
Recognising Comb Filtering in a Response
The question. A calculated or measured frequency response shows a repeating pattern of peaks and dips. Is it comb filtering — a signal added to a delayed copy of itself — or something else? Comb filtering has an unusually specific fingerprint, and this guide turns it into a checklist: even spacing, a first notch at half the spacing, and depths that encode the level ratio of the two paths. If all three check out, one delay and one ratio explain the entire pattern; if any fails, look elsewhere.
Check 1: spacing. For a single delay Δt, peaks sit at f = n/Δt and notches at f = (n + 0.5)/Δt, so neighbouring peaks (and neighbouring notches) are spaced exactly 1/Δt hertz apart, uniformly across the whole range. Measure the distance between two adjacent notches; call it S. The candidate delay is Δt = 1/S. Worked example: notches observed at 250, 750, 1250, 1750 Hz give S = 500 Hz, so Δt = 1/500 = 0.002 s = 2 ms, and the model then predicts peaks at 0, 500, 1000, 1500 Hz. Check those peaks before believing anything: the model is falsifiable in one glance.
Check 2: the first notch. A single-delay comb's first notch sits at half the spacing, f = 0.5/Δt = S/2 — 250 Hz in the example. A pattern whose first dip sits at the full spacing, or at an unrelated frequency, is not a single-delay comb, however regular its later teeth look. Likewise a lone dip with no siblings is not evidence of a delay at all: resonances, filter skirts, and band edges all make single dips, and only the predicted family makes the comb case.
Check 3: depth gives the ratio. At a peak the two copies add: amplitude A(1 + r), where r is the delayed copy's amplitude relative to the direct one. At a notch they subtract: A(1 − r). The peak-to-notch depth in decibels is therefore 20 log10((1 + r)/(1 − r)). Invert it for common cases: infinite depth (a true zero) means r = 1, equal levels; about 9.5 dB of depth means r = 0.5 (check: (1.5)/(0.5) = 3, and 20 log10(3) ≈ 9.54 dB); about 5.7 dB means r ≈ 0.33. Shallow, regular teeth mean a quiet reflection; deep teeth mean a copy nearly as strong as the original. Note the asymmetry of information: depth tells you r but not which path is which, and spacing tells you Δt but not the absolute arrival time of either path.
When the fingerprint smudges. Real paths rarely deliver one clean copy. Multiple delays superpose multiple combs with different spacings, producing irregular teeth that are still sums of combs. A copy that is itself filtered — losing high frequencies, as many real reflections do — produces teeth that shallow out with frequency. A delay that varies with frequency (dispersion, or a path through a filter with non-constant group delay) makes the spacing drift. Each smudge has a named cause, and naming it is the analysis: "regular spacing, depth decreasing above 4000 Hz" is a conclusion; "weird response" is not.
Measuring when the notches are shallow. If the copy is much quieter than the direct signal, the notches become broad, shallow undulations that are hard to locate precisely, while the peaks stay comparatively well defined. In that case measure the spacing between adjacent peaks instead — the model gives peaks and notches the same spacing, 1/Δt — and use the notches only as confirmation. Averaging several spacings across the range beats trusting any single pair of teeth.
Boundary. Recognition is not remedy, and this guide offers none: whether a given comb matters depends on the signal, the application, and criteria outside a calculation page. What the checklist guarantees is narrower and more valuable — you will not mistake a resonance for a delay, or a delay for a mystery, and when you do claim a delay you will be able to state its size, its level ratio, and the observations that would prove you wrong.
RMS and Peak: Which Number Answers Your Question?
The question. A tool offers two level numbers for the same signal — peak and RMS — and they disagree by 3 dB, or 12 dB, or 30 dB. Which one is "the level"? Both are correct answers, to different questions. Peak answers "how close did the waveform come to the ceiling?" RMS answers "how much energy-like magnitude did the waveform sustain over this interval?" Most level confusion in digital audio is a question mismatch, not a measurement error, and this guide is a matching exercise.
The two definitions, once more, with the interval attached. Peak over an interval is the single largest absolute sample in it — one sample can set it. RMS over an interval is the square root of the mean of the squared samples — every sample contributes, and long quiet stretches dilute it. The ratio between them, the crest factor, describes the signal's spikiness over that interval: crest in decibels = peak dBFS − RMS dBFS (same interval, plain convention). Reference points, all calculated: a steady sine has crest 3.01 dB; a square wave at its extremes, 0 dB; a triangle, about 4.77 dB; a single full-scale click lasting one sample in a 1000-sample interval has RMS √(1/1000) ≈ 0.0316, i.e. −30 dBFS, against a peak of 0 dBFS — crest 30 dB. Same "loud-looking" peak, wildly different sustained magnitude.
Match the number to the decision. Clipping and headroom decisions belong to peak (and, for reconstructed signals, true peak): converters and fixed-point files clip at instants, so the instant is what matters, and RMS is dangerously reassuring here — the click above is 30 dB below full scale in RMS and still touches the ceiling. Energy, power, and heating-style questions belong to RMS, because power-like quantities accumulate as squares. Comparing the sustained strength of two passages belongs to RMS over identical windows with an identical convention. Diagnosing why a recording "looks loud but measures quiet" (or the reverse) belongs to crest factor: a high crest says transients dominate; a low crest says the signal sits near its peak much of the time.
The window is part of the number. Peak over a whole file and peak over a millisecond answer different questions, and RMS even more so: shorten the window and RMS climbs toward the local peak; lengthen it across silences and RMS sinks. Two RMS figures are comparable only when their windows match in length and placement rules. When a meter reports a single RMS for a long, varying signal, the honest reading is "an average characterisation of the whole", not "the level at the moment you care about". This site's examples always state their interval — one full cycle, or a stated block of samples — and yours should too.
A worked triage. A file peaks at −0.5 dBFS and its whole-file RMS is −23 dBFS (plain). Crest is 22.5 dB: a spiky signal. The peak figure says conversion headroom is nearly exhausted — true-peak estimation is warranted before any further gain. The RMS figure says sustained magnitude is modest — any gain decision based on "it measures −23" alone would drive the peaks over the ceiling. Neither figure is the level; together, with their interval and convention stated, they are a description. Report levels the way this page's feature article insists: quantity, reference, convention, interval — four fields, no arguments.
One-line summary. If the decision involves a ceiling, quote peak; if it involves accumulation, quote RMS; if it involves comparing the two, quote crest factor — and attach the interval to all three.
Boundary. Both numbers are digital-domain descriptions. Neither says how loud anything is at an ear — that conversion does not exist without a calibrated playback chain — and neither judges quality. They are bookkeeping instruments, and used as bookkeeping, with their intervals attached, they never disagree.
Reference entries
Short definitions. Each entry names its reference or condition and one common misconception.
Decibel
The decibel (dB) is a logarithmic unit expressing a ratio between two powers as 10 log10(P1/P0), or between two amplitudes as 20 log10(A1/A0) when power is proportional to amplitude squared. It is one tenth of a bel. A decibel value without a stated reference or a stated comparison is incomplete. Common misconception: that dB is an absolute unit like the volt. It is not — 0 dB means a ratio of 1, not silence, and the same physical level can carry different dB values against different references, while the same dB change always means the same ratio change. [S1]
dBFS
dBFS means decibels relative to digital full scale. The reference is the maximum representable magnitude in a digital system, assigned 0 dBFS for peak sample measurements, so ordinary signals read as negative values: half scale is about −6.02 dBFS. RMS readings in dBFS depend on convention — plain mathematical RMS versus the AES17 convention in which a full-scale sine reads 0 dBFS RMS. Common misconception: that dBFS can be converted directly to sound pressure level. It cannot; converter gain, transducer sensitivity, and listening geometry sit between the two scales, so no fixed offset exists. Always check which RMS convention a meter uses before comparing its reading with another meter's reading. [S2][S5]
RMS
RMS stands for root mean square: square the samples, average the squares over a stated interval, then take the square root. RMS is an energy-like measure of a waveform's magnitude. For a sine wave, RMS equals peak divided by √2, about 0.7071 times the peak. For a square wave at its extremes, RMS equals peak. Common misconception: that RMS is a kind of average of the raw samples. The plain average of a symmetric waveform is near zero and tells you almost nothing; the squaring step is essential, and the interval over which RMS is computed must always be stated. [S5]
Peak amplitude
Peak amplitude is the largest absolute value reached by a waveform over a stated interval. In digital audio it is usually the largest absolute sample value, reported relative to full scale in dBFS. An estimated peak of the reconstructed waveform between samples is a different quantity, reported as true peak in dBTP. Common misconception: that a high peak means a strong or sustained signal. A single brief click can reach full scale while the interval's RMS remains very low. Peak answers a headroom and clipping question; it does not summarise overall level, sustained strength, or energy over time in any interval. [S2]
Sample rate
Sample rate, fs, is the number of samples taken per second when a continuous signal is converted to a discrete sequence, measured in hertz (samples per second). Common rates in audio include 44100 Hz and 48000 Hz. The sample rate of a running browser AudioContext is a read-only property of that context and cannot be changed by page code. [S7] Common misconception: that raising the sample rate improves the representation of frequencies already well below the Nyquist frequency in a simple, automatic way. Its direct effect is to raise the Nyquist frequency and move the folding boundary, not to add detail everywhere.
Nyquist frequency
The Nyquist frequency is half the sample rate, fs/2. It is the highest frequency that a given sampling rate can represent without ambiguity. It is a property of the sampling system. Do not confuse it with the Nyquist rate, which is a property of a signal: twice its bandwidth, 2B, the minimum rate the sampling theorem requires. Common misconception: that content exactly at the Nyquist frequency is always captured faithfully. At exactly fs/2, capture is phase-dependent — some phases sample strongly and others can sample as all zeros — so practical designs keep margin below it. [S3]
Aliasing
Aliasing is the misidentification of a frequency after sampling when the sampling condition is violated. A component at frequency f sampled at fs appears at the smallest value of |f − k·fs|, folded into the range 0 to fs/2. For example, 6000 Hz sampled at 8000 Hz appears at 2000 Hz. Once sampling has happened, the alias cannot be separated from a genuine component at the apparent frequency. Common misconception: that aliasing is a kind of distortion that later filtering can remove. It is an identity change, not ordinary distortion, and prevention — band-limiting before the sampler — must happen before sampling ever takes place. [S3]
FFT
FFT stands for Fast Fourier Transform, an efficient algorithm for computing the Discrete Fourier Transform (DFT), which decomposes a block of N samples into frequency components spaced fs/N hertz apart. The transform itself is the DFT; the FFT is a fast way to compute it, most famously for lengths that factor conveniently. Common misconception: that a longer FFT creates new frequency information. A longer block gives finer bin spacing for the data observed, but it observes a longer interval to do so — resolution in frequency is bought with duration in time, and windowing choices shape the result.
Window function
A window function is a shaped weighting — such as Hann, Hamming, or rectangular — multiplied by a block of samples before a DFT to control spectral leakage. A rectangular window (no shaping) leaks strongly when a component falls between bins; tapered windows reduce leakage at the cost of a wider main lobe and a known amplitude correction. Common misconception: that windowing is cosmetic smoothing. It changes measured amplitudes and the visibility of nearby components in predictable, documented ways, so any spectrum display should state its window, its length, and its normalisation — as the lab on this page does for every single calculation it shows.
Phase
Phase is the position of a periodic waveform within its cycle at a reference instant, expressed in degrees or radians. A phase difference between two same-frequency sinusoids decides how they add: 0° reinforces fully, 180° cancels fully when amplitudes are equal, and intermediate angles give partial sums with amplitude 2A·|cos(φ/2)| for equal amplitudes A. A time delay Δt produces a frequency-dependent phase shift, 360° × f × Δt. Common misconception: that phase is inaudible-or-irrelevant bookkeeping in all contexts. In multi-path addition — a direct signal plus a reflection, an echo, or a second loudspeaker path — it directly sets which frequencies reinforce, which cancel, and which land anywhere in between those two extremes.
Quantisation
Quantisation is the rounding of each sample's value to the nearest step of a finite grid. The difference between the true value and the stored value is quantisation error, bounded by half a step when rounding is used. Under the standard model — a busy signal, error treated as roughly uniform and uncorrelated — the ideal signal-to-quantisation-noise ratio for an N-bit quantiser with a full-scale sine input is about 6.02N + 1.76 dB. Common misconception: that quantisation error is always benign noise. For low-level or highly periodic signals the error can correlate with the signal and appear as distortion rather than noise, which is the problem dither exists to decorrelate.
Bit depth
Bit depth is the number of bits used to store each sample, setting the number of distinct quantisation levels: N bits give 2N levels. Sixteen bits give 65536 levels; 24 bits give about 16.8 million. Under the ideal quantisation model, each added bit improves the signal-to-quantisation-noise ratio by about 6.02 dB. Common misconception: that bit depth and sample rate are interchangeable kinds of "resolution". They govern different axes entirely — bit depth the fineness of the value grid, sample rate the fineness of the time grid and hence the folding boundary — and neither substitutes for the other. Doubling the bit depth does not move the folding boundary by one hertz, and doubling the sample rate does not add a single quantisation level.
Anti-alias filter
An anti-alias filter is a low-pass filter applied to a signal before sampling, removing or reducing content above the Nyquist frequency so that it cannot fold into the baseband. It must act before the sampler: after sampling, an alias is indistinguishable from genuine baseband content and no filter can identify it. Real filters roll off over a transition band rather than at a vertical wall, which is why practical systems keep wanted content below the Nyquist frequency with a guard band. Common misconception: that a steep digital filter after conversion does the same job. It cannot — the folding it would prevent has already happened.
Reconstruction
Reconstruction is the conversion of a sample sequence back into a continuous signal. The sampling theorem guarantees that a band-limited signal sampled above twice its bandwidth can, in principle, be recovered exactly by ideal low-pass filtering of the sample stream — equivalently, by summing sinc-shaped pulses centred at each sample. Practical converters approximate this ideal with finite filters and oversampling. Common misconception: that the samples themselves, joined by straight lines or steps, are the signal. The staircase a converter briefly produces is an intermediate artefact; the reconstructed waveform is what the reconstruction filter makes of it, and it can peak between samples.
Spectral leakage
Spectral leakage is the spreading of a component's energy across many DFT bins when the component does not complete a whole number of cycles within the analysed block — equivalently, when its frequency falls between bins. The block boundary acts as a discontinuity under the DFT's periodic assumption, and discontinuities have broad spectra. Window functions control leakage by tapering the block's ends, trading it against main-lobe width. Common misconception: that leakage indicates a faulty transform or extra real frequencies in the signal. It is a predictable property of finite observation, fully described by the window's transform, and it vanishes for a component exactly on a bin with a rectangular window.
Zero padding
Zero padding appends zero-valued samples to a block before the DFT, lengthening the transform and placing bins more closely together. The result interpolates the spectrum that the original block already determined: peaks appear smoother and their positions can be read more precisely. It adds no new information, because the added samples are known constants, and it does not improve the ability to separate two close components, which is set by the original block's duration and window. Common misconception: that padding a 256-sample block to 4096 points gives 4096-point resolution. The bin spacing becomes finer; the resolution stays that of 256 samples. [S10]
Frequency bin
A frequency bin is one of the discrete frequency positions at which a DFT reports a value: bin k of an N-point DFT at rate fs corresponds to k·fs/N hertz, for k = 0 to N/2 in a real-valued signal's non-redundant half. Each bin's value summarises the signal's correlation with a sinusoid at that frequency over the block. Common misconception: that a component "in" a bin has exactly that frequency. A component between bins distributes its energy over neighbouring bins according to the window; the largest bin is the nearest grid point, not a precision measurement of the component itself.
Crest factor
Crest factor is the ratio of a waveform's peak amplitude to its RMS value over a stated interval, often expressed in decibels as peak dBFS minus RMS dBFS. It measures spikiness: a square wave at its extremes has crest factor 1 (0 dB), a sine about 1.414 (3.01 dB), and a brief click in a long interval can exceed 30 dB. Common misconception: that crest factor is a property of a signal independent of interval. Both peak and RMS depend on the interval chosen, so a crest factor quoted without its interval is incomplete in the same way as a decibel quoted without its reference.
Headroom
Headroom is the distance, in decibels, between a signal's stated level and the maximum the system can represent or pass — in digital terms, usually between a peak (or true-peak) reading and 0 dBFS. A peak at −12 dBFS has 12 dB of peak headroom. Headroom is a statement about margin against clipping at a stated stage, nothing more. Common misconception: that more headroom automatically means a cleaner or better recording. Headroom says nothing about noise, distortion below the ceiling, or quality; it records only how much room remains before one specific failure — exceeding full scale — occurs. State which level the headroom is measured from: sample peak and true peak give different margins for the same signal.
Clipping
Clipping occurs when a value exceeds the range a system can represent and is forced to the boundary: in fixed-point digital storage, magnitudes beyond full scale cannot be stored, and attempted values are pinned at the maximum. The waveform's peaks flatten, which adds new frequency components not present in the original. Common misconception: that clipping is recoverable because the "shape is still roughly there". The information about how far beyond the boundary the signal went is destroyed at the moment of clipping; later gain reduction restores level, not the lost peaks, and any declipping tool is estimating, not recovering.
True peak
True peak is an estimate of the maximum magnitude of the reconstructed continuous waveform corresponding to a sample sequence, including peaks that fall between stored samples. It is reported in dBTP to distinguish it from sample peak in dBFS. True peak is found by oversampling the sequence — evaluating the reconstruction at a finer grid — and is always greater than or equal to the sample peak of the same signal. Common misconception: that a file whose samples never reach 0 dBFS cannot clip a converter or encoder. The reconstructed waveform can exceed full scale between samples even when no sample does, which is precisely the gap true-peak metering exists to expose. [S2]
Group delay
Group delay is the negative derivative of a system's phase response with respect to angular frequency, τ = −dφ/dω. It describes the delay experienced by a narrowband group of frequencies — the envelope of a modulated signal — at each point of the spectrum. For a pure time delay, group delay is constant and equal to that delay at all frequencies. Common misconception: that phase shift at one frequency directly gives a time delay. A single phase value gives delay only modulo whole cycles; group delay, built from phase differences across neighbouring frequencies, is the quantity that tracks how envelopes actually move through a system.
Coherent and incoherent addition
Two signals add coherently when their phase relationship is fixed, so amplitudes combine vectorially: equal in-phase sinusoids double in amplitude (+6.02 dB), and antiphase equals cancel. They add incoherently when their phase relationship is random or drifting, so on average their powers combine: two equal-power incoherent signals sum to twice the power (+3.01 dB). Common misconception: that "two equal sources" always gives one fixed increase. The increase is +6.02 dB, +3.01 dB, total cancellation, or anything between, depending entirely on phase coherence — which is why addition questions cannot be answered from levels alone. When a combined level is reported, the coherence assumption behind it belongs in the same sentence.
Harmonic
A harmonic is a component whose frequency is a whole-number multiple of a stated fundamental frequency: the fundamental is the first harmonic, twice it the second, and so on. Periodic waveforms other than pure sinusoids decompose into a fundamental plus harmonics whose amplitudes and phases determine the waveform's shape. Common misconception: that harmonics are defects or additions imposed on a "pure" tone. For any periodic signal they are a description of the signal itself, not contamination — a square wave is exactly its fundamental plus odd harmonics in fixed proportion, and removing them changes the waveform into something else. Alias peaks, by contrast, are not harmonics of anything in the source; they sit where the folding rule puts them.
Oversampling
Oversampling is sampling at a rate higher than the Nyquist rate of the signal of interest. It spreads a quantiser's total error power over a wider frequency band, so that subsequent digital low-pass filtering and decimation can remove the out-of-band portion and improve the in-band signal-to-noise ratio; it also relaxes the analogue anti-alias filter's transition band. Common misconception: that oversampling recovers information beyond the original signal's bandwidth. It does not add content; it trades surplus rate for cleaner capture of the same band-limited content, and content that was never captured remains uncaptured. The benefit is realised only when the oversampled stream is actually filtered and decimated with a filter that removes the out-of-band error; oversampling alone, kept at the high rate, changes the representation rather than the in-band result.
Dither
Dither is a small, deliberately added noise signal applied before quantisation. Its purpose is to decorrelate quantisation error from the signal: instead of error that tracks the waveform and appears as distortion, the error becomes a steady, signal-independent noise floor. The cost is a slight increase in total noise; the benefit is that low-level signals remain representable in an averaged sense rather than vanishing or distorting at the last quantisation step. Common misconception: that dither is a defect or an accidental contamination. It is a calculated exchange — a little benign noise in place of correlated distortion — made at the final quantisation to a lower bit depth.
Noise floor
The noise floor of a system or a spectrum display is the level at which unwanted, signal-independent content sits, below which genuine components cannot be distinguished from it. In a digital analysis it may be set by quantisation error, by dither, by the window's side lobes leaking a strong component's energy, or by the arithmetic of the transform itself — different mechanisms with the same practical effect. Common misconception: that the flat-looking bottom of a spectrum display is a physical silence measurement. On this page every floor is calculated or modelled; in any display, the floor's origin must be identified before anything is concluded from it.
Signal-to-noise ratio
Signal-to-noise ratio (SNR) compares a stated signal level with a stated noise level, usually in decibels: for powers, 10 log10(Psignal/Pnoise). Its meaning depends entirely on how both quantities are defined and over what bandwidth and interval the noise is measured — an SNR for a full-scale sine against quantisation noise is a different number from an SNR for a quiet passage against the same floor. Common misconception: that a single SNR figure characterises a recording. It characterises a pairing of one signal definition with one noise definition; change either and the figure changes, legitimately.
Transfer function
A transfer function describes a linear, time-invariant system by its effect at each frequency: a complex-valued function whose magnitude gives the gain and whose angle gives the phase shift at that frequency. The comb response of a signal plus its delayed copy is a transfer function of exactly this kind, with magnitude oscillating between (1 + r) and |1 − r|. Common misconception: that a system's magnitude response alone describes it. Two systems with identical magnitude responses can impose different phase shifts and hence different group delays, and will treat multi-frequency signals differently in time — magnitude is half the description.
Period and frequency
Period T is the duration of one complete cycle of a repeating signal, in seconds; frequency f is the number of cycles per second, in hertz; and the two are exact reciprocals, f = 1/T and T = 1/f. A 1000 Hz tone has a period of 1 ms; a 50 Hz tone, 20 ms. Phase, delay, and comb calculations on this page constantly convert between the two views — a delay of 1 ms is one full period at 1000 Hz but only a twentieth of a period at 50 Hz. Common misconception: that period and frequency are independent properties to be measured separately. Each determines the other exactly; stating both is redundancy, not extra information.
Questions and answers
If amplitude doubles, why does power quadruple in decibel terms?
Because, under the fixed-conditions assumption used throughout this site, power is proportional to the square of amplitude. Doubling amplitude multiplies power by 22 = 4. Both routes give the same decibel change: 20 log10(2) ≈ +6.02 dB for amplitude, and 10 log10(4) ≈ +6.02 dB for power. If a source reports +3 dB for a doubling of amplitude, it has applied the power formula to an amplitude ratio — the single most common decibel error, and an easy one to catch with this check every time you read a gain figure anywhere.
A file peaks at −6 dBFS. How loud is it at the listener's ear?
It cannot be determined from that information, and any single-number answer would be invented. −6 dBFS says only that the largest sample is about half of digital full scale. Between the file and an ear sit the converter, the playback gain setting, the transducer sensitivity, and the distance or coupling — none of which the dBFS value contains. This site therefore never converts digital amplitude into sound pressure at an ear and gives no judgement about playback level. A real answer requires a calibrated measurement of the specific playback chain at the specific setting.
Can I fix aliasing after recording by filtering or resampling?
No. After sampling, an aliased component is indistinguishable from a genuine component at its apparent frequency — the sample sequences can be identical. Filtering afterwards can remove energy at the apparent frequency, but it removes genuine content there too and cannot restore the original frequency. Resampling the already-sampled data cannot recover information that was never captured distinctly. The fix is preventive: ensure the signal presented to the sampler satisfies the sampling condition, with filtering before sampling where out-of-band content may be present, and with enough guard band for a real, non-ideal filter to roll off. [S3]
Why does my spectrum show a peak slightly off the exact frequency?
Usually because of bin spacing and windowing, both calculated effects. A DFT of length N at rate fs places bins every fs/N hertz, so a frequency between bins spreads energy across neighbouring bins — spectral leakage — with the largest bin near, but not necessarily exactly at, the true frequency. A tapered window reduces distant leakage while widening the central lobe. The lab on this page states its DFT length (256 points) and normalisation (magnitude 2|X[k]|/N for non-DC bins) so you can predict the bin spacing yourself and check the display against it.
Why does an 8000 Hz tone sampled at 8000 Hz look like a constant?
Because the sampling instants land on the same phase of every cycle. At f = fs, the folding rule gives apparent frequency |8000 − 8000| = 0 Hz: each new sample repeats the previous value, so the sequence is constant — DC. The constant's value depends on the tone's phase: a cosine peaks at every instant and samples as a steady full amplitude, while a sine crosses zero at every instant and samples as all zeros. Same frequency, same rate, opposite-looking data. This is the extreme case of the general rule that sampling records an equivalence class of signals, not a unique signal.
Does zero padding improve frequency resolution?
No. Zero padding lengthens the DFT and places bins closer together, but the added samples are zeros — known constants carrying no new evidence about the signal. The padded spectrum is an interpolation of the spectrum the original block already determined: single peaks look smoother and their positions are easier to read off, which is genuinely useful. But two tones too close to separate in the original block remain merged after padding, because resolution is set by the observed duration and the window, not by the display grid. For real resolution, observe longer; padding only redraws what you have. [S10]
One meter reads a full-scale sine as −3.01 dBFS RMS; another reads 0 dBFS RMS. Which is wrong?
Neither. They follow different RMS conventions. The plain mathematical convention divides the waveform's RMS by full-scale amplitude: a full-scale sine's RMS is 1/√2, giving 20 log10(1/√2) ≈ −3.01 dBFS. The AES17 convention defines its reference so that a full-scale sine reads exactly 0 dBFS RMS, shifting every RMS reading up by 3.01 dB relative to the plain convention. The two meters agree about the signal and disagree only about the reference. Convert by adding or subtracting 3.01 dB — after confirming which convention each meter uses, which is the entire lesson of the dBFS conversion guide.
If I record at a low sample rate, can resampling to a higher rate undo the aliasing?
No. Resampling operates on the samples that exist, and after aliasing those samples are identical to samples of the apparent frequency — the distinction between the original and the alias was never recorded. Upsampling interpolates the aliased signal faithfully; it cannot know which of the infinitely many frequencies that fold to the same samples was present. The information was lost at the original sampling instant, not in any later stage. The only fix is at capture: band-limit the input and choose a rate whose Nyquist frequency clears the content, with guard band for a real filter.
Why are real comb notches never infinitely deep?
Complete cancellation requires two conditions at once: exactly equal amplitudes at the point of addition and exactly 180° of phase difference at that frequency. Real paths violate the first condition almost always — the delayed copy loses energy along its path, so its amplitude r is less than the direct signal's, and the notch bottoms out at amplitude (1 − r) instead of zero. With r = 0.5 the notch is only about 9.5 dB below the peak, as the recognition guide calculates. Frequency-dependent losses make r vary, so real notches vary in depth along the comb as well.
Does a pure delay change a steady sine wave's spectrum?
Its magnitude spectrum, no; its phase spectrum, yes — and the distinction is the point. A delay shifts a steady sinusoid in time without changing its frequency, amplitude, or waveform shape, so a magnitude display of the delayed signal alone is identical to the original's. What changes is phase: the shift is 360° × f × Δt, growing linearly with frequency. Consequences appear only when the delayed signal is compared or combined with something — a reference, or an undelayed copy, at which point the phase difference becomes reinforcement or cancellation. A magnitude-only view is blind to delay; that blindness is a property of the view, not of the signal.
Why does a rectangular window show ripples far from a strong tone?
Because a rectangular window is an abrupt cut: the analysed block starts and stops at full amplitude, and under the DFT's periodic assumption that cut is a discontinuity unless the tone completes whole cycles in the block. A discontinuity's spectrum decays slowly, so the tone's energy appears in side lobes across the whole display — only about −13 dB down near the peak in the classic figures [S9]. The ripples are the window's transform, not extra signals. Tapered windows such as Hann suppress the distant ripples by softening the block's edges, at the cost of a wider central lobe.
Two equal signals are combined and the result rises by only 3 dB. Is something broken?
Probably not — the addition was likely incoherent. Levels combine by +6.02 dB only when two equal signals are phase-locked and in phase, so their amplitudes add. When their phase relationship drifts or is random — two independent noise sources, or two signals with no fixed phase — their powers add instead, and equal powers doubling gives +3.01 dB. Between the extremes, a fixed partial phase difference gives any value given by the addition formula, including cancellation at 180°. A combined-level figure is uninterpretable until the phase relationship is stated, which is why this site treats "just add the dB values" as an error, not a shortcut.
Aliasing lab — calculated / modelled
Model: a single sine wave, simulated sample rate (not your hardware rate). Time view: continuous curve plus sample points. Frequency view: magnitude spectrum from a hand-written DFT, length N = 256, rectangular window, normalisation magnitude = 2·|X[k]| / N for bins above DC (DC and Nyquist bins use |X[k]| / N). The readout describes the Nyquist limit, folding and spectral peak, and the sample table below provides numerical values from the same calculated sequence.
Time domain (modelled)
Reading the time graph: the smooth curve is the continuous modelled sine; the dots are its values at the simulated sampling instants. When aliasing occurs, those same dots also lie on a lower-frequency sine.
Frequency domain (modelled, DFT)
Reading the frequency graph: the horizontal axis runs from 0 Hz to the simulated Nyquist frequency. For a nonzero sampled sine, the largest bin lies near its apparent frequency; an off-bin tone spreads into neighbouring bins. Zero-phase sines at DC or exactly Nyquist have zero samples and no nonzero spectral peak. The vertical scale is fixed from 0 to 1, rather than auto-amplifying numerical noise.
Calculated sample values (text and data alternative)
Optional tone (off by default)
The calculation views above work with no AudioContext at all. This optional playback uses the true signal frequency (not the simulated rate) in a real AudioContext, at a fixed low digital gain of 0.05 in code units — a code value only, with no claim about level at an ear. It starts only when you press Play.
Audio: not started. No AudioContext has been created.
Decibel calculator — calculated
Two separate modes. Amplitude mode uses 20 log10(ratio). Power mode uses 10 log10(ratio). A ratio of 0 gives −∞ and is reported as an explicit message, never as NaN. Negative ratios are rejected because magnitude ratios are non-negative.
Model experiments
Twelve small, reproducible experiments. Each states its input, the phenomenon the model produces, the explanation, and the boundary where the simple model stops. All are calculated / modelled; several run live in the tools on this page, and the rest can be reproduced from the stated numbers with the formulas in the articles above.
Experiment 1 — Predicting a fold before looking
Input: aliasing lab, simulated rate 8000 Hz; enter frequencies 5000, 7000, 9000 Hz in turn. Phenomenon: the readouts report apparent frequencies 3000, 1000, and 1000 Hz. Explanation: the folding rule, smallest |f − k·fs|: |5000−8000| = 3000; |7000−8000| = 1000; |9000−8000| = 1000. The mirror pattern repeats every fs. Boundary: exact for an ideal sampler and a pure tone; a real signal folds every component independently, so rich content scatters many aliases at once.
Experiment 2 — The Nyquist phase trap
Input: aliasing lab, frequency 4000 Hz, simulated rate 8000 Hz — exactly the Nyquist frequency. Phenomenon: the sample dots all sit at zero and the DFT shows no peak, although the continuous curve is drawn at full amplitude. Explanation: the lab's model sine starts at phase 0°, so its samples are sin(πn) = 0 at every instant; a cosine of the same frequency would sample as alternating full extremes. At exactly fs/2, capture is entirely phase-dependent. Boundary: this is why practical designs keep content strictly below the Nyquist frequency with margin.
Experiment 3 — Chained ratios in the calculator
Input: decibel calculator, amplitude mode; compute ratio 0.5, then 0.5 again. Phenomenon: each step gives −6.02 dB; the two steps together are −12.04 dB, matching a single calculation at ratio 0.25. Explanation: decibels add where ratios multiply — the defining convenience of the logarithmic scale. Boundary: the chaining works because both steps describe ratios on the same basis; adding two unrelated absolute levels (two dBFS readings) does not chain and is not a combined level.
Experiment 4 — In-phase doubling
Input: phase lab below; amplitude ratio 1, phase difference 0°. Phenomenon: the drawn sum has twice the amplitude of either input, and the readout reports +6.02 dB relative to one signal. Explanation: peaks meet peaks at every instant; the addition formula gives √(1+1+2) = 2. Boundary: doubling amplitude is +6.02 dB only because power quadruples; if the two signals were incoherent, the same levels would combine to +3.01 dB instead.
Experiment 5 — Antiphase cancellation
Input: phase lab; amplitude ratio 1, phase difference 180°. Phenomenon: the sum waveform is a flat zero line and the readout reports amplitude 0 (−∞ dB). Explanation: every peak of one signal meets an equal trough of the other; √(1+1−2) = 0. Boundary: complete cancellation needs exactly equal amplitudes and exactly 180°; experiment 6 shows how quickly the null fills in when the amplitudes differ.
Experiment 6 — The shallow null
Input: phase lab; amplitude ratio 0.5, phase difference 180°. Phenomenon: the sum has amplitude 0.5, reported as −6.02 dB relative to the stronger signal — a dip, not a disappearance. Explanation: |1 − 0.5| = 0.5; cancellation can only remove as much as the weaker copy carries. Boundary: this is the single-frequency version of why real comb notches have finite depth, developed in the recognition guide.
Experiment 7 — Quadrature addition
Input: phase lab; amplitude ratio 1, phase difference 90°. Phenomenon: the sum's amplitude is about 1.414 times one signal, +3.01 dB — neither doubling nor cancellation. Explanation: cos 90° = 0 removes the cross term, leaving √(1+1) = √2. Boundary: +3.01 dB here is a coincidence of geometry, not power addition; with drifting phase the time-averaged result also tends to the power-sum value, by a different mechanism.
Experiment 8 — Window versus leakage
Input: a calculated model from the window guide: one steady tone placed exactly halfway between two DFT bins, analysed first with a rectangular window, then with Hann. Phenomenon: the rectangular analysis shows side lobes only about −13 dB down spreading across the display; the Hann analysis shows a wider central hump with far leakage near −31 dB and falling. Explanation: the window's own transform shapes how one tone appears; tapering trades main-lobe width for side-lobe suppression (Harris, 1978 [S9]). Boundary: neither view is the "true" spectrum of a finite block — each is the block's evidence, weighted differently.
Experiment 9 — Length resolves what padding cannot
Input: a calculated model from the FFT-length guide: tones at 1000 and 1100 Hz, simulated rate 44100 Hz, Hann window. Phenomenon: at N = 256 the two tones merge into one hump; zero-padding that block redraws the same hump more smoothly; at N = 4096 two peaks appear. Explanation: bin spacing is 172.27 Hz at N = 256 versus 10.77 Hz at N = 4096, and Hann's main lobe spans about 4 bins — about 43 Hz at the longer length, less than the 100 Hz separation. Boundary: the longer block observes 92.9 ms instead of 5.8 ms; if the tones do not persist that long, the resolution is unusable.
Experiment 10 — Reading a delay off a comb
Input: a modelled response with notches at 250, 750, 1250, 1750 Hz and peak-to-notch depth of about 9.5 dB, from the recognition guide. Phenomenon: the checklist returns a single explanation: delay 2 ms, delayed copy at half amplitude. Explanation: notch spacing 500 Hz gives Δt = 1/500 s; the first notch at half the spacing confirms a single delay; depth 20 log10((1+r)/(1−r)) ≈ 9.54 dB solves to r = 0.5. Boundary: the reading gives the delay difference and the ratio, never the absolute arrival time of either path.
Experiment 11 — The click that peaks at full scale
Input: a calculated block of 1000 samples: one sample at 1.0, the rest zero, from the RMS-and-peak guide. Phenomenon: peak = 0 dBFS while RMS = √(1/1000) ≈ 0.0316, about −30 dBFS — a 30 dB crest factor. Explanation: peak is set by a single sample; RMS averages squared values over the whole stated interval, so 999 zeros dilute one maximum. Boundary: shorten the interval around the click and the RMS climbs toward the peak; both numbers are interval-relative, always.
Experiment 12 — Same peak, different RMS (generator)
Input: waveform generator below; set the digital gain to 0.20 for the ideal unit-peak model and switch among sine, square, and triangle without pressing Play — the calculated readout updates silently. Phenomenon: the readout's calculated RMS differs by waveform: 0.1414 for sine, 0.2000 for square, 0.1155 for triangle, at identical peak. Explanation: RMS = peak × (1/√2, 1, 1/√3) respectively — waveform shape, not peak, sets sustained magnitude. Boundary: these are analytic ideal-waveform values, not measurements of the browser oscillator or a level at an ear. Band-limited playback can differ [S8].
Model: signal 1 is a sine of amplitude 1. Signal 2 is a sine of the same frequency with the amplitude ratio and phase difference you set. The sum is drawn over two cycles and its amplitude is computed with √(A1² + A2² + 2·A1·A2·cos φ). The equivalent delay states what time shift would produce this phase difference at the frequency you enter. This tool is silent and uses no AudioContext.
Reading the graph: the thin solid grey curve is signal 1, the dashed red curve is signal 2, and the bold solid blue curve is their pointwise sum. Text alternative: the readout states the summed amplitude and its decibel value relative to signal 1 alone, so no information exists only in the drawing.
Waveform generator — silent until you start it
This generator is off by default and never plays automatically. Pressing Play creates an AudioContext, starts one oscillator of the chosen waveform, and displays the actual AudioContext.sampleRate your browser reports. Volume is a digital gain multiplier. The accompanying RMS comparison assumes ideal unit-peak waveforms; it does not measure the actual oscillator output. Browser synthesis filters high harmonics, so especially near Nyquist a non-sine waveform can differ from that ideal [S8]. Mute silences the generator. Either Stop all audio button stops both audio controls, and starting one control stops the other. No microphone is used.
Generator: not started. No AudioContext has been created.
About this site
This site is about a method as much as a topic. The topic is the mathematics of audio signals: ratios and references, sampling and folding, phase and addition. The method is to calculate everything in the open — state the quantity, the reference or condition, the formula, and the boundary where the simple model stops — and to label every graph and tool output as calculated or modelled with its simulated sample rate, rather than presenting a model as a measurement. It publishes no listening conclusions, no hearing judgements, and no playback-level claims, because those would require calibrated measurement that a static educational page does not perform. Corrections are welcome in principle: a claim that cannot be traced to a numbered source or reproduced from a stated formula should be treated as unfinished.
Sources and further reading
[S1] LibreTexts, “7.1: Decibels” — power 10 log10, amplitude 20 log10, power proportional to amplitude squared. https://eng.libretexts.org/@api/deki/pages/1634/pdf/7.1%253A%2bDecibels.pdf
[S2] “Decibels relative to full scale (dBFS)” reference summary — 0 dBFS as maximum digital level, half scale ≈ −6 dBFS, AES17 RMS convention, dBTP true-peak notation. https://en.wikipedia.org/wiki/DBFS
[S4] R. C. Maher, “The Decibel Scale” (Montana State) — bel/decibel definitions, SPL LP = 20 log10(P/Pref), Pref = 20 µPa. https://web1.msu.montana.edu/rmaher/eele217_fl17/decibel_scale.pdf
[S5] Julius O. Smith III, CCRMA, “Specific dB Scales” — dBFS as 20 log10(A/Amax), 0 dBFS maximum amplitude. https://ccrma.stanford.edu/~jos/log/Specific_DB_Scales.html
[S6] MDN, AnalyserNode.getFloatFrequencyData() — decibel value per bin, frequencies spread linearly 0 to half the sample rate, silence is −Infinity. https://developer.mozilla.org/en-US/docs/web/api/analysernode/getfloatfrequencydata
[S7] MDN, BaseAudioContext.sampleRate — read-only float, sample rate in samples per second used by all nodes, cannot be changed. https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/sampleRate
[S8] W3C, Web Audio API 1.1 — status of the reviewed version: Working Draft, 22 September 2026; section 1.26 defines oscillator frequency and anti-aliasing behaviour. https://www.w3.org/TR/webaudio-1.1/
[S9] F. J. Harris, “On the use of windows for harmonic analysis with the discrete Fourier transform”, Proceedings of the IEEE, 66(1), 1978 — window main-lobe widths, side-lobe levels, scalloping loss, coherent gains. DOI: 10.1109/PROC.1978.10837
[S10] Julius O. Smith III, CCRMA, “Spectral Audio Signal Processing” — DFT bin spacing, zero padding as interpolation, window properties. https://ccrma.stanford.edu/~jos/sasp/
[S11] MDN, OscillatorNode — waveform type values (sine, square, sawtooth, triangle), frequency in hertz. https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode
[S12] MDN, GainNode — the gain AudioParam scales the amplitude of the input signal. https://developer.mozilla.org/en-US/docs/Web/API/GainNode
Web Audio note: this site cites the Web Audio API 1.1 as a Working Draft, not a finished Recommendation [S8]. Browser behaviour is described from MDN documentation [S6][S7].