A 3 s 440 Hz sine with a silent middle third is rendered via getWaveformPeaks → renderWaveform (peaks/mirror), then addLoopRegions overlays the 1.0–2.0 s window. Badges probe actual canvas pixels: the loud third must be waveform-colored, the silent third must be blank before the overlay (amplitude→pixel mapping), and carry the loop tint after it (time→x mapping). Below: analyzeWaveform stats vs closed-form sine truth from a real AudioBuffer, the repaired renderStereoWaveform, and the repaired idempotent HiDPI resize.