own projectnov 2026
bard
local karaoke trainer that draws your pitch over the melody and scores you.
private repo, no public link
pitch line drawing over the melody (10 to 20 s, no audio, synthetic demo song
- whennov 2026
- built in3 days of commits, 10 to 13 nov 2026
- teamsolo
i wanted to get better at singing, so i built the trainer i wanted instead of finding one.
bard plays the backing track, listens on the mic, and draws your pitch as a line over the original singer's melody. it scores you out of 100 and keeps every take so you can watch the number move.
the first night i sang into it and wrote down every complaint. it gave me a headache because i had to stare at the notes, the dots jumped around, and the piano in the backing track kept being picked up as my voice.
so the sing screen became calm: one line of the song at a time, nothing scrolling, one arrow saying higher or lower. i also rewrote the pitch detector and measured it against exact ground truth instead of trusting my ears.
then it grew: a harder pro score, hum-it-back drills, a voice gym, and a live party where friends' phones are the microphones.
everything runs on one laptop. nothing is uploaded.



- pitch detection is the McLeod pitch method (autocorrelation by FFT, via the small pitchy library), run every 10 ms on the browser's audio thread. it tries a short window first and longer ones until the window holds enough periods, folds back sudden octave jumps, and smooths the marker with a 1-euro filter while scoring uses the unsmoothed pitch (web/detect.js header).
- the reference melody for your own audio file comes from a prep step: ffmpeg decode, vocal and backing split with the BS-RoFormer model on the Mac GPU, then the singer's pitch tracked with SwiftF0 and cleaned into notes, one value every 20 ms (README, prep/prep.py). for catalogue songs the melody is an UltraStar notes file and the music plays from YouTube's own player, so bard downloads no audio.
- scoring compares each reference frame with your closest pitch within 80 ms, in cents with octaves folded. regular gives full credit within 50 cents, pro within 20. both scores are saved from the same take, plus up to 5 bonus points for notes sung almost exactly (README, web/scoring.js).
- detection was tuned with an offline eval: the app's own JavaScript is replayed in Node over a take and compared to ground truth. on a synthetic stand-in for a low voice with speaker bleed, voiced recall went from 88.1% to 95.5% and drop-outs from 105 to 28 (docs/detection-eval.md). these numbers are from a synthetic take, not a real voice.
- the server has no npm dependencies and the front end has no build step. plain Node, one JSON file for data, about 14,000 lines of JS, Python and CSS outside vendored libraries (own count). one command,
./bard e2e, runs headless Chromium with a fake microphone and checks a full take is drawn, scored and saved. - phones can join as microphones: each phone works out its own pitch and sends only numbers over a WebSocket, so friends can sing against each other on one master screen (README, docs/phone-mic.md).
- 112commits, 10 to 13 nov 2026: 26, 27 and 59 on the three days
- about 14,000lines of JS, Python and CSS excluding vendored libraries
- 10 mspitch hop, 20 ms reference melody resolution
- 50and 20 cent full-credit bands for regular and pro scoring
- about 7,000catalogue songs searchable, 53 in the starter pack
- voiced recall 88.1% to 95.5% on a synthetic take
- prep takes about 4 times the song length for vocal separation