A pitch line has to be notes, not a curve

A pitch tracker produces a continuous estimate. Drawing that estimate is the obvious thing to do and it does not work, for a reason that is easy to state and takes measuring to believe: a sung note is not a stable pitch.

The curve does not hold still

People sing with vibrato and slide into pitches. The instantaneous estimate wanders above and below the semitone continuously. Measured against real cached recordings: after quantising each frame to a semitone, a run holds the same value for one or two frames on average — 80 to 160 ms.

Drawn, that is a wriggling line rather than a target. It is an honest picture of the signal and a useless picture for someone trying to aim at something.

The segmentation that worked

The line is cut into notes using standard note-transcription rules: split on pauses longer than 0.2 s and on jumps of a semitone and a half or more; split again if a segment spans more than two semitones; take the median within each segment; drop segments whose first and last thirds differ by a semitone or more, since those are slides rather than notes; merge adjacent segments that landed on the same semitone.

The median matters more than it looks. The mean of a slide between two notes is a pitch nobody sang. The median is always a pitch that was actually sung, which is the property you want in something a person is about to imitate.

The result matched hand-authored charts

Across five songs those rules produced 247–388 notes each, at a median duration of 0.27–0.33 s. That is the density and length distribution of a hand-authored UltraStar chart.

This is the part worth reporting. It says the raw material was always good enough — the tracker was not the problem — and the missing step was segmentation rather than better pitch detection. It is easy to spend a long time improving an estimator when what is wrong is the representation.

The curve is not thrown away. It survives as a faint thin line drawn inside the note bars: the note says hold this pitch, the thin line says where inside it you actually are.

Ignoring the octave, every frame

Doubling and halving errors are the most common failure of pitch detection. karanow folds every measured frame into the octave of the note being sung, with no state carried between frames.

The earlier version decided the octave once per song and locked it. One bad decision was then wrong for the whole song, and a singer changing register was wrong by construction. UltraStar’s own documentation is blunt about the general case: its algorithm "suffers from double pitch errors, but since USDX ignores the octave, this poses no problem." Judging correctness modulo 12 is right for the same reason — singing a female part an octave down is still singing it correctly.

Drawing nothing is a picture too

An earlier design had a cursor that showed the sung pitch. Its problem was structural rather than cosmetic: a cursor has to be somewhere even during silence, so it followed whatever the microphone heard — room noise, speaker bleed, the backing track. It jittered exactly when the singer was doing nothing.

Drawing the sung pitch on top of the notes and drawing nothing at all when nobody is singing removes the problem instead of smoothing it. Absence is the honest rendering of absence.

Engineering notes