Frequency Sweep Generator

Frequency Sweep Generator

Glide a tone from one frequency to another — 20 Hz to 20 kHz, linear or logarithmic, with a live playhead.

Listen safely. Volume starts at 25 % on purpose. Turn your system volume down before you press Play, then raise it slowly. A sweep is far harsher than a steady tone: it parks energy on every resonance in your speaker, your room and your ear on the way past, and the 2–8 kHz stretch is where hearing is most sensitive and most easily damaged. Never run a full-range sweep at high level on headphones, and stop immediately if anything hurts or rings afterwards.

What this does

  • It plays one tone whose pitch glides from a start frequency to an end frequency over a set duration — a chirp. The graph is frequency (vertical, logarithmic) against time (horizontal), and the moving playhead is the exact frequency sounding at that instant.
  • The vertical axis is logarithmic because pitch is: the gap 20–40 Hz and the gap 10–20 kHz are both one octave, so both occupy the same height.

Linear vs logarithmic — the important choice

  • Linear adds a constant number of hertz per second: f(t) = f0 + (f1 − f0) · t / T. A 20 Hz–20 kHz linear sweep over 10 s spends its first second crawling from 20 Hz to about 2 kHz — nearly seven octaves — then the last nine seconds barely change pitch at all. On the log graph it shoots up and flattens out.
  • Logarithmic (exponential) multiplies by a constant ratio, so it covers a constant number of octaves per second: f(t) = f0 · (f1 / f0)t/T. It sounds like an even, musical rise and draws a perfectly straight line on this log axis. This is the one to use for speaker and room testing, because it gives every octave the same amount of time.
  • Under the hood the two use different Web Audio ramps — a linear ramp and an exponential ramp on the oscillator frequency — so the audio and the drawn curve always agree.

The four modes

  • Sweep lab — the full instrument. Every parameter, the draggable graph, and the shape / repeat / gap controls.
  • Ear games — two scored games that turn the frequency axis into something you learn rather than something you read. The graph goes blind during a round: no curve, no playhead height, no numbers. Ears only.
  • Room & speaker test — a slow guided sweep for hunting rattles, buzzes and room modes by ear, with a Mark button that captures the exact frequency of anything you hear go wrong.
  • Hearing edge — a climb from 8 kHz to 20 kHz where you mark the moment the tone disappears.

Note names — the live pitch readout

  • Under the big frequency the widget names the nearest note and how far off it you are, in cents (hundredths of a semitone). It uses the standard conversion, MIDI = 69 + 12 · log2(f / 440), so 440 Hz is A4 exactly, 261.63 Hz is C4, and 1 kHz turns out to be B5 about 21 cents sharp — which is why a “round” 1 kHz is a musically awkward pitch.
  • Cents are the honest unit for pitch error. Being 50 Hz out at 100 Hz is most of an octave; being 50 Hz out at 5 kHz is inaudible. The games score you in both.

Sweep shape, repeats and gap

  • Once through is the plain glide. Ping-pong runs start → end in the first half of the pass and end → start in the second, which makes a resonance ring twice and is much easier to place. Stepped throws away the glide and plays a ladder of held tones instead — a semitone, a whole tone, a minor third, a third of an octave or a full octave apart — so you hear the axis as a musical scale.
  • Repeats plays the pass 1 to 8 times; Gap inserts up to 3 s of silence between passes, which is the difference between a wall of sound and something you can actually think about. Loop overrides the repeat count and runs forever.
  • All of it — every pass, every gap, endless looping — rides one single oscillator, scheduled ahead of the audio clock, so passes join without a click and nothing is created or destroyed while it plays.

Ear games

  • Stop the sweep. You are given a target — “1 kHz”, or “the note A4” — and a slow sweep starts from somewhere below or above it. Press Stop (the big button, or Space) the instant you think it is crossing. You are scored on the frequency that was genuinely sounding at that moment, in cents and in hertz.
  • Where did it start? A short sweep plays and vanishes. Only its very first instant matters: dial your guess in on the slider, audition it against nothing but your memory, and submit.
  • Anything inside 100 cents — one semitone — counts as a hit and extends your streak. The panel keeps your streak, your best streak, your closest-ever guess and your hit rate. Easy / Normal / Hard changes how fast the sweep moves and how obscure the targets get; on Hard the sweep covers 0.55 octaves a second, which leaves you about 150 ms of slack for a semitone.
  • After each round the graph reveals itself: the dashed line is the target, the ringed dot is you.

