Commit Graph
2969 Commits
Author SHA1 Message Date
Vance Ingalls f32f45db9e merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:14 -07:00
Vance Ingalls 039005ac11 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:13 -07:00
Vance Ingalls 8baa70cf52 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:12 -07:00
Vance Ingalls 42b945ddae merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:12 -07:00
Vance Ingalls 830a21c1dc merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:11 -07:00
Vance Ingalls 9cb9a76001 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:10 -07:00
Vance Ingalls 652fea0574 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:10 -07:00
Vance Ingalls edff77fbf1 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:09 -07:00
Vance Ingalls b0998a8aea merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:08 -07:00
Vance Ingalls c9c535c70e merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:08 -07:00
Vance Ingalls ff6db14fa7 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:07 -07:00
Vance Ingalls 4b068fb529 merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:06 -07:00
Vance Ingalls 43b03b682a merge: pull in the wet/dry dedupe fix 2026-08-12 14:12:06 -07:00
Vance Ingalls f951af68fe merge: pull in the wet/dry dedupe fix 2026-08-12 14:11:16 -07:00
Vance Ingalls 9f6e04c33b merge: pull in the wet/dry dedupe fix 2026-08-12 14:11:15 -07:00
Vance Ingalls 0d92b36f35 merge: pull in the wet/dry dedupe fix
# Conflicts:
#	packages/core/src/audio/audioFxGraph.ts
2026-08-12 14:11:07 -07:00
Vance Ingalls 7cf032d2f6 fix(core): dedupe the wet/dry mix math between delayFeedback and chorusLfo
Both effect builders set wet.gain to the mix and dry.gain to its complement
in identical two-line blocks; fallow kept re-flagging it as a 10-line clone
on every unrelated change. Extracted setWetDryMix.
2026-08-12 14:07:55 -07:00
Vance Ingalls c0af56ccca merge: pull in the fallow-audit fixes 2026-08-12 11:32:32 -07:00
Vance Ingalls 23154cba37 merge: pull in the fallow-audit fixes 2026-08-12 11:32:29 -07:00
Vance Ingalls 3ed74b07fa merge: pull in the fallow-audit fixes 2026-08-12 11:32:26 -07:00
Vance Ingalls b6cbae30d3 merge: pull in the fallow-audit fixes 2026-08-12 11:32:22 -07:00
Vance Ingalls 80d42f53a1 merge: pull in the fallow-audit fixes 2026-08-12 11:32:19 -07:00
Vance Ingalls 7e0fbadad5 merge: pull in the fallow-audit fixes
# Conflicts:
#	packages/studio/src/hooks/useAppHotkeys.ts
2026-08-12 11:32:04 -07:00
Vance Ingalls 5bcf5abf6d merge: pull in the fallow-audit fixes 2026-08-12 11:29:16 -07:00
Vance Ingalls f2ac94545d merge: pull in the fallow-audit fixes
# Conflicts:
#	packages/studio/src/player/components/timelineLaneProps.ts
#	packages/studio/src/player/store/playerStore.ts
2026-08-12 11:29:05 -07:00
Vance Ingalls 7d72507c1b merge: pull in the fallow-audit fixes
# Conflicts:
#	packages/studio/src/player/components/TimelineLanes.tsx
2026-08-12 11:26:27 -07:00
Vance Ingalls 353346062d merge: pull in the fallow-audit fixes 2026-08-12 11:17:28 -07:00
Vance Ingalls fec1957b67 merge: pull in the fallow-audit fixes 2026-08-12 11:17:25 -07:00
Vance Ingalls 494d431835 merge: pull in the fallow-audit fixes 2026-08-12 11:17:22 -07:00
Vance Ingalls f4b84cff56 merge: pull in the fallow-audit fixes
# Conflicts:
#	packages/studio/src/player/components/TimelineLanes.tsx
2026-08-12 11:17:14 -07:00
Vance Ingalls 439ba6c995 merge: pull in the fallow-audit fixes
# Conflicts:
#	.fallowrc.jsonc
#	packages/core/package.json
#	packages/core/src/canary.test.ts
#	packages/engine/src/services/audioFxRender.test.ts
#	packages/studio/src/components/editor/propertyPanelFxSection.test.tsx
2026-08-12 11:15:37 -07:00
Vance Ingalls 3418148bd7 merge: pull in the fallow-audit fixes 2026-08-12 10:49:18 -07:00
Vance Ingalls ae55ede245 merge: pull in the fallow-audit fixes 2026-08-12 10:49:17 -07:00
Vance Ingalls 05af338655 merge: pull in the fallow-audit fixes 2026-08-12 10:49:16 -07:00
Vance Ingalls 1a2969a3fa merge: pull in the fallow-audit fixes
# Conflicts:
#	packages/studio/src/components/editor/propertyPanelFxSection.tsx
2026-08-12 10:48:31 -07:00
Vance Ingalls 7c410fd075 fix(core,studio): clear the remaining Fallow audit findings on the FX panel
- Split FxSection's per-node row into FxNodeRow + FxNodeControls so the
  CRAP score (31.6, threshold 30) splits across two smaller units instead
  of moving wholesale with one extraction.
