Skip to content

Write HTML. Render video. Built for agents.

fix(core): slow the voiceover carve's level release to 2.4s

Vance Ingallsfe53f51adb3d
diff --git a/packages/core/src/audioCarve.test.ts b/packages/core/src/audioCarve.test.ts
index 60fdbec2b4..3b28573ee0 100644
--- a/packages/core/src/audioCarve.test.ts
+++ b/packages/core/src/audioCarve.test.ts
@@ -348,8 +348,9 @@ describe("analyseCarveDuck", () => {
// of that rather than right against it.
expect(at(duck, 2)).toBe(0);
// Back to inaudible by the end of a long tail rather than held down for the
- // clip; the envelope's last point is pinned at exactly no cut.
- expect(at(duck, 15)).toBeCloseTo(0, 1);
+ // clip; the envelope's last point is pinned at exactly no cut. Ten seconds
+ // after the last word is four release constants, so the residue has snapped.
+ expect(at(duck, 15.9)).toBeCloseTo(0, 1);
expect(duck.at(-1)?.v).toBe(0);
});
@@ -383,10 +384,10 @@ describe("analyseCarveDuck", () => {
// Still most of the way down a third of a second after the last word...
expect(at(duck, 6.3)).toBeLessThan(atSpeech * 0.6);
- // ...noticeably recovered by a second and a half...
- expect(at(duck, 7.5)).toBeGreaterThan(atSpeech * 0.5);
- // ...and within a hair of flat a few seconds later, rather than held down.
- expect(at(duck, 11)).toBeGreaterThan(-0.6);
+ // ...noticeably recovered two and a half seconds on...
+ expect(at(duck, 8.5)).toBeGreaterThan(atSpeech * 0.5);
+ // ...and within a hair of flat several seconds later, rather than held down.
+ expect(at(duck, 13.5)).toBeGreaterThan(-0.6);
});
it("finishes the release past the last word instead of snapping at the end", () => {
diff --git a/packages/core/src/audioCarve.ts b/packages/core/src/audioCarve.ts
index c43500c5db..0b0fce582a 100644
--- a/packages/core/src/audioCarve.ts
+++ b/packages/core/src/audioCarve.ts
@@ -552,13 +552,14 @@ const RELEASE_S = 0.25;
* jumped to full the instant a word ended, and what you hear then is the effect
* switching off rather than a mix breathing. Slower than any gap inside a
* sentence, so it rides through the pauses between words and only recovers
- * between sentences.
+ * between sentences. 1.6s still read as the bed "coming back" at every sentence
+ * break on narrated builds; 2.4s lets it swell back over a breath instead.
*
* It also has to be well clear of the envelope's own step. A long voice is
* measured about every 0.3s, so a release anywhere near that puts the entire
* recovery inside one step — a jump, whatever the constant claims.
*/
-const DUCK_RELEASE_S = 1.6;
+const DUCK_RELEASE_S = 2.4;
/**
* Windows an envelope may spend. Held under `MAX_AUTOMATION_POINTS` with room