palette: give the spectral mid and the envelope trace their own roles

Decouples the keyboard strip's mid stop from accent/secondary, which the
deep-teal darkening had inverted. Adds overlay/trace (#816AA6), the first
value to clear 3:1 against the waveform. Replaces the frozen-premise test.
This commit is contained in:
2026-07-31 13:27:20 -04:00
parent 04e4f875af
commit 91f71f92bd
6 changed files with 153 additions and 88 deletions
+6 -10
View File
@@ -25,11 +25,9 @@ using audio::computeEnvelope;
namespace {
// Marker roles — semantic, drawn through the kit's palette: start AND loop start/end both
// = teal (secondary). Loop markers moved off tertiary/purple so the loop span + bars no
// longer share a role with the envelope overlay trace, which owns tertiary exclusively in
// this region (measured RGB was identical: #C2AAE8 for both). Secondary-vs-primary contrast
// here measures 1.12:1, below tertiary's 1.37:1 — accepted deliberately: markers are bars
// and a span fill, not the 1px trace that pairing was moved off of.
// = teal (secondary). Markers are 2px bars and a 20%-alpha span fill, not the 1px trace, so
// they live with 1.92:1 against the waveform; the trace, which cannot, has its own role.
// Do not collapse the two back onto one role — they overlap in this rect.
constexpr Role kRoleStartMarker = Role::AccentSecondary;
constexpr Role kRoleLoopMarker = Role::AccentSecondary;
} // namespace
@@ -114,10 +112,8 @@ void ReaSamplerEditor::paintEnvelopeOverlay(LICE_IBitmap* bmp, const OverlayArea
const StageEnvelope env = packEnvelope(overlayEnv_, params_.play, frames, startFrame);
const std::vector<EnvVertex> poly = buildEnvelopePolyline(env, waveArea, totalSeconds);
// Trace the polyline in the categorical TERTIARY accent (purple): the waveform behind it is
// drawn in the primary lime, and the secondary teal this used to use sits too close to that
// hue to separate from it. Clip x to the wave rect. Knots are handles, not line vertices.
const LICE_pixel line = toLice(roleColor(Role::AccentTertiary));
// Clip x to the wave rect. Knots are handles, not line vertices.
const LICE_pixel line = toLice(roleColor(Role::OverlayTrace));
const EnvVertex* prev = nullptr;
for (const EnvVertex& v : poly) {
if (v.knot) continue;
@@ -132,7 +128,7 @@ void ReaSamplerEditor::paintEnvelopeOverlay(LICE_IBitmap* bmp, const OverlayArea
// accent-hot when this node is the grabbed one. Every vertex is guaranteed in-bounds; the
// handle is additionally clamped inside the band so one on an edge node never overhangs
// into the neighbouring bands.
const LICE_pixel handle = toLice(roleColor(Role::AccentTertiary));
const LICE_pixel handle = toLice(roleColor(Role::OverlayTrace));
const LICE_pixel handleHot = toLice(roleColor(Role::AccentHot));
for (const EnvVertex& v : poly) {
if (v.node == EnvNode::Origin || v.node == EnvNode::ReleaseEnd) continue;