- Dedupe the repeated "open the add menu, read its items" block in
  propertyPanelFxSection.test.tsx into openAddMenuItems().
- Merge build-audio-fx-runtime.ts and build-position-edits-render.ts into
  one build-inline-artifact.ts, config-selected by CLI arg — the two
  scripts were a byte-for-byte clone save for names.
- Exempt canary.test.ts's rawFnv (a deliberate independent
  reimplementation used to cross-check canaryBucket, per its own
  docstring) and the property-panel test files' shared renderInto/mount
  scaffolding (pre-existing across 9 files, 2 outside this stack) in
  .fallowrc.jsonc, consistent with this file's existing exemptions for
  the same class of intentional/pre-existing duplication.
2026-08-12 10:45:31 -07:00
Vance Ingalls d9df8a150b fix(studio): drop the FX panel's dead __testables export
Fallow audit flagged it — no test imports the module.
2026-08-12 10:24:29 -07:00
Vance IngallsandClaude Opus 5 33bb99f2eb fix(core): apply chain edits to the running graph
A structural edit — an effect added, removed, bypassed, or a filter's pole
count switched — was dropped. `buildFxChain`'s update reports false when the
change is not merely new values, and the attribute observer ignored that, so
the edit only took hold when the persisting write reloaded the composition.
That reload restarted every playing track, which is what was heard as the
audio chopping.

The graph is now swapped in place: the old effects are detached, the new ones
built and connected between the same source and gain, and any lanes
re-scheduled onto the new nodes. The source node is never touched, so playback
does not restart.

A track with no chain is watched too, rather than wired through and forgotten,
so adding its first effect is heard the same way. That means the function
always returns a disposer instead of null for the empty case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:26 -07:00
Vance IngallsandClaude Opus 5 0f25e9c0a8 feat(engine): bake automation envelopes into the render
The offline render schedules FX lanes with the same scheduler preview uses,
inside the OfflineAudioContext that already runs the same graph builders. The
input WAV is the clip's own audio from its first sample, so clip-local time
is offline time and the envelope needs no offset.

Volume lanes take the existing PCM bake rather than a second mechanism: the
lane is converted to keyframes, so a straight fade stays two of them and only
a bent segment is sampled — the baker interpolates linearly and would
otherwise quietly straighten the curve. A volume lane supersedes keyframes
probed from the timeline, which `lint` already warns about.

A browser test sweeps a lowpass from below a 2 kHz tone to well above it and
measures both ends. Parsing the envelope is not the same as scheduling it,
and only running the real thing tells the two apart.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:25 -07:00
Vance IngallsandClaude Opus 5 db00f0d2c6 fix(core): make the volume lane audible in preview
The envelope was scheduled onto the transport's gain AudioParam, but the
runtime rewrites that gain every tick from `data-volume` and the GSAP-seeked
value — so it was erased within a frame. Volume automation was correct in the
render and inaudible while previewing.

The lane now feeds the per-tick path where the probed volume keyframes already
sit, checked ahead of them so the two cannot fight, and the transport no
longer schedules volume at all: one mechanism instead of two racing.

The cost is honest — in preview the level steps per tick rather than per
sample, exactly as the existing keyframe path does. The render still bakes it
into the PCM sample-accurately, and FX parameters are still scheduled on their
own AudioParams, since nothing rewrites those.

Parsed lanes are cached by attribute text: the runtime asks once per tick per
track, and parsing there would run the JSON parser 60 times a second for a
value that only changes on an edit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:25 -07:00
Vance IngallsandClaude Opus 5 380ed3d7bb feat(core): play automation envelopes in preview
Schedules each lane onto the AudioParams behind its knob using native ramps
and value curves. Nothing evaluates the envelope per frame: it is handed to
the audio thread once, so it stays sample-accurate however busy the main
thread is, and the offline render will schedule it the same way.

Timing comes from the transport, so an envelope survives seeking into the
middle of a clip, a clip that has not started yet, and a playback rate that
compresses clip seconds into context seconds.

A straight line is only scheduled as a ramp when nothing bends it — no
curvature, a linear parameter scale, and no unit mapping. Log-scaled
parameters and mapped ones are sampled instead, since a delay knob in
milliseconds and a wet/dry pair moving in opposition are not linear in the
parameter they drive.

