feat(LevelHistory): scrolling peak-history strip + calibration grid (crew-hardened) - #17
Merged
Conversation
…rridor Generalize OrbitCapture's per-mic MicHistory (fixed -21/-9 thresholds) into a family widget for the calibrators: push(linearPeak) per GUI tick scrolls one column (capacityTicks window), peak-hold sticks 30 ticks then walks down 0.8 dB/tick and is exposed via peakDb() for readouts/verdicts, setRange() zooms the dBFS window, setGreenZone(lo, hi) draws the corridor as dashed floor/ceiling lines and tints the trace/fill around it (grey in the noise, green inside, red above); an invalid pair clears back to a plain grey trace. Falsify suite reads the trace geometry off paint() through a recording context (affine dB->y map, scroll-out, corridor add/clear) and pins the hold ballistics through peakDb().
…-ceiling columns setClipCeiling(db) marks a "too hot" line independent of the displayed green zone: any history column whose peak broke it is painted a full-height red bar, so a single-tick overload spike stays visible instead of hiding down in the trace. NaN clears it. The red bars are fillRect draws (not trace paths), so the ballistics/trace math and the falsify path counts are untouched.
…oor + current-dB overlay LevelHistory: setRefLines (fixed dashed dBFS grid) + setNoiseFloor (black room-quiet line) + setCurrentDb (live corner readout) — the fixed-grid calibrator the ONC per-take level UI drives, replacing the moving corridor. Clip-ceiling now opens a yellow band up to the ceiling. LevelMeter: setRefLines grid + clip-ceiling warn-zone falsification coverage.
…+ ship-gate - LevelHistoryFalsifyTests: add ref-line-grid (dashed segment per reference dB; empty clears) and noise-floor (full-width fillRect at dBFS; non-finite hides) groups; a separate rects recorder keeps the trace path-count assertions intact. - ConsumerCompileCheck: exercise setRefLines/setNoiseFloor/setCurrentDb — the fixed-grid calibrator API the ONC per-take level UI actually drives. - LevelHistory/LevelMeter header docs rewritten for the ref-line-grid mode; fix the setCurrentDb doc (corner readout, not centred). README: add LevelHistory row.
- Ref-line gradient endpoints picked by dB (min/max), not vector position — an unsorted grid no longer inverts the fill above the hottest / below the coldest line. Order-independence covered by a new falsification case. - setRefLines drops non-finite dB entries (they corrupted the top gradient stop and tripped a debug assert in ColourGradient). - LevelMeter clip cap paints only once the clip-lamp feature is engaged (clipLatched_ || onClipClick) — meters that never use it keep their full bar, so existing OrbitCab consumers are unaffected. - LevelHistory falsify: assert the clip red-bar geometry (one full-height bar on the newest column) and the grid-mode fill reaches the floor — the shipped features were previously unfalsified. - LevelMeter zone boundary probes moved off the exact float edge (±0.05 dB) to survive a one-ULP libm difference off macOS. Doc: setClipCeiling expects a value above the green band. LevelHistory peak-age capped (no unbounded growth).
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
felitronics/appkit/LevelHistory.h— a header-onlyjuce::Componentscrolling dBFS peak-history strip for the family's capture calibrators (generalized from OrbitCapture's per-mic MicHistory), and finishes it with the fixed calibration-grid surface that the OrbitCapture per-take level UI actually drives. Plus smallLevelMeter.hadditions to match.LevelHistory
push(linearPeak)scrolls one column per GUI tick; visible window =capacityTicks/ feed rate.peakDb()holds ~1.5 s then decays.setRange()zooms the dBFS window.setRefLines({(dB,colour)…})— the primary calibrator surface: dashed reference lines that never move, trace fill/stroke gradient-tinted to match (endpoints picked by dB, so entry order is irrelevant).setNoiseFloor(dB)— a black room-quiet line.setCurrentDb(dB)— a live corner readout.setClipCeiling(dB)— full-height red bar for every over-ceiling column; in the legacysetGreenZonecorridor it also opens a yellow warn band.LevelMeter
setRefLinesfixed grid,setClipCeilingyellow warn-band + red line, clickable clip-lamp cap (setClipLatched/onClipClick). The cap paints only when the clip-lamp feature is engaged, so existing OrbitCab IN/OUT meters are unaffected.Consumer
orbit-nam-capture(feat/calibrator) consumes this:setRange/setRefLines/setNoiseFloor/push/setCurrentDb(history) andsetRange/setRefLines/onClipClick/setLevel/setClipLatched(meter).ConsumerCompileChecknow exercises that exact call set.Crew-hardened
Adversarial crew pass (codex + Fable-xhigh, verified against pinned JUCE 8.0.14). Fixed: order-dependent gradient endpoints;
setRefLinesNaN → debug-assert; unconditional clip-cap breaking backward-compat; unfalsified clip-bar/grid geometry; ULP-fragile boundary probes; unbounded peak-age. Argued-down: degenerateclip ≤ green-top(documented).Verification
-Werrorset.ConsumerCompileCheckgreen.LevelHistory.hrow.