Harmonic Overtone Detector
Detect and visualize up to 16 harmonics of any sound in real time. See amplitude (dB) per harmonic, odd/even classification, THD percentage, instrument timbre matching, and harmonic-to-fundamental ratios. Click any harmonic bar to hear it isolated. 100% browser-based, no audio uploaded.
Harmonic Overtone Detector Tool
| H# | Freq (Hz) | Amp (dB) | Ratio | Type |
|---|
How to Use the Harmonic Overtone Detector
-
Start Listening or Upload Audio
Click Start Listening to capture sound from your microphone, or click Upload Audio File to analyze a WAV, MP3, or other audio file. Select a specific microphone from the dropdown if you have multiple input devices. Adjust the sensitivity slider to filter out background noise.
-
Play or Produce a Sound
Play a sustained note on an instrument, sing a steady pitch, or expose the mic to any tonal sound. The tool needs a clear fundamental frequency to analyze β sustained tones work best. The fundamental (F0) is detected automatically via autocorrelation pitch detection.
-
Read the Harmonic Bar Chart
The bar chart shows harmonics H1 (fundamental) through H16. Cyan bars are odd harmonics (H1, H3, H5β¦), green bars are even harmonics (H2, H4, H6β¦). The height of each bar represents its amplitude in dB relative to silence. Hover to see exact values; click any bar to hear that harmonic as an isolated sine tone.
-
Check THD and Timbre Match
The THD (Total Harmonic Distortion) meter shows the ratio of harmonic energy to fundamental energy β lower means a purer tone. The Instrument Timbre Match card compares your harmonic profile against templates for common instruments (flute, clarinet, trumpet, violin, piano) and shows the best match with a confidence score.
-
Export Your Data
Click Export CSV to download a file with all 16 harmonics, their frequencies, amplitudes, ratios, types (odd/even), plus THD and instrument match data. Or click Copy Data to copy a formatted summary to your clipboard for pasting into reports or documentation.
Understanding Your Results
Harmonics and Overtones
A harmonic is an integer multiple of a fundamental frequency. If a guitar string vibrates at 220 Hz (A3), its harmonics appear at 440 Hz (H2), 660 Hz (H3), 880 Hz (H4), and so on up to H16 at 3520 Hz. The first harmonic (H1) is the fundamental itself. Overtones are all harmonics above the fundamental β the first overtone is the second harmonic (H2). The unique blend of harmonic amplitudes is what makes a clarinet sound different from a trumpet playing the same note.
Odd vs. Even Harmonics
Instruments with predominantly odd harmonics (H1, H3, H5, H7β¦) have a hollow, woody tone β the clarinet is the classic example, because its cylindrical bore naturally suppresses even harmonics. Instruments with a full harmonic series (both odd and even) sound richer and brighter β trumpet, violin, and open-bore flutes. A perfectly symmetrical waveform (square wave) contains only odd harmonics. The odd/even balance indicator shows you this ratio in real time.
Total Harmonic Distortion (THD)
THD quantifies how much energy exists in harmonics compared to the fundamental. It is calculated as the square root of the sum of squared harmonic amplitudes divided by the fundamental amplitude: THD = sqrt(H2Β² + H3Β² + β¦ + H16Β²) / H1. A pure sine wave has 0% THD. A square wave has ~48% THD. Typical instrument THD ranges: flute 5β15%, clarinet 10β25%, trumpet 20β40%, violin 30β60%. THD below 1% indicates an extremely clean sine tone; above 50% indicates a very harmonically rich or distorted signal.
Instrument Timbre Matching
The timbre matcher compares your harmonic profile (relative amplitudes of H1βH16) against stored templates for common instruments. It uses normalized correlation β the instrument with the closest harmonic envelope is shown with a confidence score. 90%+ means a very strong match. 50β89% is a reasonable match. Below 50% means the harmonic profile does not closely resemble any template β the sound may be synthetic, distorted, or a non-template instrument.
Harmonic-to-Fundamental Ratio
The ratio table shows each harmonic's amplitude relative to the fundamental (H1 = 0 dB reference). A ratio of β20 dB means that harmonic is 20 dB quieter than the fundamental. In most natural sounds, higher harmonics decay β H2 might be β6 dB, H8 might be β30 dB. Harmonics that are unexpectedly strong (closer to 0 dB) at high numbers indicate distortion, resonance, or formant reinforcement.
Click-to-Play Harmonic Isolation
Clicking any harmonic bar plays a pure sine tone at that harmonic's exact frequency, so you can hear what each overtone sounds like individually. This is useful for ear training, identifying which harmonics create perceived tone color, and verifying that the detected frequencies are correct by listening to them.
Technical Background
How Harmonic Detection Works
The Harmonic Overtone Detector uses a two-stage approach to identify and measure harmonics in real-time audio. First, the fundamental frequency (F0) is detected using time-domain autocorrelation β the signal is correlated with delayed copies of itself, and the lag with the highest correlation peak corresponds to the period of the fundamental. Autocorrelation is preferred over pure FFT peak-picking for F0 detection because it correctly identifies the true pitch even when the fundamental is weak or missing entirely (the "missing fundamental" phenomenon common in telephone audio and small speakers).
Once F0 is established, the tool performs an FFT (Fast Fourier Transform) with a window size of 8192 samples at the browser's native sample rate (typically 44,100 or 48,000 Hz). The FFT converts the time-domain audio into a frequency-domain spectrum. The tool then examines the FFT bins at each integer multiple of F0 β specifically at 2ΓF0 (H2), 3ΓF0 (H3), 4ΓF0 (H4), and so on up to 16ΓF0 (H16). For each harmonic, it uses parabolic interpolation across the three bins nearest the expected harmonic frequency to get a precise amplitude measurement in decibels, compensating for spectral leakage caused by the FFT windowing.
Total Harmonic Distortion (THD) is calculated from these measurements using the standard IEEE definition: THD = sqrt(sum of squared harmonic voltages from H2 through H16) divided by the H1 (fundamental) voltage. Amplitudes are converted from dB back to linear scale for this calculation, then the result is expressed as both a percentage and in dB (20 Γ log10 of the ratio). The odd/even harmonic classification follows the mathematical definition: H1, H3, H5, H7β¦ are odd (n is odd), while H2, H4, H6, H8β¦ are even. The ratio of total odd-harmonic energy to total even-harmonic energy characterizes the waveform symmetry β a ratio strongly favoring odd harmonics indicates a waveform with half-wave symmetry, such as a square or triangle wave.
Frequently Asked Questions
What is the difference between harmonics and overtones?
A harmonic is any integer multiple of the fundamental frequency: H1 (1ΓF0), H2 (2ΓF0), H3 (3ΓF0), etc. An overtone is any harmonic above the fundamental β so the 1st overtone equals the 2nd harmonic (H2), the 2nd overtone equals H3, and so on. In this tool, H1 is the fundamental and H2βH16 are both the 2ndβ16th harmonics and the 1stβ15th overtones.
What is Total Harmonic Distortion (THD) and what values are normal?
THD measures the ratio of harmonic energy to fundamental energy. A pure sine wave has 0% THD. Typical values: tuning fork or flute ~5β15%, clarinet ~10β25%, trumpet ~20β40%, violin ~30β60%, distorted guitar ~50β80%. In audio electronics, THD below 0.1% is considered "transparent" quality; below 1% is excellent for speakers. THD above 10% is clearly audible as harmonic richness or distortion.
Why does a clarinet have mostly odd harmonics?
A clarinet behaves acoustically as a closed cylindrical pipe β one end is sealed by the reed. Closed pipes only support standing waves at odd multiples of the fundamental frequency (1Γ, 3Γ, 5Γ, 7Γβ¦), which suppresses even harmonics (2Γ, 4Γ, 6Γβ¦). This gives the clarinet its distinctive hollow, woody tone. Open pipes (like a flute) support all harmonics. The odd/even balance indicator in this tool clearly shows this pattern when analyzing a clarinet.
How does instrument timbre matching work?
The tool stores normalized harmonic amplitude templates for common instruments (flute, clarinet, trumpet, violin, piano). When you play a sound, it measures the relative amplitudes of H1βH16 and computes a correlation score against each template. The instrument with the highest correlation is displayed with a confidence percentage. Scores above 90% indicate a very close harmonic profile match. The matching works best with sustained, single-note sounds at moderate volume.
Can I analyze harmonics from an audio file instead of a microphone?
Yes. Click Upload Audio File and select any audio file (WAV, MP3, OGG, FLAC, etc.). The tool decodes the file in your browser and runs the same harmonic analysis. File analysis processes a representative segment of the audio and displays the harmonic profile. This is useful for analyzing recordings of instruments, troubleshooting distorted audio, or verifying signal purity.
What does clicking a harmonic bar do?
Clicking any harmonic bar in the chart plays a pure sine tone at that harmonic's frequency for 1.5 seconds. For example, if the fundamental is 220 Hz and you click H3, you hear a 660 Hz sine wave. This lets you isolate and listen to each overtone individually β useful for ear training, understanding tone color, and verifying harmonic frequencies.
Is my audio data private?
Completely. All harmonic analysis runs entirely in your browser using the Web Audio API. No audio is recorded, stored, or transmitted to any server. Uploaded audio files are decoded locally and never leave your device. The tool works offline once loaded.
Related Tools
Frequency Detector
Real-time Hz detection with multi-frequency separation, waveform, and spectrum analysis.
Try it →Pitch Detector
Detect musical pitch in real time with note name, cents offset, and tuning accuracy.
Try it →Dominant Frequency Finder
Find the single strongest frequency with energy dominance %, octave bands, and hum identification.
Try it →