Add StereoMeters: gain-reduction, correlation and goniometer meters - #535
Merged
Merged
Conversation
…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
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
|
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.



Requested by Matt · project thread
Before:
ktsu.ImGui.Widgetshad a level meter (DbMeter) but nothing else a mixing or mastering UI puts beside it.After: three more meters.
GainReductionMeterfills from the top edge by the magnitude of the reduction, with an optional held peak.CorrelationMeteris a −1..+1 bar that fills outward from the centre, green when in phase and red when out.Goniometerplots 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
StereoMetersStatewith no ImGui dependency, following the same ownership model asSpectrumAnalyzerState.Implements #524 as written. Closes #524.
How
DbMeter's fill fraction, zone colours and drawing move into an internalMeterScalehelper.DbMeter,SpectrumAnalyzerand the new meters share it, andChannelFader(Domain widgets Tier 3: add ChannelFader (vertical fader with dB taper and a meter beside it) #528) will too. Nothing public changes, andDbMeterTestspass unedited.Dummy, then callsImGuiProbes.MarkItem(label). None of the isolation tests callMark.StereoMetersStateTests: 16 cases.MeterScaleTests: 6 cases.StereoMetersTests: 9 isolation cases.StereoMetersDemo.csand is registered with one line inDemoSections.cs, now that the demo split (Split the widgets demo into one class per section #534) has merged.StereoMetersStaterides on the correlation tile.CLAUDE.mdand the widgets README list the meters.Local Release runs:
ImGui.Widgets.Tests416/416,ImGui.Widgets.UITests420/420,ImGuiWidgetsDemo.UITests32/32,WidgetGallery.UITests6/6.🤖 Generated with Claude Code
https://claude.ai/code/session_01MBhLQ3ZkoYk8s5tKQ8RTAP