Render live audio spectra after scene ready

This commit is contained in:
Meta Vens 2026-05-25 07:06:25 +01:00
commit 6e370ff2ac
3 changed files with 450 additions and 3 deletions

View file

@ -109,3 +109,4 @@
{"ts": "2026-05-25T06:37:00+01:00", "type": "verification", "status": "partial", "note": "Ran a fresh live Scarlett complex-contour pass through the physical output/input path. Rendered `artifacts/asio/canary-packet-live-20260525-063229-f32.raw`, played it through Focusrite ASIO at 192 kHz, and captured `artifacts/asio/scarlett-canary-packet-live-20260525-063229-f32.raw` from all four inputs. Loopback 1 -> Loopback 2 measured -0.014 us with 216 direct hits and 0.008 sample MAE. With `calibration/bioacoustic/complex-contour-channel-model.json` loaded, shotgun measured -3.984 us from prior seed and cardioid measured +1.547 us from prior seed. This proves fresh meatspace viability, but physical mic confidence remains low; next work is stronger direct-path confidence and independent distance/path truth. Receipt: `calibration/bioacoustic/complex-contour-live-20260525-063229.md`."}
{"ts": "2026-05-25T06:50:00+01:00", "type": "implementation", "status": "ok", "note": "Corrected `MimirDirectPathTracker` confidence scoring. The old score normalized direct-cluster confidence against all alternate matched-filter lobes, which made a nearly perfect loopback lock report only 0.126 confidence. Confidence now primarily belongs to the selected direct cluster: direct-hit count, residual tightness, phase coherence, and prediction agreement; nearby competing lobes apply only an ambiguity penalty. Reanalysis of `scarlett-canary-packet-live-20260525-063229-f32.raw` leaves delays unchanged but raises Loopback 1 -> Loopback 2 confidence to 0.971, cardioid confidence to 0.488, and the weaker/disconnected-looking channel to 0.335."}
{"ts": "2026-05-25T06:59:00+01:00", "type": "correction", "status": "invalidated", "note": "Invalidated the apparent cardioid timing proof in `calibration/bioacoustic/complex-contour-live-20260525-063229.md`. The log-mel spectrogram and channel statistics show `asio-ch0` is not a real acoustic signal in that capture: RMS is almost flat (`0.00208350` to `0.00209815` by 0.1s block), peak is only `0.00334287`, and zero-lag correlation with loopback is `0.000032`. The near-seed +1.547 us contour estimate was a seeded tracker fit against noise, not physical mic evidence. The receipt remains valid as a loopback/interface proof (`asio-ch2` -> `asio-ch3` at -0.014 us, confidence 0.971) plus a weak/non-authoritative input witness."}
{"ts": "2026-05-25T07:05:34+01:00", "type": "implementation", "status": "ok", "note": "Added runtime FFT spectra and Fensalir readiness gating. Fensalir now calls IAquariumRuntime.OnSceneReady after the first presented ready frame; Mimir waits for that callback before emitting bioacoustic test audio, running sync analysis, or updating the cached spectrum diagnostics. MimirAudioSpectrumAnalyzer computes bounded Hann-windowed radix-2 FFT snapshots from rolling audio buffers, exposes top peaks/log bands/RMS/peak, and Mimir renders cached spectra in the DirectWrite UI plus telemetry. Verification run with ASIO config showed scene-ready before bioacoustic chunks and live 8192-point spectra for asio-ch0 through asio-ch3; asio-ch0 remains flat low-level noise while loopback/mic-bearing channels show song-band peaks."}