Instrument Frequency Detector
Identify musical instruments by analyzing their harmonic profile and frequency range. See confidence scores for each instrument match, harmonic timbre bar charts, tuning verification, and a reference database covering 15+ instruments. Upload an audio file or use your microphone. 100% browser-based, no audio uploaded.
Instrument Frequency Detector Tool
| Instrument | Range | Frequency Span |
|---|
How to Use the Instrument Frequency 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 a Sustained Note
Play a sustained single note on your instrument. The detector works best with clear, isolated notes held for at least 1β2 seconds. The tool analyzes the harmonic overtone structure β each instrument produces a unique "fingerprint" of harmonic amplitudes that distinguishes it from other instruments playing the same pitch.
-
Read the Instrument Match
The primary match card shows the most likely instrument with a confidence percentage. Below it, the Top 3 Matches list shows alternative possibilities ranked by similarity. Confidence above 80% indicates a strong match. The harmonic profile bar chart compares your sound's overtone structure against the matched instrument's template.
-
Check Tuning and Frequency Range
The Tuning Checker tells you whether the detected instrument is in standard tuning β for example, "This guitar is in standard tuning" or "A4 is 3 cents sharp." The Instrument Range Reference table shows frequency spans for 15+ instruments with colored range bars, highlighting where your detected frequency falls.
-
Export or Review History
The Detection History log records every instrument identification with timestamp, frequency, and confidence. Click Export CSV to download all data including harmonic profiles and match scores, or Copy Data to paste a formatted summary into reports. Use keyboard shortcuts: Space to start/stop, R to reset, E to export.
Understanding Your Results
Instrument Identification via Harmonic Profile
Every musical instrument produces a unique pattern of harmonic overtones when playing a note. A flute is nearly pure fundamental with weak overtones, while a trumpet has many strong harmonics creating its bright, brassy character. This tool measures the relative amplitudes of harmonics H1 through H10 and compares this "fingerprint" against stored templates for each instrument using cosine similarity β a mathematical measure of how closely two profiles point in the same direction in harmonic space.
Confidence Scoring
The confidence percentage represents how closely your sound's harmonic profile matches the best instrument template. 90%+ is a very strong match β the harmonic structure closely resembles the template. 70β89% is a good match with some deviation (possibly due to playing technique, room acoustics, or microphone coloration). 50β69% is a weak match β the sound may be a different variant of the instrument or a different instrument entirely. Below 50% means the harmonic profile does not closely match any template.
Frequency Range Matching
In addition to harmonic profile matching, the tool checks whether the detected fundamental frequency falls within each instrument's known playing range. A note at 262 Hz (middle C) could be a piano, flute, violin, or clarinet β but a note at 41 Hz is almost certainly a bass guitar or cello, because most instruments cannot produce that frequency. Range matching provides a secondary filter that improves identification accuracy.
Tuning Verification
The tuning checker identifies the nearest standard pitch for common tuning systems. For guitar, it checks against standard tuning frequencies (E2=82.4 Hz, A2=110 Hz, D3=146.8 Hz, G3=196 Hz, B3=246.9 Hz, E4=329.6 Hz). For orchestral instruments, it compares against A4=440 Hz concert pitch. It reports the cents deviation β within Β±5 cents is considered in tune, Β±5β15 cents is slightly off, and beyond Β±15 cents is noticeably out of tune.
Timbre Comparison Visualization
The timbre comparison canvas overlays your detected harmonic profile (green bars) against the matched instrument's template profile (cyan outline). When the two patterns closely align, you have a strong match. Harmonics where the detected amplitude significantly exceeds the template may indicate resonance reinforcement, room coloration, or playing technique effects. Harmonics weaker than the template suggest damping or a different instrument variant.
Technical Background
How Instrument Detection Works
The Instrument Frequency Detector uses a multi-stage pipeline to identify instruments from audio. First, the fundamental frequency (F0) is detected using time-domain autocorrelation on the raw audio samples. Autocorrelation finds the signal's period by measuring self-similarity at different time lags β the lag with the strongest correlation peak corresponds to the period of the fundamental pitch. This method correctly identifies the true pitch even when the fundamental is weak or absent (the "missing fundamental" phenomenon).
Once F0 is established, the tool performs an FFT (Fast Fourier Transform) with an 8192-sample window and measures the amplitude at each integer multiple of F0 β specifically H1 (fundamental) through H10. Parabolic interpolation across the three FFT bins nearest each harmonic frequency provides sub-bin amplitude accuracy. The resulting 10-element amplitude vector is normalized relative to H1 to create a scale-independent harmonic profile.
This profile is then compared against a database of 18 instrument templates using cosine similarity: cos(theta) = (A dot B) / (|A| * |B|), where A is the detected profile and B is the template. Cosine similarity ranges from 0 (completely different) to 1 (identical shape), regardless of absolute amplitude. The instrument with the highest similarity score is reported as the primary match. A secondary frequency range filter checks whether the detected F0 falls within each instrument's known fundamental frequency range, penalizing instruments where F0 is outside their playable range. The combined score (weighted cosine similarity + range bonus) determines the final ranking.
Frequently Asked Questions
How does the instrument detector identify instruments?
The tool analyzes the harmonic overtone profile of your sound β the relative amplitudes of harmonics H1 through H10. Each instrument produces a characteristic pattern: flutes have a strong fundamental with weak overtones, trumpets have many strong harmonics, clarinets emphasize odd harmonics. The detected profile is compared against stored templates using cosine similarity, and the best match is reported with a confidence score.
What does the confidence percentage mean?
The confidence percentage reflects how closely your sound's harmonic profile matches the best instrument template. Above 85% indicates a very strong match. Between 60β85% is a reasonable match with some deviation. Below 60% means the harmonic profile is not a close match β the sound may be synthetic, heavily processed, or from an instrument not in the database.
How many instruments can it detect?
The database contains 18 instrument templates: guitar (acoustic and electric), piano, violin, viola, cello, double bass, flute, clarinet, oboe, bassoon, trumpet, French horn, trombone, tuba, saxophone (alto and tenor), and harmonica. Each template includes harmonic profile, frequency range, and characteristic description.
Does the tuning checker work for all instruments?
The tuning checker compares the detected frequency against standard reference pitches. For guitar, it checks against standard tuning (EADGBE). For orchestral instruments, it checks against A4=440 Hz concert pitch and reports cents deviation. It works best with sustained single notes β chords or rapid passages may produce unreliable readings.
Can I analyze instruments from an audio file?
Yes. Click Upload Audio File and select any audio file (WAV, MP3, OGG, FLAC, etc.). The tool decodes the file locally in your browser and runs the same instrument identification analysis. File analysis is useful for identifying instruments in recordings, verifying sample libraries, or analyzing unfamiliar sounds.
Why does it sometimes misidentify an instrument?
Several factors can affect accuracy: playing technique (muted or extended techniques change the harmonic profile), microphone quality (low-quality mics may attenuate high harmonics), room acoustics (resonances can boost certain harmonics), multiple instruments playing simultaneously, or effects processing (distortion, EQ, reverb alter the timbre). Single sustained notes in a quiet environment give the best results.
Is my audio data private?
Completely. All instrument 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
Harmonic Overtone Detector
Detect and visualize H1βH16 harmonics, THD calculation, instrument timbre matching, and CSV export.
Try it →Pitch Detector
Detect musical pitch in real time with note name, cents offset, and tuning accuracy.
Try it →Frequency Detector
Real-time Hz detection with multi-frequency separation, waveform, and spectrum analysis.
Try it →