Repository navigation
feat(fx): ADSR envelopes, hardware panel encoders, paused-mode preview< 8000 /span> - #9
Merged
Merged
Conversation
Each P-FX kind now ships an ADSR envelope on top of its two encoder
parameters, edited via a CRT-style screen on the FX hardware panel.
The screen has two modes — PARAMS (live encoder read-out) and ENV
(four draggable phosphor knots that shape attack/decay/sustain/
release) — switched via two skeuomorphic plastic buttons left of
the screen. Curve is OP-1-style cubic Beziers; a leading-edge
indicator with comet-trail rides the path while a pad is held and
during the release tail, with a fast cross-sustain sweep on
release.
Each effect knows how to dim itself intelligently via
`applyWetness` (intensity scales for vignette/wear/uv, displacement
magnitude for zoom/rgb, mix for echo, warp for tape) instead of a
generic alpha-blend that ghosts displacement effects.
Pad behaviour is now mode-aware:
- Playing → pad press records a punch-in capsule with the kind's
current envelope baked in. Release-tail extends `outS` past the
snapped grid moment so the fade plays out instead of cutting.
- Paused → pad click LATCHES a live preview on the rendered
frame. The user can then drag encoders or ADSR knots and watch
the result without writing anything to the timeline. Click
again or hit play to drop the latch.
`X` gains a paused-mode behaviour to match the pointer-driven
hold-to-clear gesture: hold X for 3 s while paused to wipe the
program strip, mode-aware (cuts / fx / both). Same red sweep bar
as holding the lane with a finger. Playback X stays the erase head.
Also flips the bipolar encoder mapping into TE-style "extreme =
fast, near OFF = slowest" — affects every bipolar param (zoom rate,
echo trail, wear drift, tape bend).
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.
Summary
Builds out the P-FX system into a TE-inspired hardware-pad
instrument with per-effect ADSR envelopes, a CRT-style screen that
toggles between parameter read-out and an envelope editor, and a
paused-mode "audition" workflow that lets you dial in effects on
the live frame before committing anything to the timeline.
baked into every recorded capsule. Release-tail extends
outSpast the snapped grid moment so the fade plays out properly when
you let go of a pad.
plastic buttons left of the green CRT switch it between PARAMS
(live encoder read-out) and ENV (four draggable phosphor knots
shaping attack/decay/sustain/release on an OP-1-style cubic
Bezier curve).
while a pad is held and through the release tail, with a fast
cross-sustain sweep + comet-trail on release.
applyWetness(intensity for overlays, displacement magnitudefor zoom/rgb, mix for echo, warp for tape) instead of a generic
alpha-blend that would ghost displacement effects.
the rendered frame. Drag encoders or ADSR knots and watch the
result without writing to the timeline. Click again or hit play
to drop it.
Xclear gesture (paused) — hold X for 3 s to wipe theprogram strip; mode-aware (cuts / fx / both). Same red sweep bar
as holding the lane with a finger. Playback X stays the erase
head, unchanged.
bipolarPeriodSsoextremes are fastest, near-OFF is slowest. Affects every bipolar
param (zoom rate, echo trail, wear drift, tape bend).
Test plan
npm run test— unit suite (604 tests, including newenvelope.test.tsand updatedbuild-descriptor/storetests)→ unlatches; clicking another pad swaps
rendered frame in real-time, no re-trigger
four knots, see the curve shape change
envelope's release tail fades the effect out
sits at sustain knee while held, sweeps to release-end on
release
Xwhile paused, in different program-strip modes → redsweep bar covers correct lane(s); release before 3 s
cancels; full hold clears the right thing
slow → fast (TE convention); pulse rhythm visible during
both sustain and release
bit-identically (INSTANT_ENVELOPE fallback)
🤖 Generated with Claude Code