Room & speaker test

  • This is subjective listening, not a measurement. There is no microphone involved and nothing is analysed. It cannot give you a frequency response or an SPL reading. What it does well is excite one frequency at a time, slowly enough that a fault has time to start buzzing, and tell you the exact frequency when it does.
  • Pick what you are hunting, choose slow glide to discover that a problem exists or stepped tones to pin down where it lives, and press Mark this frequency the moment you hear something wrong. Marks are drawn across the graph and listed as chips; Hold the last mark parks a steady tone there so you can go and press on things with both hands.
  • The card lists what each kind of noise actually means — rattle, room mode, null, distortion, port chuff — and how to tell them apart.

Hearing edge finder

  • A logarithmic climb from 8 kHz to 20 kHz. Press I can’t hear it now when the tone goes, and the frequency at that instant is recorded.
  • It is not a hearing test and makes no medical claim. It measures your whole playback chain: most laptop and phone speakers, and plenty of earbuds, produce almost nothing above 15 kHz, so a low number very often means the equipment stopped rather than you. It also moves with volume and with background noise. Do several runs and look at the spread. If you have a real concern about your hearing, only a qualified audiologist can help with that.
  • Use a sine. Square and sawtooth keep sounding after the fundamental has gone, because their harmonics are still in range.

Mouse

  • Drag the round handle on the left edge of the graph to set the start frequency, and the handle on the right edge to set the end frequency. You can grab anywhere in the left or right quarter of the plot, not just the dot itself. (Sweep lab only — the other modes drive the graph themselves.)
  • While you drag you hear that exact frequency held as a steady tone, so you can shape the sweep by ear. Let go and the sweep replays with the new shape (if it was already playing).
  • Start / End sliders — logarithmic, so equal travel is an equal musical interval. The number field beside each one takes an exact value in Hz.
  • Up / Down / Swap — force a rising or falling sweep, or exchange the two frequencies.
  • Duration — 0.5 s to 60 s, by slider, number field, or the preset buttons.
  • Linear / Logarithmic, waveform and volume are on the lower cards. Loop repeats the sweep back to back until you stop it.
  • Reset all returns everything to 20 Hz → 20 kHz, 10 s, logarithmic, sine, 25 % volume.

Touch

  • Drag the graph handles with a finger — the hit areas are deliberately large and the page will not scroll while you drag.
  • Every button and slider is at least 40 px tall.

Keyboard

  • Space the big button for whichever mode you are in — start / stop the sweep, or in a game, start a round and then stop it on the target.
  • G jump to the games, or start the next round  ·  M mark the current frequency in the room test, or mark the vanishing point in the hearing-edge finder.
  • move the armed handle by a semitone  ·  fine nudge of about a tenth of a semitone. Hold Shift for a whole octave.
  • S arm the start handle  ·  E arm the end handle  ·  X swap them.
  • L toggle loop  ·  T toggle linear / logarithmic  ·  14 waveform  ·  R reset.
  • These shortcuts are ignored while a slider or a number field has focus, so arrow keys still drive the native control you are in. Click the widget background first to use them.

Tips

  • Learn the axis fast: stepped shape, semitone steps, 20 Hz → 20 kHz. You get 120 held tones and the note name of every one of them on the readout as it plays. Ten minutes of that and the ear games get noticeably easier.
  • Make a resonance obvious: ping-pong, 3 repeats, a 1 s gap. Hearing the same frequency misbehave four times with silence in between is far more convincing than hearing it once.
  • Rattles and room modes now have their own mode, with a Mark button and a list of what each noise means.
  • Set the same start and end frequency and you get a steady tone with no glide at all — the rate reads 0.
20.0 Hz
nearest note D♯0 +49¢
0.00 / 10.0 s Ready
 
Arrow keys move:
Ready — press Play.

Sweep range Rising

Start frequency20.0 Hz
Hz  (20 – 20000)
End frequency20000 Hz
Hz  (20 – 20000)
Direction

Timing & shape 10.0 s

Duration10.0 s
seconds  (0.5 – 60)
Duration presets
Sweep type

Logarithmic draws a straight line on this log axis and gives every octave equal time.

Shape, repeat & gap Once through

Sweep shape

One continuous glide from the start frequency to the end frequency.

Repeats1 pass

Loop ignores this count and keeps going until you stop. Repeats, gaps and looping all ride one single oscillator scheduled ahead of time, so passes join seamlessly.

Gap between passes0.0 s

Sound 25 %

WaveformSine
Master volume25 %

Square and sawtooth carry much more energy than a sine at the same peak, so a fixed loudness trim is applied per waveform. The percentage is the sine-referenced level.

