Skip to content

Add StereoMeters: gain-reduction, correlation and goniometer meters - #535

Merged
matt-edmondson merged 8 commits into
mainfrom
claude/project-thread-wmrk2b
Sep 30, 2026
Merged

matt-edmondson merged 8 commits into
mainfrom
claude/project-thread-wmrk2b

Conversation

@matt-edmondson

@matt-edmondson matt-edmondson commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Matt · project thread

Before: ktsu.ImGui.Widgets had a level meter (DbMeter) but nothing else a mixing or mastering UI puts beside it.

After: three more meters.

  • GainReductionMeter fills from the top edge by the magnitude of the reduction, with an optional held peak.
  • CorrelationMeter is a −1..+1 bar that fills outward from the centre, green when in phase and red when out.
  • Goniometer plots mid against side, so mono draws a vertical line, inverted material a horizontal one, and left-only material rises up-left.

Correlation ballistics live in a caller-owned StereoMetersState with no ImGui dependency, following the same ownership model as SpectrumAnalyzerState.

Implements #524 as written. Closes #524.

How

  • DbMeter's fill fraction, zone colours and drawing move into an internal MeterScale helper. DbMeter, SpectrumAnalyzer and the new meters share it, and ChannelFader (Domain widgets Tier 3: add ChannelFader (vertical fader with dB taper and a meter beside it) #528) will too. Nothing public changes, and DbMeterTests pass unedited.
  • Each new meter reserves its box with Dummy, then calls ImGuiProbes.MarkItem(label). None of the isolation tests call Mark.
  • Tests:
    • StereoMetersStateTests: 16 cases.
    • MeterScaleTests: 6 cases.
    • StereoMetersTests: 9 isolation cases.
  • A "Stereo Meters" demo section has sliders for phase offset, width and reduction. It lives in StereoMetersDemo.cs and is registered with one line in DemoSections.cs, now that the demo split (Split the widgets demo into one class per section #534) has merged.
  • Gallery tiles were added for all three meters, and StereoMetersState rides on the correlation tile. CLAUDE.md and the widgets README list the meters.

Local Release runs: ImGui.Widgets.Tests 416/416, ImGui.Widgets.UITests 420/420, ImGuiWidgetsDemo.UITests 32/32, WidgetGallery.UITests 6/6.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MBhLQ3ZkoYk8s5tKQ8RTAP

…minor]

Adds GainReductionMeter, CorrelationMeter and Goniometer to ImGui.Widgets,
with a caller-owned StereoMetersState for correlation ballistics and the
mid/side mapping. DbMeter's fill, zone colours and drawing move into an
internal MeterScale helper that the new meters and SpectrumAnalyzer share;
DbMeter draws exactly as before.

Each meter marks itself for probes. Includes unit and isolation tests, a
"Stereo Meters" demo section, gallery tiles, and the CLAUDE.md and README
entries.

Closes #524

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MBhLQ3ZkoYk8s5tKQ8RTAP
@matt-edmondson matt-edmondson self-assigned this Sep 29, 2026
Comment thread ImGui.Widgets/StereoMetersState.cs Fixed
Comment thread ImGui.Widgets/StereoMeters.cs Fixed
Comment thread tests/ImGui.Widgets.UITests/StereoMetersTests.cs Fixed
Comment thread tests/ImGui.Widgets.UITests/StereoMetersTests.cs Fixed
Comment thread tests/ImGui.Widgets.UITests/StereoMetersTests.cs Fixed
Comment thread tests/ImGui.Widgets.UITests/StereoMetersTests.cs Fixed
Comment thread tests/ImGui.Widgets.UITests/StereoMetersTests.cs Fixed
Comment thread ImGui.Widgets/MeterScale.cs Fixed
Comment thread ImGui.Widgets/StereoMetersState.cs Fixed
Replace the NaN-safe negated comparisons with explicit NaN checks, test
IntegrationTime with <= since its setter already clamps it to zero or
above, skip a correlation fill narrower than half a pixel rather than
testing for exact zero, and unwrap BoundsOfDifference with the suite's
existing ?? throw idiom instead of dereferencing .Value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MBhLQ3ZkoYk8s5tKQ8RTAP
…-wmrk2b

# Conflicts:
#	CLAUDE.md
#	examples/ImGuiWidgetsDemo/SignalDemos.cs
#	tests/ImGuiWidgetsDemo.UITests/WidgetsDemoUITests.cs
The SDK regenerates .gitignore on every build and drops the lines it
does not own, so the merge from main lost the .worktrees/ and
.superpowers/ entries main added. Put them back so this PR leaves
.gitignore as main has it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MBhLQ3ZkoYk8s5tKQ8RTAP
Resolves the list conflicts with main's TransportScrubber and zoomable Waveform: both
sides' widgets are kept in CLAUDE.md, the README, and the demo's section list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5vxUqKQpfaYcZeqVqMAwD
Resolves the CLAUDE.md widget list against TimecodeField (#538): main's
line, plus the three stereo meters.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MBhLQ3ZkoYk8s5tKQ8RTAP
SignalDemos, the demo's section list and CLAUDE.md's widget list each keep
both main's ParametricEq and this branch's stereo meters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXQQzcjzawva4jvnJhPtG3
…ions entry

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HgjMCJ9MQRmUk6c8KABDYH
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit d668fef into main Sep 30, 2026
16 checks passed
@matt-edmondson
matt-edmondson deleted the claude/project-thread-wmrk2b branch September 30, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Domain widgets Tier 3: add StereoMeters (gain-reduction, correlation and goniometer meters)

2 participants