Understanding Frequency Sweeps: How Audio Testing Actually Works
What a frequency sweep is, how linear and logarithmic sweeps differ, and how to use them to test speakers, headphones, subwoofers, and room acoustics.
A frequency sweep is a tone that glides smoothly from one pitch to another over a set period of time. Sound engineers, acoustic consultants, and home theater enthusiasts use it constantly, mostly because it’s the fastest way to test a speaker, a subwoofer, a pair of headphones, or the acoustic behavior of an entire room. Below, we’ll cover how sweeps actually work, why the linear and logarithmic versions sound completely different, and how to run one yourself without damaging your ears or your tweeters.
How a Frequency Sweep Works
A sweep is really just one tone whose pitch changes over time. It starts at a chosen frequency (f₁) — say 20 Hz, roughly the lowest note the human ear can register — and climbs to a final frequency (f₂), such as 20,000 Hz, over a duration of T seconds.
Audio sweeps almost always use a sine wave, and there’s a good reason for that: a sine wave is a mathematically pure tone with no harmonics or overtones layered on top of it. Try the same sweep with a sawtooth or square wave instead, and you’ll get a mess of extra harmonics (2f, 3f, 4f, and so on) stacked on the fundamental. That makes it nearly impossible to tell which frequency is actually causing a cabinet to buzz or a room to boom. A pure sine sweep avoids that ambiguity — whatever you hear at a given moment is exactly the frequency being played at that moment.
Most web-based tools generate these sweeps digitally through the Web Audio API, which schedules the frequency changes directly on your sound card rather than playing back a pre-rendered audio file. That keeps latency and compression out of the picture.
Linear vs. Logarithmic Sweeps: The Perception Difference
There are two ways to define how the pitch rises over the course of a sweep — linear and logarithmic — and they don’t sound remotely alike.
Linear Sweeps
A linear sweep raises the frequency by a fixed number of Hertz every second. Sweep from 20 Hz to 20,000 Hz over 10 seconds, for instance, and the rate works out to a constant 1,998 Hz per second:
f(t) = f₁ + ((f₂ − f₁) / T) × t
That constant rate is handy for math — computing impulse responses or running an FFT, for example — but it’s a poor fit for actual listening. Human hearing works logarithmically: we perceive pitch as a doubling (an octave), not as a fixed number of Hertz. The jump from 100 Hz to 200 Hz sounds enormous, while the same 100 Hz gap between 10,000 Hz and 10,100 Hz is basically inaudible. Run a 10-second linear sweep and you’ll notice it races from 20 Hz to 2,000 Hz in the first second alone, then spends the remaining nine seconds crawling through the treble.
Logarithmic (Exponential) Sweeps
A logarithmic sweep instead doubles the frequency over equal time intervals — one second to go from 20 Hz to 40 Hz, another second to go from 40 Hz to 80 Hz, and so on:
f(t) = f₁ × (f₂ / f₁) ^ (t / T)
To your ears, this sounds like a smooth, even climb in pitch, which is exactly why it’s the standard for listening tests: it matches how our hearing actually works and gives equal weight to every part of the spectrum, rather than rushing through the bass to linger in the treble.
| Feature | Linear Sweep | Logarithmic Sweep |
|---|---|---|
| Frequency change | Constant Hertz per second | Constant octaves per second |
| What you hear | Rushes through bass, crawls through treble | A steady, even rise in pitch |
| Best for | FFT analysis, impulse response measurement | Speaker calibration, room testing, by-ear listening |
| Bass coverage (20–200 Hz) | Compressed into a fraction of a second | Given proportional time, like every other octave |
What a Frequency Sweep Is Actually Used For
Measuring speaker and headphone frequency response
Every speaker and headphone has physical limits. A good studio monitor might stay flat from 45 Hz to 22,000 Hz; a cheap smart speaker starts falling off well before 100 Hz. Run a sweep through your gear and listen for sudden dips or spikes in volume — a sharp drop around 3,000 Hz, for example, often points to a poorly aligned crossover between the woofer and tweeter.
Finding room modes and acoustic reflections
Sound bouncing off your walls, floor, and ceiling doesn’t always add up cleanly. When reflections arrive out of phase, they cancel each other out and leave a dead spot (a null). When they arrive in phase, they reinforce each other and create a boomy, overloud spot (a peak). These are room modes, and they’re the reason a sweep might drop to near silence at 60 Hz and then boom at 80 Hz even though the speaker’s output never actually changed. Once you know where those frequencies fall, you know exactly where to place bass traps or other treatment.
Checking subwoofer performance and tracking down rattles
Subwoofers live in the lowest octave — roughly 20 Hz to 120 Hz — so a slow sweep across that range (say, 20 Hz to 150 Hz over 15 seconds) is the cleanest way to find a sub’s real lower limit. It’s also the fastest way to find rattles: the sheer energy of a low sweep will shake loose screws, window panes, or drywall joints into buzzing, and you can usually track the sound down by ear while the sweep runs.
How to Run a Frequency Sweep Test Safely
Sustained sine tones are harder on your gear and your ears than normal music, so it’s worth taking a few precautions before you start. High-frequency tones above 10 kHz in particular carry enough energy to overheat a tweeter’s voice coil if you play them loud for too long, and your ears are far more sensitive to midrange and treble than to bass — never run a sweep at high volume through headphones.
- Turn your volume down first. Start at around 5–10% on your amp or computer.
- Use a pure sine wave. Anything else introduces harmonics that muddy the results.
- Pick a frequency range that matches what you’re testing — 20 Hz to 20,000 Hz for a full-range system, 20 Hz to 150 Hz for a subwoofer, or 200 Hz to 4,000 Hz if you’re checking the midrange.
- Choose a logarithmic sweep so you spend enough time in the bass to actually hear what’s happening.
- Start the sweep and bring the volume up slowly until the tone is clearly audible but still comfortable.
- Listen for anomalies — sudden drops, resonant spikes, or anything physically vibrating nearby.
Common Problems a Sweep Test Will Reveal
A mechanical buzz at one specific bass frequency almost always means something nearby — a picture frame, a loose cabinet screw, a glass shelf — is resonating at its own natural frequency. Walk the room during the sweep to find the source, then tighten it down, add a rubber dampener, or decouple your speakers from their stands with isolation pads.
If the bass drops out at your listening seat but stays loud in the corners, you’re sitting in a standing-wave null. Speaker placement is the cheapest fix: nudge your speakers a few inches forward, back, or closer together, or move your chair. Bass traps in the corners help too, since they absorb the low-frequency energy that causes the cancellation in the first place.
And if the tone disappears entirely before you hit 15,000 Hz, it’s either your speakers or your ears. Check the spec sheet — if it claims 20,000 Hz and you’re still hearing nothing above 14,000 Hz at a normal volume, that’s most likely just age-related high-frequency hearing loss, which is a completely normal part of how hearing changes over time.
Generating a Sweep with the Web Audio API
For anyone building this themselves, the Web Audio API has built-in methods for changing audio parameters over time, so there’s no need for a JavaScript loop updating frequency values on every frame. You can hand the whole sweep off to the browser’s audio engine instead:
// 1. Create the audio context
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
// 2. Create the oscillator and gain node
const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
oscillator.type = "sine"; // Pure tone
// 3. Connect nodes
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
// 4. Schedule the sweep parameters
const startTime = audioCtx.currentTime;
const duration = 10; // 10-second sweep
const startFreq = 20; // 20 Hz
const endFreq = 20000; // 20 kHz
// Set starting value
oscillator.frequency.setValueAtTime(startFreq, startTime);
// Apply exponential (logarithmic) ramp
oscillator.frequency.exponentialRampToValueAtTime(
endFreq,
startTime + duration,
);
// 5. Start and stop the oscillator
oscillator.start(startTime);
oscillator.stop(startTime + duration);
Scheduling it this way keeps the frequency change perfectly smooth — no stepping or clicking artifacts, which is what you’d get if you tried to update the value manually on a timer.
Try It Yourself
You don’t need paid software to run any of this. Our free Frequency Sweep Generator lets you set a custom range, switch between linear and logarithmic curves, and watch the output on a real-time oscilloscope right in your browser. If you just need a single steady tone instead — to tune an instrument or isolate one specific rattle — the Tone Generator does that. Either way, start quiet and bring the volume up slowly.