Frequency Sweep Detector

Detect and characterize frequency sweeps, chirps, and siren patterns in real time using your microphone or by uploading an audio file. Measure sweep direction, rate, start/end frequencies, and sweep type — all processed locally in your browser.

Sweep Detector Tool

🔒 Your audio never leaves your device — 100% local processing, zero uploads. Chrome Firefox Safari Edge
📁

Drop an audio file here or

MP3, WAV, FLAC — max 50 MB

Microphone:
Sensitivity: 5
Generate Sweep
Start (Hz)
End (Hz)
Duration (s)
Type
Ready to generate
Space Start/Stop R Reset C Calibrate E Export CSV
Sweep Status
None
Sweep Direction
Sweep Rate
Hz/second
Start Frequency
End Frequency
Sweep Type
Sweep Duration
Siren Pattern
🔇
No siren pattern detected
Sweeps Found
Peak Freq
Avg Rate
Spectrogram (sweep trajectory highlighted)
Peak Frequency Trend (30 sec rolling)
Sweep Event Log
Time Direction Rate (Hz/s) Range Type

How to Use the Frequency Sweep Detector

  1. Start Listening or Upload a File

    Click "Start Listening" to monitor live audio from your microphone, or drag and drop an audio file (MP3, WAV, FLAC) to analyze a recording for frequency sweeps.

  2. Watch the Sweep Status

    The sweep status indicator shows "Detected" when a frequency sweep is found. The direction arrow shows whether the sweep is ascending (rising pitch), descending (falling pitch), or bidirectional (alternating up and down).

  3. Read the Sweep Metrics

    The sweep rate tells you how fast the frequency changes in Hz per second. Start and end frequencies show the range of the sweep. The sweep type indicates whether it follows a linear or logarithmic trajectory.

  4. Inspect the Spectrogram

    The spectrogram shows frequency content over time with a colored trajectory line highlighting detected sweep paths. The peak frequency trend chart below it graphs the dominant frequency over a 30-second rolling window.

  5. Export Your Results

    Use Export CSV to download a log of every detected sweep event with timestamps, directions, rates, frequency ranges, and sweep types. This is useful for acoustic analysis reports and siren identification.

Understanding Your Results

Sweep Status

The sweep status shows "Detected" when the tool identifies a consistent frequency change over consecutive analysis frames. A sweep is detected when the peak frequency moves monotonically (consistently in one direction) by more than the sensitivity threshold over multiple frames. When no sweep is active, the status reads "None".

Direction Indicator

The direction arrow shows the sweep's trajectory: Ascending (frequency rising over time, arrow pointing up), Descending (frequency falling, arrow pointing down), or Bidirectional (alternating up and down, as in many siren patterns). The arrow animates in real time as sweeps are detected.

Sweep Rate

The sweep rate measures how quickly the frequency changes, expressed in Hz per second. This is calculated using linear regression on the peak frequency values over the sweep duration. A rate of 500 Hz/s means the dominant frequency shifts by 500 Hz every second. Higher rates indicate faster sweeps like emergency sirens; slower rates suggest gradual tonal shifts.

Start & End Frequency

These values show the frequency at the beginning and end of the current or most recently detected sweep. Together with the sweep rate and duration, they fully characterize the sweep's trajectory through the frequency spectrum.

Sweep Type

Sweeps are classified as Linear (constant Hz/s rate — the frequency changes by the same number of hertz each second) or Logarithmic (constant octaves/s rate — the frequency changes by the same ratio each second, common in audio test sweeps and many natural sounds). The classification compares the variance of the Hz/s rate against the variance of the octaves/s rate.

Siren Pattern Detection

The siren detector looks for periodic alternation between ascending and descending sweeps, which is characteristic of emergency vehicle sirens. When a repeating up-down pattern is detected, the siren indicator activates and estimates the siren cycle period.

How Frequency Sweep Detection Works

A frequency sweep (also called a chirp) is a signal whose instantaneous frequency changes over time. Sweeps appear in emergency sirens, radar signals, acoustic testing, musical effects, and many natural phenomena. This tool detects sweeps by tracking the peak frequency across consecutive FFT analysis frames.

Peak Frequency Tracking

Each analysis frame computes a Fast Fourier Transform (FFT) of the audio signal using a 4096-point window, yielding a frequency resolution of approximately 10 Hz at 44.1 kHz sample rate. The bin with the highest magnitude is identified as the peak frequency for that frame, with quadratic interpolation applied to achieve sub-bin accuracy.

Sweep Detection Algorithm

The detector monitors the peak frequency across a sliding window of consecutive frames. If the peak frequency changes monotonically (consistently increasing or decreasing) for a minimum number of frames, a sweep is declared. The sensitivity control adjusts how many consecutive monotonic frames are required and the minimum frequency change per frame.

Rate Calculation via Linear Regression

Once a sweep is detected, its rate is calculated by fitting a linear regression line to the peak-frequency-vs-time data points. The slope of this line gives the sweep rate in Hz/second. The sign of the slope determines direction: positive = ascending, negative = descending.

Linear vs. Logarithmic Classification

To classify the sweep type, the tool computes two rate series: the Hz/s rate (frequency difference between consecutive frames) and the octaves/s rate (log2 ratio between consecutive frames). If the Hz/s rate has lower variance relative to its mean, the sweep is classified as linear. If the octaves/s rate has lower variance, it is classified as logarithmic.

Siren Detection

Siren patterns are identified by detecting periodic alternation between ascending and descending sweeps. The tool tracks sweep direction changes and measures the intervals between them. If the direction change intervals are approximately equal (within a tolerance), a periodic siren pattern is declared.

Frequently Asked Questions

What is a frequency sweep?

A frequency sweep (or chirp) is a signal whose frequency changes continuously over time. Sweeps can be ascending (low to high), descending (high to low), or bidirectional (alternating). Common examples include emergency sirens, radar chirps, audio test sweeps, and synthesizer effects.

How does this tool detect sweeps?

The tool performs real-time FFT analysis on your audio, tracking the peak (dominant) frequency across consecutive frames. When the peak frequency changes consistently in one direction over multiple frames, it is classified as a sweep. The sweep rate is calculated using linear regression on the frequency-vs-time data.

What is the difference between linear and logarithmic sweeps?

A linear sweep changes frequency at a constant rate in Hz per second (e.g., 100 Hz every second). A logarithmic sweep changes frequency at a constant rate in octaves per second (e.g., doubling the frequency every second). Log sweeps sound more natural because human pitch perception is logarithmic. Audio test sweeps are often logarithmic.

Can it detect emergency sirens?

Yes. The siren detection mode looks for periodic alternation between ascending and descending frequency sweeps, which is the defining characteristic of emergency vehicle sirens. When a repeating up-down pattern is detected, the siren indicator activates and shows the estimated cycle period.

Can I analyze a pre-recorded audio file?

Yes. Drag and drop an audio file (MP3, WAV, or FLAC up to 50 MB) into the upload zone or click "browse" to select a file. The tool decodes the file in your browser and scans it frame by frame for frequency sweeps — nothing is uploaded to any server.

Is my audio data safe?

Completely safe. All sweep detection and audio analysis happens 100% in your browser using the Web Audio API. No audio is recorded, stored, or sent to any server. Uploaded files are decoded locally and never leave your device.