log: f(t) = f₀ · (f₁/f₀)^(t/T)  ·  linear: f(t) = f₀ + (f₁ − f₀) · t/T

This interactive tool is a simple but useful little app that produces frequency sweeps (tones that slide up and down in pitch) that you can create and hear. Whether it’s for training your ear, testing out your setup, or just having fun experimenting with sound, this app put all the controls at your fingertips. You can use your computer keyboard for quick changes, or your mouse and trackpad.

It’s a graph with time along the horizontal axis, and frequency on the vertical axis. There are two handles (the start and end frequencies) which you can click and drag around to change pitch range. This creates a curve between the handles representing the variation in frequency. In Lab mode, you can adjust this curve by moving the handles. Your changes will update in graph in real-time.

How to Use This Tool

The four workspaces is accessed via a button on the top. By default, you’re in Lab, which is the workspace for designing custom sweeps. Next up is Game, which challenges you to guess starting note or hit a target frequency to stop the sweep. Or, you can choose Room, which plays a series of test tones so you can better understand how your listening environment (and speakers) sound. Finally there’s Hear, which plays a rising tone until it goes beyond your individual upper frequency limit.

Below the graph is what you use to manipulate the sweep details in Lab mode. Two frequency sliders let you set start and end points on your chosen scale. Another slider controls how long it takes for the sweep to reach its destination. If you need exact figures, there are number boxes adjacent to the sliders where you can enter them manualy.

A type button allows you to select either a linear or logarithmic sweep. The former adds the same frequency per second whereas the latter provides each octave with an equal time allotment. Using the shape button, you can select a continuous glide. You can also choose a ping-pong effect that goes up and then down again. Or, you can choose a stepped ladder where tones is held until the next one sounds.

The wave buttons control the waveform itself. Pure tones are sine waves, while others that are more brighter or more complex are square, sawtooth, and triangle waves. How loud it plays is controlled by the volume slider. With high volumes, particularly in the Hear mode, be aware that the tone can become pretty high pitched.

The repeat slider allows you to have multiple passes through a sweep with a pause between each one. This is controlled by the gap slider.

There are two types of challenges in the Game mode: Stop, where you hear a sweep play and hit the stop button when it passes through a target frequency; or Start, where you listen to a brief sweep and use the guess slider to guess what starting frequency was. Before you submit your guess, you can hear the sweep again as many times as desired. Your score is based on your best accuracy and streak. Settings for how wide the frequency range is and how fast the sweep travels adjust difficulty.

You could of also try it out in Room mode. Pick one of these presets which will play some standard test tones. You have the option to use stepped tones or glide. As it’s playing, click the Mark button when you hear anything that doesn’t sound right… Like maybe a rattle or buzz. The tool picks up frequency at that time. Then you can go back and see if there is something wrong with your room, acoustics, or speakers.

Use the Hear tool to find out which frequency you cut out. It has a tone that rises in pitch as it plays. Press play. Listen for when it appears to stop. Hit the Gone button, and the tool will record the frequency. Do the test again a few more times to ensure the number holds true. Keep in mind that it’s measuring your entire chain: volume level, speakers, etc., not just your ears.

You can control everything with your mouse or trackpad, or you can use your computer keyboard for faster adjustments. To play/pause, hit the space bar. To arm the start/end handles, hit S/E. With an arm handle, you can adjust its frequency up/down using the arrow keys (in semitone increments). Use the left or right arrow for finer control. Use Shift+arrow keys for larger jumps. Press X to swap start and end frequencies. Press L to toggle loop on or off. Select a waveform using 1-4. Press R to reset to defaults.

Clicking on the help button brings up a more detailed description of buttons. The fullscreen button expands the tool to fill your screen, giving you more room for the graph and controls. If you want to use the keyboard, you can also move around in the tool using the arrow buttons. The tool saves your settings so everything will be right where you left off next time.

For example, experiment with logarithmic sweeps to experience how it feels when the octave is even. Switch to Lab mode to narrow down a frequency and see how it works with the stepped shape. Begin at an entry-level difficulty in Game mode while getting comfortable and then move into a faster sweep. Pay extra close attention to any resonances in Room mode, which could signal problems with your speakers. Spend some time exploring the modes and find out what catches your ear.

To get started just hit the Play button in Lab mode to hear default sweep. You can drag the handles around to adjust the pitch range and then listen for the sound. Experiment with different waveforms and find the one that you like best. When you’re feeling confident, try the Room mode to test your setup, or the Game mode to test your ear. Feel free to mess around with the settings and see what happens, there’s no wrong way to use it.

Leave a Comment