Commit Graph

3 Commits

Author SHA1 Message Date
Mikkeli Matlock 9a60b0ea72 feat: decouple plot resolution from frame rate via a 200 Hz ring buffer
Feed the scrolling plot from a lock-free SPSC ScopeRing instead of sampling one
atomic per egui frame, so horizontal resolution is set by the audio-clocked
bucket rate (~200 Hz) rather than the ~60 fps repaint. process() accumulates a
bucket every sample_rate/BUCKET_HZ samples (peak-preserving, spanning blocks)
and pushes it; the editor drains all new buckets each frame and folds them into
PLOT_N columns. Fast transients between frames are no longer dropped, and the
plot is now audio-clocked (freezes on pause, falls to silence on stop/reset).

Drop the per-frame plot_* atomics (the per-channel lamp now reads the decayed
bar level). Also fix the area fill: render it as a strip of per-segment convex
quads instead of one concave polygon, which egui fan-filled from a corner and
left stray triangles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 14:53:00 +09:00
Mikkeli Matlock 0c2e1597a1 feat: per-channel ceiling lamps in the meter widget
Replace the single global ceiling lamp with one lamp per channel cluster.
Each latches when that channel's output reaches 0 dBFS (a hot/over warning,
handy when pre-gain drives a band); the ALL channel additionally lights on a
real output-limiter catch. Same latch/hold/click-to-clear behavior, now per
channel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 05:02:39 +09:00
Mikkeli Matlock eb2499bad3 refactor: split editor.rs into editor/ widget modules
Move the egui editor from a single editor.rs into an editor/ module: mod.rs
(aggregator: create(), EditorState, layout, placeholder slider columns),
meter.rs (|L|GR|R| meters + ceiling lamp, owns MeterState), and plot.rs
(rolling in/out/GR plot, owns PlotState + PlotHistory). Each visualiser owns
its GUI state; the aggregator composes them. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 05:01:50 +09:00