mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-12 13:22:25 +00:00
* Read volume automation at every sample, not once per block Track and master faders read the dB curve at a block's first and last sample and ramped linearly in gain between them, so a breakpoint acted up to a block early or late and a short crossfade came out differently depending on where the block edges fell. Both now take the gain at each sample: the curve is read at its breakpoints and interpolated in dB in between, as the lane defines it. Blocks with no change keep one gain. Fixes #1354. * docs: volume breakpoints no longer depend on the render block (G-04) * Step fader ramps by a ratio and scale channels in contiguous runs Reading the fader at every sample converted dB to gain per sample on every ramp, and applied it sample by sample across channels, even when nothing moved. A stretch that is linear in dB is geometric in gain, so each stretch now converts its two ends exactly and steps the samples in between by one ratio (in f64, so it does not drift), with the -144 dB floor and the cap checked per sample. Each channel is scaled over the whole stretch at once, and a stretch with no change is a plain multiply. Tests: stepped ramps against db_to_gain sample by sample (floor, cap, NaN, one or two samples, a 16384-sample ramp), and summed volume, trim and VCA lanes with a muted track, read from renders that start inside a ramp or on block edges. * fix(mix): recover extreme automation ramps from silence * fix(mix): preserve extreme ramp endpoints and silence NaNs --------- Co-authored-by: FredApps <FredApps@users.noreply.github.com>