xa-onset — onset envelope + detected onsets vs known click positions

A synthetic 10s click train at 120 BPM (20 clicks every 0.5s, sr=22050) is analyzed with onset_strength() and onsetDetect(). Proofs: the envelope has exactly ceil(len/hop) frames, 19–20 of the 20 clicks are recovered, the median inter-onset interval is within one hop (23.2ms) of 0.500s, and every detected onset lands within 100ms (one uncentered n_fft window) of a true click. Orange ticks mark detected onsets on the onset-strength envelope below the waveform. Same asserts as examples/node/xa-onset.mjs.