Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
fix(audio): pin the slower release and the carve default, fold the requirement, sync the manifest
Vance Ingallse488871ce1b7
diff --git a/packages/core/src/audioCarve.test.ts b/packages/core/src/audioCarve.test.tsindex 3b28573ee0..bedcc35a09 100644--- a/packages/core/src/audioCarve.test.ts+++ b/packages/core/src/audioCarve.test.ts@@ -384,6 +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);+ // Three seconds past the last word the bed is still audibly down — at a 1.6s+ // release it is all but back (−1.5 dB), which is the sentence-break flip this+ // constant exists to stop. This is the point that reds on the old value.+ expect(at(duck, 9)).toBeLessThan(-2);// ...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.diff --git a/skills-manifest.json b/skills-manifest.jsonindex 5a54d502c5..d3875296fe 100644--- a/skills-manifest.json+++ b/skills-manifest.json@@ -26,7 +26,7 @@"files": 121},"hyperframes-audio": {- "hash": "24871fc8a76d942f",+ "hash": "383dbd408b47a7db","files": 7},"hyperframes-cli": {diff --git a/skills/hyperframes-audio/SKILL.md b/skills/hyperframes-audio/SKILL.mdindex 7a2e809278..2ec0902df7 100644--- a/skills/hyperframes-audio/SKILL.md+++ b/skills/hyperframes-audio/SKILL.md@@ -218,16 +218,6 @@ where it can actually act as a ceiling.## Voiceover carve-**Required whenever music plays under a voice.** If a composition places a-music bed (BGM) under any voice track — narration, avatar speech, interview,-voiceover — carving the bed is part of finishing the mix, not an optional polish.-Run `node <SKILL_DIR>/scripts/carve.mjs --comp <file.html>` (default strength-`0.8`; add `--bed` / `--voice` when detection picks wrong), confirm the written `data-fx-carve`,-`data-fx-chain` and `data-automation` with `npx hyperframes check`, and only then-render. A volume duck on its own is not a finished mix: it leaves the voice and-the bed fighting in the 1–3 kHz band and costs the bed all of its presence for the-whole voiceover.-**The problem it solves.** A music bed under a voice makes the voice hard tofollow. The reflex is to duck the whole bed, which works and costs the bed all ofits presence — the music goes limp for the entire voiceover. But the voice does@@ -371,10 +361,16 @@ heard as an effect rather than as room for the voice. Drop the strength when thebed is the point and the voice is sparse. `0` is spectral only — one band, nolevel match at all.-**Carve by default.** A bed playing under narration wants a carve; it is not a-polish step to get to if there is time. Place both tracks, run the command below,-listen. Skip it only when there is no narration for the music to sit under — a-music video, a title card, a montage cut to the track.+**Carve by default — required whenever music plays under a voice.** A bed+under any voice track (narration, avatar speech, interview, voiceover) gets a+carve as part of finishing the mix, not as a polish step to get to if there is+time. Place both tracks, run the command below (default strength `0.8`; add+`--bed` / `--voice` when detection picks wrong), confirm the written+`data-fx-carve`, `data-fx-chain` and `data-automation` with `npx hyperframes check`,+and only then render. A volume duck on its own is not a finished mix: it leaves+the voice and the bed fighting in the 1–3 kHz band and costs the bed all of its+presence for the whole voiceover. Skip the carve only when there is no voice for+the music to sit under — a music video, a title card, a montage cut to the track.**It always follows the voice.** There is no static mode: a fixed depth thins thebed through every pause, and once you have heard both there is no reason to want it.diff --git a/skills/hyperframes-audio/scripts/carve.mjs b/skills/hyperframes-audio/scripts/carve.mjsindex 5cf7870e6d..a9865ed550 100644--- a/skills/hyperframes-audio/scripts/carve.mjs+++ b/skills/hyperframes-audio/scripts/carve.mjs@@ -34,17 +34,20 @@ import { pathToFileURL } from "node:url";* bands and envelopes come out the same either way. */const SAMPLE_RATE = 48000;+/** Default carve strength. 0.25 kept the bed present but still fighting the voice. */+export const DEFAULT_STRENGTH = 0.8;+const usage = `carve.mjs --comp <file.html> [--bed <elementId>] [--voice <elementId> ...][--strength 0..1] [--dry-run] [--core <dir>]--bed id of the music track that gets carved (detected if omitted)--voice id of a voice to make room for; repeatable (detected if omitted)- --strength how hard to carve, 0..1 (default 0.8)+ --strength how hard to carve, 0..1 (default ${DEFAULT_STRENGTH})--dry-run report what it would write, touch nothing--core directory to resolve @hyperframes/core from (default: the comp's)`;-function parseArgs(argv) {- const args = { strength: 0.8, dryRun: false, voices: [] };+export function parseArgs(argv) {+ const args = { strength: DEFAULT_STRENGTH, dryRun: false, voices: [] };for (let i = 0; i < argv.length; i += 1) {const flag = argv[i];const next = () => {diff --git a/skills/hyperframes-audio/scripts/carve.test.mjs b/skills/hyperframes-audio/scripts/carve.test.mjsindex 3dd7a372e8..9737a045f6 100644--- a/skills/hyperframes-audio/scripts/carve.test.mjs+++ b/skills/hyperframes-audio/scripts/carve.test.mjs@@ -5,7 +5,7 @@ import { mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from "nodeimport { tmpdir } from "node:os";import { dirname, join } from "node:path";import { fileURLToPath } from "node:url";-import { carveSources, groupSourceRefusal, loadCore } from "./carve.mjs";+import { DEFAULT_STRENGTH, carveSources, groupSourceRefusal, loadCore, parseArgs } from "./carve.mjs";const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));@@ -237,3 +237,12 @@ test("members is required, so dropping it cannot silently restore the group formassert.throws(() => carveSources(voices, bed("bgm", "music")), TypeError);assert.throws(() => groupSourceRefusal(voices, bed("bgm", "music")), TypeError);});++test("the default strength is 0.8, and --strength still overrides it", () => {+ // 0.25 left the bed audibly fighting the voice on narrated builds; a carve at+ // the default has to already be a finished mix. Pinned so it cannot drift back+ // unnoticed — core pins its own DEFAULT_CARVE the same way.+ assert.equal(DEFAULT_STRENGTH, 0.8);+ assert.equal(parseArgs(["--comp", "x.html"]).strength, 0.8);+ assert.equal(parseArgs(["--comp", "x.html", "--strength", "0.25"]).strength, 0.25);+});