Lanes with nowhere to write are skipped rather than reported: a one-pole
filter exposes no frequency param, and the worklet effects expose none at
all. Editing an envelope mid-playback re-aims it at the live playhead rather
than restarting the track.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:25 -07:00
Vance IngallsandClaude Opus 5 75057e2807 feat(core): expose the AudioParams behind automatable FX knobs
Marks the knobs an automation lane can drive and has each graph builder hand
back the AudioParam behind them, so a scheduler can write to a running effect
without knowing what the effect is.

A knob is not always one AudioParam. A wet/dry mix is two gains moving in
opposition, and a knob in milliseconds drives a delay time in seconds, so
each target carries the mapping out of the knob's own declared unit.

What stays unautomatable is stated where it is decided: a WaveShaper curve, a
convolution impulse and a one-pole filter's coefficients are all rebuilt
wholesale rather than scheduled, and the four worklet effects take values by
postMessage rather than through AudioParams.

The registry flag is written by hand, so a test builds every effect and
checks the exposure both ways — nothing flagged is missing, nothing exposed
is unflagged. A flag that lied would offer a lane that silently did nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:24 -07:00
Vance Ingalls c2846a902c refactor(studio): lift the audio FX group out of PropertyPanelFlat
`PropertyPanelFlat.tsx` was 672 lines against the repo's 600-line cap, so
the required File size check was red — the sole reason #3014 and #3022 are
blocked. Both reviews say the same thing: "mechanical fix, not a design
problem. Code itself is LGTM."

Moves `AudioFxGroup` and `audioFxSummary` into
`propertyPanelAudioFxGroup.tsx`, which is where a later branch puts them
anyway — done here so the file is under the cap from the point it first
crosses it, rather than ten branches later.

533 lines now. The four audio imports it no longer needs go with it.

Not fixed here: three `FxSection carve` tests fail on this branch with
"Cannot read properties of undefined (reading 'toFixed')". Confirmed
pre-existing by stashing this change and re-running — that is the separate
`Test` failure the review also flags.
2026-08-12 08:40:24 -07:00
Vance IngallsandClaude Opus 5 cbf77bcada feat(core): automation envelope model for audio tracks
Adds the data model behind Ableton-style automation lanes: breakpoint
envelopes over track volume or one knob of one effect in the track's FX
chain, stored on the element as `data-automation`.

Times are clip-local, so an envelope travels with the clip when it moves —
the clip-envelope model rather than arrangement automation.

`sampleAutomationLane` is the single interpolator. The lane drawing, the
preview scheduler and the render bake all call it, so the picture and the
sound cannot disagree about the curve. Log-scaled parameters interpolate in
log space, matching what their own knob already promises.

FX nodes gain a stable `id`, minted by count rather than randomly so the
document is the same on every machine. Lanes address nodes by id, so
reordering a chain never re-points a lane at a different effect, and a lane
whose effect was deleted is dropped rather than left to reattach.

Also warns when a track carries both a volume lane and a GSAP volume tween,
since only the lane is heard and the tween silently does nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:24 -07:00
Vance IngallsandClaude Opus 5 cfafa224b4 refactor(studio): split the FX node row out of FxSection
Clears the health findings the FX stack left behind: the chain-node render
callback was a 70-line closure over half of FxSection's state, and the two
reorder arrows were the same button written twice.

Also drops two exports with no consumers, and registers the audio FX runtime
stub as an entry point — it is bundled by file path, so nothing imports it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 08:40:23 -07:00
Vance Ingalls cfc1215f8a fix(core): register FX worklets before building nodes that need them
An AudioWorkletNode cannot be constructed before its processor is registered —
it throws, and the surrounding chain is lost with it. `attachElementFxChain`
built the chain first and only then called `ensureAudioFxWorklets`, so every
worklet-backed effect (compressor, limiter, gate, bitcrush) threw on
construction and the track fell back to dry. Instrumenting the preview showed
`hf-compressor: InvalidStateError` with addModule never called at all.

When the module has not landed yet the track now plays dry and the graph is
swapped in once registration resolves, so the effect arrives a moment late
instead of never.

Registration is also tracked per context rather than in one module-level
promise. A processor registered on one AudioContext does not exist on another,
so the shared promise made every context after the first believe it was ready
when it was not — the studio's transport owns its own context, which is exactly
that case.

