Skip to content

v0.6.0 UI6-C4: band-column strip under spectrum - #18

Open
SeamusMullan wants to merge 1 commit into
v0.6.0/threshold-statusfrom
v0.6.0/ui6-c4-band-columns
Open

v0.6.0 UI6-C4: band-column strip under spectrum#18
SeamusMullan wants to merge 1 commit into
v0.6.0/threshold-statusfrom
v0.6.0/ui6-c4-band-columns

Conversation

@SeamusMullan

Copy link
Copy Markdown
Member

Summary

Adds per-band gate-control columns directly under the spectrum so the editor reads top-to-bottom as "spectrum → the bands inside it → their controls", matching the threshold's spectral-identity requirement.

  • New BandGate::BandColumn — narrow vertical strip with a tinted header (same colour the spectrum uses for that band's lane), a threshold slider, tilt + smoothing knobs, and F/S/M toggles. Owns its own APVTS attachments for a fixed band index — no ACTIVE_BAND swap.
  • PluginEditor owns 6 columns; only the first NUM_BANDS are visible.
  • layoutBandColumns() positions each column on the same log-frequency axis the spectrum uses, so columns line up under their band region. CROSSOVER_n changes trigger a relayout via the new parameter listener.
  • Clicking a column header sets ACTIVE_BAND so the existing gate tab + relay strip continue to reflect that band's parameters.

The existing gate / relay tabs stay in place — both the gate tab and the columns target the same per-band APVTS parameters, so this is purely additive at the data layer.

Layout impact

  • Default editor size grows from 920×716 to 1000×868 to fit the strip cleanly.
  • Minimum bumps from 720×720 to 820×860; the spectrum still absorbs vertical shortfall down to 130 px so the columns + control rows stay usable.

Refs v0.6.0-threshold.md UI6-C4.

Dependencies

Test plan

  • cmake --build build --target BandGate_VST3 succeeds.
  • Open the editor: confirm 5 columns appear under the spectrum at default NUM_BANDS = 5, each tinted to match its band lane.
  • Drag a crossover handle on the spectrum: confirm column widths reflow to the new band boundaries.
  • Change NUM_BANDS: confirm columns appear / disappear from the right.
  • Click a column header: confirm the existing relay strip switches to that band.
  • Twist a column's threshold + confirm the gate tab's threshold slider (also bound to the same param) tracks.

🤖 Generated with Claude Code

Adds per-band gate-control columns directly under the spectrum so the
layout reads top-to-bottom as "spectrum -> the bands inside it -> their
controls", matching the threshold's spectral-identity requirement.

- New BandGate::BandColumn — narrow vertical strip with a tinted header,
  a threshold slider, tilt + smoothing knobs, and F/S/M toggles. Owns
  its own APVTS attachments for a fixed bandIndex (no ACTIVE_BAND swap
  needed on this column path).
- PluginEditor owns 6 BandColumns; only the first NUM_BANDS are visible.
- layoutBandColumns() positions each column on the same log-frequency
  axis the spectrum uses (logX(fLo..fHi) per band), so columns align
  visually under their band region. CROSSOVER_n changes trigger a
  relayout via the new parameter listener.
- Clicking a column header sets ACTIVE_BAND so the existing gate tab +
  relay strip still reflect that band's parameters.
- Default editor size grows to 1000x868 to fit the new strip cleanly;
  minimum bumps to 820x860 with the spectrum still absorbing vertical
  shortfall down to 130 px.

The existing gate / relay tabs stay in place — gate-tab edits and column
edits both target the same per-band APVTS parameters, so the change is
purely additive at the data layer.

Refs v0.6.0-threshold.md UI6-C4.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new per-band “gate control column” strip directly under the spectrum display, aligning each band’s controls with its spectral region and enabling relayout when crossovers/NUM_BANDS change.

Changes:

  • Introduces BandGate::BandColumn component with per-band APVTS attachments and active-band highlighting.
  • Updates PluginEditor to own/layout a fixed set of columns and relayout them on NUM_BANDS and CROSSOVER_n changes.
  • Adjusts editor default/min sizes to accommodate the new strip.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
source/PluginEditor.h Adds BandColumn ownership, layout/refresh helpers, and required includes.
source/PluginEditor.cpp Instantiates columns, listens for crossover changes, implements log-frequency layout, and updates sizing/layout.
source/Editor/BandColumn.h New component interface for a per-band vertical control strip with fixed-band attachments.
source/Editor/BandColumn.cpp New component implementation (controls, attachments, painting, and internal layout).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/PluginEditor.cpp
Comment on lines +408 to +410
xL = juce::jmax (xL + 1, stripArea.getX());
if (xR - xL < 60)
xR = xL + 60;
Comment thread source/PluginEditor.cpp
Comment on lines +311 to +314
else if (parameterID.startsWith ("CROSSOVER_"))
{
safe->resized();
}
Comment thread source/PluginEditor.cpp
Comment on lines +555 to +556
constexpr int bandColumnsH = 132;
layoutBandColumns (area.removeFromTop (bandColumnsH));
Comment on lines +10 to +17
juce::Colour bandColourFor (int idx)
{
// Matches SpectrumVisualizer::bandColour so spectrum band lanes and the
// column header below them agree on the per-band tint.
static const juce::uint32 cols[] = {
0xff4ecdc4, 0xffffe66d, 0xffff6b6b, 0xffa29bfe, 0xff95e1d3, 0xfff38181
};
return juce::Colour (cols[(size_t) idx % (sizeof (cols) / sizeof (cols[0]))]);
Comment thread source/PluginEditor.cpp
Comment on lines +553 to +557
// UI6-C4: band-column strip directly under the spectrum so the gate controls
// sit visually beneath the band region they affect.
constexpr int bandColumnsH = 132;
layoutBandColumns (area.removeFromTop (bandColumnsH));
area.removeFromTop (Layout::gap);
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.

2 participants