Skip to content

fix(studio): make the volume fader tell the truth about the gain it writes - #3305

Draft
miguel-heygen wants to merge 1 commit into
audio-gain-above-unityfrom
studio-volume-fader-precision
Draft

fix(studio): make the volume fader tell the truth about the gain it writes#3305
miguel-heygen wants to merge 1 commit into
audio-gain-above-unityfrom
studio-volume-fader-precision

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

The volume fader travels in dB, so its stops are irrational values. Serializing them through the generic two-decimal numeric formatter collapsed the bottom quarter of its travel onto "0" — a hard mute — and made the knob jump on release everywhere below unity. Both property panels now use an exact serializer that round-trips every integer fader stop back to itself.

The automation lane reaches the same ceiling

Clamping the volume lane at unity meant automating a boosted clip silently discarded the boost, and the panel disables the fader while a lane owns the level — so there was no way back short of deleting the lane.

This rescales the lane's vertical axis: unity now sits about a quarter of the way up rather than at the top, because the axis covers the same range the fader does. Worth knowing before you open a lane.

New lint rule

audio_volume_tween_overrides_gain. Tween values on volume are absolute — they replace the authored gain rather than scaling it — so a clip carrying both plays at whatever the tween names, and the fader gives no sign of it. The rule reuses the tween detector the sibling lane/tween rule already has, and reports the authored gain in dB.

Verifying

The fader's precision is pinned by a test that walks all 201 stops and asserts none of the audible ones serialize to silence and each round-trips to the same stop. bun run lint on a composition with data-volume="1.949845" and a volume tween emits exactly one warning naming the element and 5.8 dB.

Stack

Based on u1-audio-gain-core, which introduces the shared gain module. Retarget to main before merging.

@miguel-heygen
miguel-heygen force-pushed the studio-volume-fader-precision branch from bf1de5e to 4696d6c Compare August 17, 2026 20:56
…rites

The fader travels in dB, so its stops are irrational values; serializing them
through the generic two-decimal numeric formatter collapsed the bottom quarter
of its travel onto "0" — a hard mute — and made the knob jump on release
everywhere below unity. Both panels now use the exact serializer, which
round-trips every integer stop back to itself.

Raise the volume automation lane to the same ceiling the fader reaches.
Clamping the lane at unity meant automating a boosted clip silently discarded
the boost, and the panel disables the fader while a lane owns the level, so
there was no way back. This rescales the lane's vertical axis: unity now sits
a quarter of the way up rather than at the top.

Add audio_volume_tween_overrides_gain. Tween values on `volume` are absolute —
they replace the authored gain rather than scaling it — so a clip carrying both
plays at whatever the tween names, and the fader gives no sign of it. The rule
reuses the tween detector the sibling lane/tween rule already has.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant