Instrument Frequency Detector

This instrument frequency detector identifies musical instruments by analyzing their harmonic profile and frequency range. It works as a musical instrument detector and harmonic profile analyzer: 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

πŸ”’ 100% private β€” all analysis runs locally in your browser. No audio is ever uploaded or stored.
Chrome Firefox Safari Edge
Space Start/Stop R Reset E Export CSV F Freeze C Calibrate
🎀 Microphone:
Sensitivity -60 dB
Click "Start Listening" or upload an audio file to begin instrument identification.
🎡
No instrument detected
β€” %
β€”
πŸ† Top 3 Instrument Matches
1. β€” β€” β€” %
2. β€” β€” β€” %
3. β€” β€” β€” %
Detected Frequency
β€” Hz
β€”
🎸 Tuning Checker
Play a note to check tuning
β€”
πŸ“Š Harmonic Profile (H1–H10)
Detected Template
πŸ“ˆ Spectrum with Instrument Overlay
🎼 Instrument Frequency Range Reference
Instrument Range Frequency Span
🎻 Timbre Comparison
πŸ“‹ Detection History
No detections yet. Start listening to build history.

How to Use the Instrument Frequency Detector

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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 harmonic 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. This timbre analysis approach is related to the techniques used in automatic instrument recognition (AIR) research and music information retrieval (MIR), where timbral features like spectral centroid and harmonic-to-noise ratio are used to classify sound sources.

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 built-in frequency range matcher 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. If you want to look up the exact Hz value for a specific note name, the note-to-Hz converter instantly shows the frequency for any note across all octaves.

Tuning Verification

The instrument 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. To generate a reference pitch at a known frequency and tune against it by ear, the tone generator produces pure sine tones at any frequency you specify.

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

As an instrument identifier, this tool 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). To explore a live visualization of the raw waveform shape alongside the spectrum β€” useful when debugging why a particular instrument isn't matching its template β€” the waveform visualizer provides an oscilloscope-style time-domain display.

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.

Share or embed this tool

Free to use on your own website β€” WordPress, Wix, or any platform. Paste one line and it works instantly, resizing to fit.


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.

Can it identify synthesizers or electronic instruments?

The detector is designed for acoustic and electric instruments that produce natural harmonic overtone series. Most synthesized sounds β€” especially those using wavetable synthesis, FM synthesis, or heavy effects β€” have non-standard harmonic profiles that may not match any template well, resulting in low confidence scores or false matches. A synthesizer set to mimic an acoustic piano or violin may match those templates if the harmonic structure is realistic, but heavily processed or synthetic timbres will generally yield unreliable results.

How is this different from a guitar tuner or chromatic tuner app?

A standard guitar tuner or chromatic tuner only detects pitch β€” it tells you the note name and how many cents sharp or flat you are. This instrument frequency detector goes further: it analyzes the harmonic timbre to identify which instrument is playing, compares the full overtone profile against 18 templates, and visualizes the spectral fingerprint alongside the tuning check. If you only need pitch and cents offset without timbral analysis, a dedicated chromatic tuner app is faster and more direct. Use this tool when you want to understand the instrument's acoustic character, not just its pitch.

Does it work for music education and classroom use?

Yes β€” this tool is well suited for music education. Teachers can use it to demonstrate the concept of timbre: why a violin and a flute playing the same note at the same pitch sound different. Students can visually compare the harmonic profile bar chart between instruments and develop an intuitive understanding of overtone structure. It is also useful for instrument identification exercises, where students guess the instrument from the timbre visualization before revealing the answer. Because no audio is uploaded or stored, it is safe for classroom environments.

What audio file formats does the upload mode support?

The upload mode supports any audio format that the browser's Web Audio API can decode, which includes WAV, MP3, OGG, FLAC, AAC, and M4A on most modern browsers. FLAC and WAV files typically give the best analysis results because they are lossless β€” MP3 and AAC compression can subtly alter harmonic amplitudes at high compression rates, though in practice the effect on instrument identification is minor for typical bitrates (128 kbps and above).