Use styled Catmull-Rom spectra splines

This commit is contained in:
Meta Vens 2026-05-25 13:48:06 +01:00
commit 77224927d8
3 changed files with 13 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 KiB

View file

@ -18,7 +18,7 @@ public sealed class MimirRuntime : IAquariumRuntime
private const int CalibrationBatchSegments = 4;
private const int HybridWatermarkIntervalSegments = 4;
private const float DefaultSpectrumUpdateIntervalSeconds = 0.2f;
private const int SpectrumHistoryWindowCount = 72;
private const int SpectrumHistoryWindowCount = 40;
private const float SpectrumChannelSeparation = 1.75f;
private const float SpectrumWindowDepthSeparation = 0.18f;
private const float SpectrumWidth = 12.0f;
@ -604,7 +604,11 @@ public sealed class MimirRuntime : IAquariumRuntime
}
var points = BuildSpectrumWindowSpline(spectrum, channelCenter - channelIndex * SpectrumChannelSeparation, z, alpha);
splines.Add(new AquariumSpline3D($"spectrum-{spectrum.SourceId}-{windowIndex}", points, 1.0f));
splines.Add(new AquariumSpline3D(
$"spectrum-{spectrum.SourceId}-{windowIndex}",
points,
new AquariumSplineStyle(0.018f, 1.35f, 1.0f, 0.78f, 0.22f),
CatmullRomSubdivisions: 3));
}
}
@ -655,7 +659,9 @@ public sealed class MimirRuntime : IAquariumRuntime
new AquariumSplineVertex(new Vector3(SpectrumWidth * 0.5f, y, farZ), color),
new AquariumSplineVertex(new Vector3(-SpectrumWidth * 0.5f, y, farZ), color),
new AquariumSplineVertex(new Vector3(-SpectrumWidth * 0.5f, y, nearZ), color),
]));
],
new AquariumSplineStyle(0.006f, 0.8f, 0.7f, 0.72f, 0.28f),
CatmullRomSubdivisions: 1));
for (var line = 0; line <= 4; line++)
{
@ -665,7 +671,9 @@ public sealed class MimirRuntime : IAquariumRuntime
[
new AquariumSplineVertex(new Vector3(x, y, nearZ), color),
new AquariumSplineVertex(new Vector3(x, y, farZ), color),
]));
],
new AquariumSplineStyle(0.005f, 0.8f, 0.7f, 0.72f, 0.28f),
CatmullRomSubdivisions: 1));
}
}
}

View file

@ -115,3 +115,4 @@
{"ts": "2026-05-25T07:55:48+01:00", "type": "implementation", "status": "ok", "note": "Made runtime audio spectra labels first-class. MimirStreamDescriptor now carries an optional DisplayName/Label, MimirRuntimeConfigFile can assign per-source labels through sourceLabels, and the ASIO example labels Focusrite Input 1, Focusrite Input 2, Focusrite Loopback 1, and Focusrite Loopback 2. The FFT panel and telemetry now render human labels alongside machine source ids, so buffer sanity checks show both meaning and id. Verification with mimir-labeled-fft-20260525-075447.out.log showed labeled spectra for all four Focusrite ASIO lanes."}
{"ts": "2026-05-25T08:16:14+01:00", "type": "verification", "status": "ok", "note": "Rendered Fensalir MelSpectrumStack from Mimir ASIO rolling buffers with canary-packet-trill chirp-only song after scene-ready; captured artifacts/runtime/mimir-mel-spectrum-stack.png with four labeled 192 kHz Focusrite lanes."}
{"ts": "2026-05-25T13:18:43+01:00", "type": "verification", "status": "ok", "note": "Rendered live ASIO audio as Fensalir 3D spline spectrograms: each mel FFT window is one AquariumSpline3D per source, channels are stacked on Y, window history recedes on Z with alpha fade, and capture artifacts/runtime/mimir-3d-spectrum-splines.png proves the scene pass draws the rolling history after scene-ready with canary-packet-trill chirp-only output."}
{"ts": "2026-05-25T13:47:32+01:00", "type": "implementation", "status": "ok", "note": "Fensalir spline rendering now follows the XRLineRenderer-style shape: AquariumSpline3D carries Catmull-Rom subdivision plus radius/emission/alpha/zero-threshold/feather style, D3D12 expands sampled spline segments into camera-facing ribbon geometry, and D3D12SplinePS shades coverage from an SDF-like width coordinate. Mimir renders ASIO rolling mel windows through this primitive; capture artifacts/runtime/mimir-catmull-sdf-spectrum-splines.png verifies the canary-packet-trill runtime path."}