3. Latency — audio to visual
- Budget: < 60 ms end-to-end from audible beat to visible reaction (~3 frames @ 60 Hz).
- Working allocation (rough, tune in Plan 0001 Phase 3-4): capture/delivery ≤ 15 ms, ring-buffer read-behind ≤ 20 ms, FFT hop ≤ ~11 ms (512 samples @ 48 kHz, window ≤ 2048), render + present ≤ 1-2 frames.
- The ring buffer may hold more than 60 ms of capacity; the requirement is that the DSP reads near the write head, not that the buffer is small.
- The
window ≤ 2048bound above governs the transient path, not the whole analyzer. Since ADR-0049 a second 8192 window feeds only the bands below the ~246 Hz crossover, which a 23.4 Hz bin cannot resolve. The 60 ms budget is unaffected because onset, beat and tempo all still read the 2048 window — the beat-to-reaction path never touches the long one. What the long window does cost is low-band level response: ~85 ms of Hann group delay, accepted as physics rather than compensated away, and applying tobassand the sub-crossoverbin()positions only. Cold start now publishes its first frame at ~171 ms instead of ~43 ms, once per stream. - Measured per-hop analysis cost is 51.8 µs, against the ~11 ms allocated above —
roughly 200x headroom. The figure has moved three times and each move is a spectral
pass: 17.2 µs before ADR-0049’s
long window, 31.5 µs after it, and 51.8 µs since
ADR-0215 added one short
FFT per channel for the per-band stereo field. That last step was measured against a
same-session baseline of 34.5 µs rather than against the 31.5 above, because the two
readings have to come off one machine on one day to be comparable — the per-channel pass
costs ~17 µs, not ~20. All of these are the same measurement by the same method
(
one_hop_analyzes_well_under_the_hop_interval, release, 1000 hops) on the reference machine; a number here is a measurement, not a property (ADR-0071). - This budget binds the window, and the streamed picture sits outside it.
ritmolux --stream(ADR-0125) publishes frames to another application, which then composites and presents them on its own schedule — so what a viewer of that composite sees is governed by the receiver’s pipeline, not by anything measurable here. Our half adds a GPU readback and an upload to the numbers above; everything after the Spout sender is out of our hands and is deliberately not budgeted. A latency claim about the streamed path is a claim about two applications, and this document only speaks for one.
Built from 13c7582 at version 0.158.0. This site tracks main and is not versioned per release.