instrument: fix AHD node-tracking/tie-break/live-latch defects and close staged-envelope-curve test gaps
This commit is contained in:
@@ -1,21 +1,13 @@
|
||||
// envelope_edit.h — node hit-test + pixel-delta -> clamped-param inverse map for the draggable
|
||||
// envelope nodes and their mid-segment curve knots. Mirror of card_drag/waveform_view: drag
|
||||
// arithmetic lives here, unit-tested outside the DAW; the shell draws handles, captures the
|
||||
// grab, and feeds pixel deltas back in.
|
||||
//
|
||||
// envelope_overlay owns the params->polyline forward (draw) map; this module owns the inverse
|
||||
// (edit) map + hit-test. Both read/write the same StageEnvelope fields (the shell re-reads the
|
||||
// one parameter set every paint), so a node drag, a knot drag, and a knob edit are three views
|
||||
// on one source of truth — structurally, not through a listener chain.
|
||||
//
|
||||
// A drag can never produce a param a knob couldn't: time nodes are range-clamped to the same
|
||||
// per-param [min,max] the knobs enforce (EnvClampBounds, caller-supplied since those maxima
|
||||
// live shell-side), and a knot resolves through curve_law's own exponent domain.
|
||||
// envelope nodes and their mid-segment curve knots. The inverse of envelope_overlay's forward
|
||||
// (draw) map; both read/write the same StageEnvelope fields, so node drag / knot drag / knob
|
||||
// edit are one model — see core/instrument/CLAUDE.md's "envelope overlay" section for why.
|
||||
// Mirror of card_drag/waveform_view: drag arithmetic lives here, unit-tested outside the DAW.
|
||||
//
|
||||
// Time-only nodes drag on X; DecayEnd in an AHDSR drags on both axes (X = decay time, Y =
|
||||
// sustain level); a curve knot drags on Y alone. Origin is never draggable, and neither is an
|
||||
// AHDSR's ReleaseEnd — it is anchored to the right edge, and release is dragged from
|
||||
// ReleaseStart instead. A node is only editable in its own kind.
|
||||
// sustain level); a curve knot drags on Y alone (curve_law.h owns the exponent domain). Origin
|
||||
// is never draggable, and neither is an AHDSR's ReleaseEnd — anchored to the right edge, with
|
||||
// release dragged from ReleaseStart instead. A node is only editable in its own kind.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
Reference in New Issue
Block a user