home/ atoms/ fft-display-rate-update

a.fft is updated once per rendered frame at ~60 Hz — sub-frame transients are averaged away, making onset detection impossible

The FFT array is refilled inside Hydra’s requestAnimationFrame loop, once per frame, at display rate (~60 Hz). A single kick transient that lasts a few milliseconds in the audio domain is averaged over the 16.7 ms between frames. Combined with the one-pole smoothing (default smooth=0.5), any short transient is further blurred. This is why onset detection is not possible: there is no mechanism to detect that a discrete event occurred within a frame interval. The analyser only tracks how much energy is present in each band per frame, not whether a transient spiked and decayed within that frame.

Examples

A kick with a 5 ms transient fires inside one 16.7 ms frame window. The FFT sees the average energy of that window — lower than the peak — and further smooths it with the previous frame. The detected ‘spike’ is softer and wider than the original.

Assessment

Explain why a.fft[0] cannot be used to reliably detect individual kick hits, referencing the update cadence, smoothing mechanism, and what ‘averaging away’ means for sub-frame transients.

“`a.fft` is refilled **once per rendered frame**, inside `hydra.synth.update = () => source.a.tick()`, which Hydra calls from its `requestAnimationFrame` render loop — so **~60 Hz, display-rate, not audio-rate**. Sub-frame transients (a single kick click) are averaged/aliased away”
context/ · L2b-av-link/feature-contract.md · chunk 1