With the worklets actually running, the compressor's per-sample log10 and pow
became real audio-thread work. Samples below the knee have a gain of exactly
unity and need neither, so the envelope is now compared in the linear domain
and the transcendentals only run for samples that are actually being
compressed.
2026-08-12 08:40:23 -07:00
Vance Ingalls 550812a02b feat(studio): put the audio FX rack behind its canary
Gates the rack on `isCanaryEnabled("audio-fx-rack")`, which is registered
at 0% — so the whole 47-PR stack can land without showing anyone a feature
that has not been measured yet.

The gate sits on the AUTHORING surface and nowhere else. The runtime and
the render still honour a `data-fx-chain` already on an element, so a
composition written through the skill or by `carve.mjs` keeps its
processing rather than going silently dry for anyone outside the cohort. A
canary should stage who can REACH a feature, not make an attribute somebody
already wrote stop working with no error.

Gated at the panel rather than in `resolveEditingSections`: the affordance
resolver is a pure function in core describing what an element CAN support,
and rollout state is not a property of an `<audio>` tag.

Pinned the 0% with a test, and checked it fails at 25 — a ramp should have
to break something that says "this ships dark" out loud.

One gap, stated rather than papered over: the gate itself has no unit test.
I wrote one and deleted it, because `PropertyPanel.test.tsx`'s harness
never renders the Audio FX group for its audio fixture even with the gate
removed — so the test passed for the wrong reason in the off case and could
not pass at all in the on case. A test that cannot fail for the right
reason is worse than none. Verifying the gate needs the panel harness to
mount that section first, which is its own change.
2026-08-12 08:40:22 -07:00
Vance Ingalls a2eabd2cf9 fix(studio,core): stop parameter drags from restarting playback
Dragging a knob wrote the chain through the persisting attribute path on every
input event. That path refreshes the preview, which reloads the composition and
reschedules audio — so a single drag reloaded dozens of times and playback
stuttered the whole way.

Drags now go through `onSetAttributeLive`, the same path colour grading uses for
scrubs: it coalesces undo entries and sets `skipRefresh`, so no reload happens.
The persisting write fires once, when the gesture ends — pointer-up or blur for
a slider, Enter or blur for a typed value. A select commits immediately since
there is no drag to wait for.

While dragging, the control is driven from local state. Waiting for the value to
round-trip through the element attribute made the knob lag behind the pointer.

For the change to be audible without a reload, the graph now follows the
attribute: the chain installed by the transport observes the element and
re-parameterises itself in place, so a value change lands on the next
128-sample quantum. A shape change (effect added, bypassed, pole count) cannot
be patched into a running graph, so it still waits for the next schedule rather
than cutting the audio mid-play.

The regression test drags a slider through several values and asserts the
persisting handler is untouched until release.
2026-08-12 08:40:22 -07:00
Vance Ingalls d5794bf305 feat(core,studio): hear the FX chain in preview, and run the carve analysis
Splices an element's FX chain into the playback graph so preview stops being
silent about effects, and wires the carve button that was previously inert.

The chain goes between the decoded source and its gain stage: effects see the
raw signal and volume automation rides on their output, matching the order the
offline render uses. Since preview and render call the same graph builders,
what is heard while scrubbing is what gets written.

The splice lives in the transport rather than on the `<audio>` element. The
transport plays each track from a decoded AudioBuffer and mutes the element to
avoid doubling, so capturing the element with createMediaElementSource would
have processed a stream nothing is listening to — it looked like it worked
because the call succeeded, and the audio was unchanged.

A chain that cannot be built plays dry rather than silencing the track, which
is the right failure in preview: the author keeps working and hears the source.
The render still refuses, because shipping the dry signal there would be wrong.

Carve now analyses for real: it decodes the chosen voice track, ranks its bands
and writes the resulting peaking filters onto this track. Generated nodes are
tagged `fromCarve`, so re-running replaces the previous carve instead of
stacking another set on top of hand-added effects.

Known limitation: the graph is built when a source is scheduled, so a knob
turned mid-playback takes effect on the next play or seek rather than
immediately. Live re-parameterisation needs the transport to hold the handle
and forward updates.
2026-08-12 08:40:22 -07:00
Vance Ingalls 33100d2ecf refactor(studio): lift audioFxSummary out of PropertyPanelFlat
`PropertyPanelFlat.tsx` is 612 lines here against the repo's 600-line cap,
so the required File size check is red — the sole reason this PR is
blocked. The review says as much: "mechanical fix (~5 min), not a design
problem. Code itself is LGTM."

Moves `audioFxSummary` to `audioFxSummary.ts`, the same file a later
branch creates for it. Deliberately the smallest cut that clears the cap
rather than the whole `AudioFxGroup` extraction: every later commit in the
stack edits AudioFxGroup, so moving it here would collide with each of
them, while almost nothing touches this function.

595 lines.
2026-08-12 08:40:21 -07:00