From f12213f303cef0843134b9ddc3ebe75ab1a7351c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 23 May 2026 20:33:42 +0100 Subject: [PATCH] Prove continuous ASIO runtime ingest --- config/mimir-runtime.asio.example.json | 31 ++++++++++++++++++++++++++ docs/implementation-plan.md | 8 +++++++ notes/current-system-map.md | 5 ++++- notes/fresh-workspace-handoff.md | 4 +++- state/evidence.jsonl | 1 + state/map.yaml | 4 ++++ 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 config/mimir-runtime.asio.example.json diff --git a/config/mimir-runtime.asio.example.json b/config/mimir-runtime.asio.example.json new file mode 100644 index 0000000..9570a75 --- /dev/null +++ b/config/mimir-runtime.asio.example.json @@ -0,0 +1,31 @@ +{ + "bufferSeconds": 5.0, + "audioSync": { + "mode": "chirp-only", + "referenceSourceId": "asio-ch2", + "calibrationGain": 2.0, + "watermarkGain": 0.035, + "calibrationModelPath": "../calibration/chirp-bin/scarlett-artifact.json" + }, + "streams": [ + { + "sourceId": "focusrite-asio", + "kind": "Audio", + "origin": "LocalDevice", + "enabled": true, + "adapter": "frame-events", + "command": "../native/probes/asio_audio_cadence/build/Release/asio_audio_cadence.exe", + "arguments": [ + "--set-sample-rate", + "192000", + "--emit-json-blocks" + ], + "acceptSourceIds": [ + "asio-ch0", + "asio-ch1", + "asio-ch2", + "asio-ch3" + ] + } + ] +} diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index 6ea49f8..e65605f 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -128,6 +128,14 @@ a named invariant that the native runtime cannot protect yet. with two reliable symbols. Acoustic robustness remains separate from the clean loopback timing proof, but failed timing windows now leave usable response evidence instead of silence. +- `config/mimir-runtime.asio.example.json` is the minimal continuous Scarlett + runtime ingest proof. It starts the ASIO worker at 192 kHz with + `--emit-json-blocks` and declares `asio-ch0` through `asio-ch3` as accepted + audio sources. A two-second BufferSmoke run ingested 13,324 sample-bearing + blocks, 3,331 per channel, proving loopback and mic channels enter + `Mimir.Runtime` together in one ASIO clock domain. BufferSmoke does not emit + speaker calibration audio, so that proof is ingest-only rather than a sync + report. A standalone 192 kHz synthetic receiver test recovers a 500 ms delayed audio stream to below printed microsecond precision using only the chirp-bin codebook and schedule state. diff --git a/notes/current-system-map.md b/notes/current-system-map.md index c8590d1..92e48b0 100644 --- a/notes/current-system-map.md +++ b/notes/current-system-map.md @@ -167,7 +167,10 @@ persists the response/confusion/delay model, and `--analyze-asio-f32 --calibration ...` loads it into the active decoder. The ASIO worker also supports `--emit-json-blocks`, so Focusrite ASIO callbacks can feed sample-bearing `audio-block` events into `Mimir.Runtime` continuously through -the existing frame-event adapter while the native ABI cut is pending. A real +the existing frame-event adapter while the native ABI cut is pending. The +minimal `config/mimir-runtime.asio.example.json` proof ingested 13,324 +sample-bearing 192 kHz blocks across `asio-ch0` through `asio-ch3` in two +seconds, all from the same ASIO callback stream. A real 192 kHz chirp-bin Scarlett artifact decoded `Loopback 1 -> Loopback 2` at exactly `0.000 us` with 12 matched anchors and 0.999 confidence. The same analyzer now prints calibration profiles for diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 3d54985..450f22e 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -131,7 +131,9 @@ Get-Content .\state\evidence.jsonl -Tail 8 artifact, physical input 1 produced two reliable symbols and a different strongest-bin profile while failing pairwise timing. The ASIO native worker also supports `--emit-json-blocks` so `Mimir.Runtime` can ingest Focusrite ASIO - callbacks continuously through the frame-event adapter. Acoustic robustness is + callbacks continuously through the frame-event adapter. The minimal + `config/mimir-runtime.asio.example.json` proof ingested 13,324 sample-bearing + 192 kHz blocks across `asio-ch0` through `asio-ch3` in two seconds. Acoustic robustness is still open, but failed timing now leaves response evidence. - Raven also has a 192 kHz loopback-capable Scarlett for co-streamer/game timing evidence. Do not move the heavy soundfield or sensor-fusion workload there. diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 6ef0688..0ed08af 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -73,3 +73,4 @@ {"ts": "2026-05-23T20:03:21+01:00", "type": "implementation", "status": "ok", "note": "Added chirp-bin calibration profiles as the live meatspace response surface. MimirChirpBinCalibrationProfile summarizes per-source frames, anchors, clock confidence, anchor error, usable bins, and strongest measured bands from active chirp-bin decodes. MimirAudioSynchronizationAnalyzer keeps profiles even when timing reports are rejected, and BufferSmoke now prints them for runtime and ASIO artifact analysis. Verified build, 192 kHz chirp-only self-test, 500 ms standalone receiver self-test, Scarlett loopback sync, and physical input calibration evidence from the stored ASIO artifact."} {"ts": "2026-05-23T20:19:36+01:00", "type": "implementation", "status": "ok", "note": "Replaced the profile-only chirp-bin calibration cut with a usable physical calibration model. The model records per-source usable bands, symbol reliability, expected-vs-observed confusion observations, timing residuals, delay hypotheses, phase summaries, and an adaptive codebook plan. MimirChirpBinTimeline can now decode with learned per-symbol weights, group-delay correction, and persisted delay-hypothesis seeds. BufferSmoke can run --calibrate-chirp-bin-asio-f32 to render/capture/analyze/persist the model, and --analyze-asio-f32 can load it via --calibration. The ASIO native worker now supports --emit-json-blocks so Focusrite ASIO callbacks can feed Mimir.Runtime continuously through the existing frame-event adapter while the native ABI cut is still pending."} {"ts": "2026-05-23T20:31:27+01:00", "type": "implementation", "status": "ok", "note": "Completed the physical chirp-bin calibration loop instead of stopping at summaries. The calibration model now owns a shared emission plan from measured reliable symbols, and MimirRuntime renders chirp-bin calibration with that plan so dead bins are removed from the emitted alphabet and sequence order rises as needed. MimirChirpBinTimeline decodes variable-order codewords from the same emission plan, keeps learned response weights/group-delay correction, records bin-shift in confusion/delay hypotheses, and still preserves the default 32-symbol path when no model is loaded. ASIO callback ingestion remains continuous through the ASIO worker's sample-bearing runtime stream path; the next native ABI cut removes process transport overhead, not clock-domain ownership."} +{"ts": "2026-05-23T20:33:00+01:00", "type": "verification", "status": "ok", "note": "Verified continuous runtime ASIO ingestion through the ASIO worker stream path. Using config/mimir-runtime.asio.example.json, BufferSmoke ran for 2 seconds against Focusrite USB ASIO at 192 kHz and ingested 13,324 sample-bearing audio blocks across asio-ch0..asio-ch3, 3,331 blocks per channel, each 192 Float32 frames. This proves loopback and mic channels enter Mimir.Runtime buffers continuously in one ASIO clock domain; the run did not sync because BufferSmoke does not emit speaker calibration audio."} diff --git a/state/map.yaml b/state/map.yaml index 3e493d5..9522d24 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -144,6 +144,10 @@ accepted_design: pairwise timing against loopback in the stored artifact, but decoded mic channels now leave calibration models; physical input 1 produced two reliable symbols and a different strongest measured band set. + `config/mimir-runtime.asio.example.json` proves continuous ASIO runtime + ingest: a two-second BufferSmoke run at 192 kHz ingested 13,324 sample-bearing + blocks across `asio-ch0` through `asio-ch3`, all from the Focusrite ASIO + callback stream. Acoustic robustness remains open. The old arbitrary-chirplet matcher is a diagnostic/reference artifact only, not the runtime hot path.