From c192eba35aaed18aa8c5d2aac0ecba6e24ad2f36 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 28 May 2026 08:21:08 +0100 Subject: [PATCH] Add ASIO monitor split proof --- ...x-contour-monitor-split-20260528-081813.md | 53 +++++++++++++++++++ .../asio_audio_cadence/asio_audio_cadence.cpp | 16 +++++- notes/current-system-map.md | 7 +++ state/evidence.jsonl | 1 + state/map.yaml | 7 +++ 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 calibration/bioacoustic/complex-contour-monitor-split-20260528-081813.md diff --git a/calibration/bioacoustic/complex-contour-monitor-split-20260528-081813.md b/calibration/bioacoustic/complex-contour-monitor-split-20260528-081813.md new file mode 100644 index 0000000..7a63223 --- /dev/null +++ b/calibration/bioacoustic/complex-contour-monitor-split-20260528-081813.md @@ -0,0 +1,53 @@ +# Complex Contour Monitor Split Receipt 2026-05-28 08:18:13 + +## Setup + +- Renderer: `canary-packet-trill` +- Playback artifact: `artifacts/asio/canary-packet-monitor-split-20260528-081813-f32.raw` +- Output 0 capture: `artifacts/asio/scarlett-canary-packet-monitor-output0-20260528-081813-f32.raw` +- Output 1 capture: `artifacts/asio/scarlett-canary-packet-monitor-output1-20260528-081813-f32.raw` +- ASIO driver: `Focusrite USB ASIO` +- Sample rate: `192000` +- Capture seconds: `4.2` +- Probe change: `--play-output-channel` selects one ASIO output buffer; `-1` + remains the default all-output behavior. +- Physical mapping: + - `asio-ch0` / Input 1: shotgun, about 1.5 m from right monitor and 3.0 m from left monitor + - `asio-ch1` / Input 2: cardioid, about 0.5 m from left monitor and 1.5 m from right monitor + +## Signal Sanity + +Output 0 energized loopback channel `asio-ch2`; `asio-ch3` was silent. +Output 1 energized loopback channel `asio-ch3`; `asio-ch2` was silent. + +Physical input RMS stayed high in both captures: + +| Capture | `asio-ch0` RMS | `asio-ch1` RMS | Reference loopback | +| --- | ---: | ---: | --- | +| output 0 | `0.014660` | `0.050159` | `asio-ch2` | +| output 1 | `0.019050` | `0.040859` | `asio-ch3` | + +## Results + +| Output | Reference | Mic | Estimate | Confidence | Direct Hits | +| --- | --- | --- | ---: | ---: | ---: | +| output 0 | `asio-ch2` | shotgun / `asio-ch0` | `783.629083` samples / `4081.401 us` | `0.392` | `19` | +| output 1 | `asio-ch3` | shotgun / `asio-ch0` | `779.619141` samples / `4060.516 us` | `0.376` | `18` | +| output 0 | `asio-ch2` | cardioid / `asio-ch1` | `547.779779` samples / `2853.020 us` | `0.285` | `14` | +| output 1 | `asio-ch3` | cardioid / `asio-ch1` | `543.020433` samples / `2828.231 us` | `0.383` | `17` | + +## Interpretation + +The ASIO probe now isolates output buffers, and the loopback channels confirm +that output 0 and output 1 are distinct at the interface. The physical mic +delays, however, are nearly identical across output channels: + +- shotgun differs by about `20.885 us`; +- cardioid differs by about `24.789 us`. + +That is not compatible with the declared monitor geometry if output 0 and +output 1 correspond to isolated left/right monitors in the room. The current +evidence says the downstream monitor path is probably summing, mirroring, or +otherwise not isolating the physical speakers as assumed. Do not use this +receipt to learn left/right acoustic geometry until physical speaker isolation +is verified. diff --git a/native/probes/asio_audio_cadence/asio_audio_cadence.cpp b/native/probes/asio_audio_cadence/asio_audio_cadence.cpp index 999f91e..dca8c41 100644 --- a/native/probes/asio_audio_cadence/asio_audio_cadence.cpp +++ b/native/probes/asio_audio_cadence/asio_audio_cadence.cpp @@ -125,6 +125,7 @@ struct CaptureState std::vector sweepSamples; std::vector* playbackSamples = nullptr; double playbackGain = 1.0; + long playbackOutputChannel = -1; std::vector* recordedInput = nullptr; unsigned long long recordFrames = 0; unsigned long long sweepFrame = 0; @@ -320,6 +321,11 @@ void processOutput(long doubleBufferIndex) for (size_t channel = 0; channel < g_capture.outputBuffers->size(); ++channel) { + if (g_capture.playbackOutputChannel >= 0 && static_cast(channel) != g_capture.playbackOutputChannel) + { + continue; + } + auto& buffer = (*g_capture.outputBuffers)[channel]; auto& info = (*g_capture.outputChannels)[channel]; auto* raw = static_cast(buffer.buffers[doubleBufferIndex]); @@ -498,6 +504,12 @@ double doubleOption(int argc, char** argv, const char* name, double fallback) return raw ? std::atof(raw) : fallback; } +long longOption(int argc, char** argv, const char* name, long fallback) +{ + const char* raw = option(argc, argv, name, nullptr); + return raw ? std::atol(raw) : fallback; +} + bool hasArg(int argc, char** argv, const char* name) { for (int index = 1; index < argc; ++index) @@ -576,6 +588,7 @@ int main(int argc, char** argv) const char* playFloat32MonoPath = option(argc, argv, "--play-f32-mono", nullptr); const char* recordFloat32InterleavedPath = option(argc, argv, "--record-f32-interleaved", nullptr); const auto playGain = doubleOption(argc, argv, "--play-gain", 1.0); + const auto playOutputChannel = longOption(argc, argv, "--play-output-channel", -1); const auto sweepGain = doubleOption(argc, argv, "--sweep-gain", 0.03); const auto sweepToneSeconds = doubleOption(argc, argv, "--sweep-tone-seconds", 0.55); const auto sweepGapSeconds = doubleOption(argc, argv, "--sweep-gap-seconds", 0.20); @@ -731,7 +744,7 @@ int main(int argc, char** argv) playbackSamples.resize(static_cast(byteCount) / sizeof(float)); input.read(reinterpret_cast(playbackSamples.data()), static_cast(playbackSamples.size() * sizeof(float))); } - std::printf("asio playback-f32-mono: path=%s samples=%zu gain=%.5f\n", playFloat32MonoPath, playbackSamples.size(), playGain); + std::printf("asio playback-f32-mono: path=%s samples=%zu gain=%.5f outputChannel=%ld\n", playFloat32MonoPath, playbackSamples.size(), playGain, playOutputChannel); } if (captureSeconds > 0.0 || monitorSweep || !playbackSamples.empty() || emitJsonBlocks) @@ -820,6 +833,7 @@ int main(int argc, char** argv) g_capture.sweepGain = sweepGain; g_capture.playbackSamples = playbackSamples.empty() ? nullptr : &playbackSamples; g_capture.playbackGain = playGain; + g_capture.playbackOutputChannel = playOutputChannel; g_capture.emitJsonBlocks = emitJsonBlocks; g_capture.sweepFrame = 0; g_capture.sweepEnergy.assign(sweepFrequencies.size() * static_cast(inputs), 0.0); diff --git a/notes/current-system-map.md b/notes/current-system-map.md index 1a98706..119d6c2 100644 --- a/notes/current-system-map.md +++ b/notes/current-system-map.md @@ -314,6 +314,13 @@ the shotgun, about 1.5 m from the right monitor and 3.0 m from the left; `asio-ch1` is the cardioid, about 0.5 m from the left monitor and 1.5 m from the right. Repeat captures are needed before updating the channel model or letting physical mic reports drive actuator authority. +`complex-contour-monitor-split-20260528-081813.md` adds +`--play-output-channel` to the ASIO probe and captures output 0 and output 1 +separately. Loopback proves the ASIO output buffers are distinct, but physical +mic delays are nearly identical across outputs: shotgun differs by about +20.885 us and cardioid by about 24.789 us. That does not match the declared +left/right monitor geometry, so the downstream monitor path is probably +summing, mirroring, or otherwise not isolating the physical speakers. The first actuator proof now exists: `faust/mimir_alignment_actuator.dsp` owns six channels of bounded fractional delay/gain controls for Faust/native DSP, and `Mimir.BufferSmoke --bioacoustic-actuator-self-test --sample-rate 48000 diff --git a/state/evidence.jsonl b/state/evidence.jsonl index e4cef3a..0cc51f1 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -203,3 +203,4 @@ {"ts": "2026-05-28T00:27:19+01:00", "type": "verification", "status": "blocked", "note": "Fresh complex-contour Scarlett proof 20260528-002313: ASIO loopback ch2->ch3 measured -0.062 us with 0.956 confidence and 257 direct hits, but physical inputs ch0/ch1 produced zero contour hits against 1480 reference hits. Physical mic proof is blocked on input signal/gain/routing/source placement, not receiver code."} {"ts": "2026-05-28T08:09:07+01:00", "type": "verification", "status": "ok", "note": "Monitor-routed complex-contour Scarlett proof 20260528-080727: loopback ch2->ch3 measured -0.014 us at 0.971 confidence; physical Input 1/asio-ch0 landed -0.410 us from seed at 0.524 confidence with 24 direct hits; Input 2/asio-ch1 landed -2.467 us at 0.363 confidence with 14 direct hits. Previous 080604 run was headphone-routed by mistake and is marked as misroute witness."} {"ts": "2026-05-28T08:14:31+01:00", "type": "observation", "status": "ok", "note": "Physical mapping for monitor-routed complex-contour proof: asio-ch0/Input 1 is the shotgun, about 1.5 m from right monitor and 3.0 m from left; asio-ch1/Input 2 is the cardioid, about 0.5 m from left monitor and 1.5 m from right. Geometry should be used when interpreting 20260528-080727 path delays."} +{"ts": "2026-05-28T08:20:48+01:00", "type": "verification", "status": "blocked", "note": "ASIO monitor split proof 20260528-081813 added --play-output-channel and captured output 0/output 1 separately. Loopback channels confirmed distinct ASIO output buffers, but physical mic delays were nearly identical across outputs (shotgun delta about 20.885 us; cardioid delta about 24.789 us), inconsistent with declared left/right monitor geometry. Downstream monitor routing/isolation must be verified before learning left/right acoustic paths."} diff --git a/state/map.yaml b/state/map.yaml index ca4f39d..4c0aafc 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -328,6 +328,13 @@ accepted_design: from the left; `asio-ch1` is the cardioid, about 0.5 m from the left monitor and 1.5 m from the right. Repeat captures are needed before channel-model updates or actuator authority. + `complex-contour-monitor-split-20260528-081813.md` added ASIO + `--play-output-channel` and captured output 0/output 1 separately. + Loopback channels prove the ASIO output buffers are distinct, but + physical mic delays differ by only about 20.885 us for the shotgun and + 24.789 us for the cardioid across outputs. This does not match the + declared monitor geometry; verify downstream monitor routing/isolation + before learning left/right acoustic paths. `calibration/bioacoustic/complex-contour-replay-panel.json` persists the current four-case replay receipt. Acoustic robustness remains open.