Sax Lab 🎷

An ML tutor for the instrument I practice at night. Real-time pitch detection written from scratch (autocorrelation — no libraries), grading long tones, intonation and stability. Everything runs in your browser: no server, no uploads, no cost.

autocorrelation pitch detection 0 dependencies on-device audio

CONTROLS

mic requires HTTPS (or localhost). nothing is recorded or uploaded — analysis happens in this tab.
—
play something
—
Hz
—
clarity

PITCH TRACK — live

your pitch nearest-note lane ±50 cents window

HOW PITCH DETECTION WORKS HERE

The mic's PCM buffer is correlated against itself at every lag; the first strong peak after the direct signal is the note's period, and parabolic interpolation sharpens it to sub-sample precision. ~60 detections/second, all in this tab.

WHAT THE GRADES MEASURE

  • duration — breath support over the hold
  • drift — median cents from the note (embouchure consistency)
  • σ stability — how flat the pitch line is (air control)

NO SAX? TRY IT ANYWAY

Hit play test tone — a synthesized reed-like tone with vibrato and slow drift runs through the same detector. Whistle or hum instead if you prefer being the instrument.