instrument: one VELOCITY deck for all three velocity curves, bipolar and off by default for pitch and filter
Payload v12 appends the new velocity->pitch curve and folds the retired filter velAmount into its now-bipolar curve, so pre-v12 projects reopen sounding identical. Preview button takes a drawn play triangle.
This commit is contained in:
@@ -86,6 +86,9 @@ private:
|
||||
// spelling.
|
||||
using OverlayEnv = instrument::ui::OverlayEnv;
|
||||
|
||||
// Which of the three velocity curves a deck cell edits — also the popup's open state.
|
||||
using CurveTarget = instrument::ui::CurveTarget;
|
||||
|
||||
// Controls on the setup surface. The int value is the opaque control id the pure
|
||||
// knob_deck hit-test returns; the shell maps it to the one parameter set or a
|
||||
// processor-side per-instance setter. The id space and the deck's group composition are
|
||||
@@ -120,7 +123,6 @@ private:
|
||||
kCurveNode, // a velocity-curve control point (index = point index)
|
||||
kVelKnob, // the chrome preview-velocity radial knob
|
||||
kStripKey, // a piano-strip key (index = MIDI note); carries the name tooltip
|
||||
kCurveButton, // the chrome mini curve-preview button (opens the popup)
|
||||
kPopupClose, // the curve popup's Close (x) button
|
||||
};
|
||||
struct HoverTarget {
|
||||
@@ -159,11 +161,12 @@ private:
|
||||
// label<->value swap on hover/drag.
|
||||
void paintDeck(LICE_IBitmap* bmp, const FaceLayout& fl);
|
||||
|
||||
// The mini curve-preview button (chrome) and the modal curve editor it summons.
|
||||
void paintCurveButton(LICE_IBitmap* bmp, const Rect& r);
|
||||
// A deck cell's mini curve thumbnail (the VELOCITY group) and the modal editor it summons.
|
||||
void paintCurveButton(LICE_IBitmap* bmp, const Rect& r, CurveTarget target, bool disabled,
|
||||
bool hovered);
|
||||
void paintCurvePopup(LICE_IBitmap* bmp, int w, int h);
|
||||
// The velocity->amp transfer-curve editor (X = velocity 0-127, Y = amp 0-1); its only
|
||||
// host is the popup sheet. `r` empty -> draws nothing.
|
||||
// The velocity transfer-curve editor (X = velocity 0-127, Y = the curve's own domain); its
|
||||
// only host is the popup sheet. `r` empty -> draws nothing.
|
||||
void paintVelocityCurve(LICE_IBitmap* bmp, const Rect& r);
|
||||
// Traces the amp-envelope overlay + its draggable node handles over `waveArea`, ONCE at
|
||||
// full band height (never per lane).
|
||||
@@ -456,8 +459,13 @@ private:
|
||||
// delta from this anchor, so a grab never jumps the value.
|
||||
double dragKnobStartValue_ = 0.0;
|
||||
|
||||
// Curve popup open flag, never persisted.
|
||||
bool curvePopupOpen_ = false;
|
||||
// Which velocity curve the popup is editing; kNone = closed. Never persisted.
|
||||
CurveTarget curvePopup_ = CurveTarget::kNone;
|
||||
// The parameter-set curve `curvePopup_` names. Both overloads exist because every edit
|
||||
// path needs the mutable one and paint needs the const one; routing through this ONE
|
||||
// switch is what keeps the three curves on a single popup/draw/hit-test code path.
|
||||
VelocityCurve& editedCurve();
|
||||
const VelocityCurve& editedCurve() const;
|
||||
|
||||
// Peak-thumbnail cache (mirror of bank_panel), keyed by "id|binCount" so a resize
|
||||
// recomputes at the new width. Cleared on refresh so a stale sample never shows.
|
||||
|
||||
Reference in New Issue
Block a user