Repository navigation
docs(audio): say the render sums tracks at unity and limits nothing - #5652
Conversation
An agent read the amix line's conditional `normalize=0` as "the render averages its tracks" and spent two full renders chasing loudness. The reference documented `data-volume` and the master bus but never said how tracks combine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
miguel-heygen
left a comment
There was a problem hiding this comment.
Thanks for this. It fills a real gap: the reference explained data-volume and the master bus but never said how tracks combine.
I checked each claim against the engine and they hold: the mixer runs amix with normalize=0 (and the fallback for older ffmpeg pads every input and multiplies by the track count, so it is also a unity sum), groups mix the same way, PRODUCER_AUDIO_GAIN defaults to 1 and is applied once to the sum before the master chain, and nothing in the default path limits the sum. Both anchors resolve in the preview build.
One small suggestion, not blocking: the last bullet ("compare the export against its source scaled by the data-volume you wrote") only holds when that track has no effect chain of its own, no automation or fade in the window, no master-bus chain, and the default master gain. Naming those conditions would stop someone checking a compressed voice, or a mix with a master limiter, from reading the difference as a mixer bug.
Verdict: APPROVE
Reasoning: Docs-only change whose every claim matches the mixer code at this head, with all required checks green; the one suggestion is a wording refinement.
What
One subsection in the audio effects reference, "Tracks add up; nothing averages them": the render sums every track at unity,
data-volumescales only its own track, nothing limits the sum, andPRODUCER_AUDIO_GAINmultiplies the sum once before the master bus.Why
While testing viral-clone in HyperFrames Desktop, an agent read
amix=…${useNormalize ? ":normalize=0" : ""}in the built chunk as "the render averages its tracks." It then spent two full renders chasing loudness, and its skill text (heygen-com/hyperframes-internal#4136) now tells agents the mix sits 8.6 dB under source with a dozen tracks. The reference documenteddata-volumeand the master bus but never said how tracks combine, so nothing contradicted the guess.The guess is wrong.
useNormalizeis true by default and means addnormalize=0. The fallback, for ffmpeg builds without the option, pads every input and multiplies by N. No code change is needed.Related work
Refs heygen-com/hyperframes-internal#4136. That skill note should be corrected there.
How
Measured, not assumed:
hyperframes0.8.158 and ffmpeg 8.1.2. That ffmpeg listsnormalizeonamix, so it takes the unity path.processCompositionAudioonmainover it. In a voice+music-only window (18–31 s), the render reads −18.1 dB mean. A reference built by hand (0.8·voice + 0.22·music,amix normalize=0) also reads −18.1 dB. The "8.6 dB under" was the authoreddata-volumevalues, not the mixer.:normalize=0frommixAudioTracks(the averaging bug). Three tests inaudioMixer.grouping.test.tsthen failed, among them "keeps every track at its authored level regardless of how many there are" (expected +6.02 dB, got 0). After restoring the line, 16/16 pass. So no new test is added.Test plan
node scripts/check-docs-snippet-motion.mjspasses. I did not check the anchor#the-master-bus-data-fx-chain-on-the-composition-rootin a Mintlify build.🤖 Generated with Claude Code