Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Revert "Use N/A for empty Sound prompts"

Bitti44941d0a7210
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 9e44033..4521ca3 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -25,7 +25,6 @@ Changes since 0.3.2.
## Fixes and improvements
- Videos can override project Look, aspect ratio and resolution; scenes inherit their Video's settings.
-- Empty Sound prompts now produce `overall_soundscape: N/A`; supplied prompts are used directly.
- First & Last Frame prompts follow MiniMax's I2VA, L2VA and FL2VA formats, with ending anchors timed to the final shot.
- Fixed AppImage launcher permissions for users other than the package builder.
diff --git a/src/lib/project.character-replace.test.ts b/src/lib/project.character-replace.test.ts
index ab0659b..caa48a9 100644
--- a/src/lib/project.character-replace.test.ts
+++ b/src/lib/project.character-replace.test.ts
@@ -63,9 +63,6 @@ it("includes only enabled soundtracks with independent audio numbering", () => {
expect(prompt).toContain("<Audio 1> is the enabled soundtrack of <Video 2>");
expect(prompt).toContain("[video editing + reference generation + audio reuse]");
expect(prompt).not.toContain("<Audio 2>");
- expect(prompt).toContain("overall_soundscape:\nN/A\n\n");
- const withSound = compileGenerationJobPrompt({ ...scene, soundscape: "Footsteps, then a bell." }, [motion2, reference("hero", "image")]);
- expect(withSound).toContain("overall_soundscape:\nFootsteps, then a bell.\n\n");
});
it("blocks missing, unusable and wrongly typed references but accepts blank action text", () => {
diff --git a/src/lib/project.test.ts b/src/lib/project.test.ts
index 64e28d8..820f1a0 100644
--- a/src/lib/project.test.ts
+++ b/src/lib/project.test.ts
@@ -325,9 +325,15 @@ describe("project schema", () => {
}
});
- it("uses N/A when no Sound prompt is given", () => {
+ it("keeps the default soundscape free of any ambience the user never described", () => {
+ // Base guide §4.6: N/A only on an explicit request for silence, so a line
+ // must still be emitted — but it may not invent a place or a weather.
const soundscape = section(compileMiniMaxH3Prompt("a rocket launch over the ocean"), "overall_soundscape");
- expect(soundscape.trim()).toBe("N/A");
+ expect(soundscape.trim().length).toBeGreaterThan(0);
+ expect(soundscape.trim()).not.toBe("N/A");
+ for (const invented of ["room tone", "wind", "rain", "traffic", "birds", "indoor", "street"]) {
+ expect(soundscape.toLowerCase()).not.toContain(invented);
+ }
});
it("never compiles an audio-tagged reference as a visible subject", () => {
diff --git a/src/lib/project.ts b/src/lib/project.ts
index 20f8fbd..3bc4d46 100644
--- a/src/lib/project.ts
+++ b/src/lib/project.ts
@@ -968,8 +968,16 @@ function endSentence(text: string): string {
return !text || /[.!?…]$/.test(text) ? text : `${text}.`;
}
-// Empty Sound and Music prompts explicitly compile to N/A.
-const DEFAULT_SOUNDSCAPE = "N/A";
+/* Base guide §4.6: `overall_soundscape` may only be N/A when the user asks for
+ complete silence, so a line is always emitted instead. That line is
+ deliberately CONTENT-NEUTRAL: it names no ambience, location or weather and
+ only points back at what the description already established, because the
+ user never told us where the scene is — the previous "Ambient room tone"
+ wording put a room around a rocket launch. §4.7: music must be
+ instrumentation/tempo/dynamics and never abstract mood or emotional
+ function — we emit N/A because the user never asked for a score, and
+ inventing one is a fabrication of its own. */
+const DEFAULT_SOUNDSCAPE = "The ambient sound and physical action sounds are those the scene and actions described above naturally produce. Nothing beyond what that description already establishes is added.";
const DEFAULT_MUSIC = "N/A";
const referenceLabel = (reference: ProjectReference, index: number) => `<Subject ${index + 1}>`;
@@ -1450,8 +1458,7 @@ function compileCharacterReplaceSegments(job: GenerationJob, references: Project
return [frame(`${index ? "\n" : ""}[Shot ${index + 1}] ${index ? `At ${timestamp}, ` : ""}`), ...replacement(shot),
...(sourceAudio ? [frame(` Reuse ${audioLabel(sourceAudio.id)} in sync with this shot.`)] : [frame(" Do not reuse the source soundtrack.")])];
}),
- frame("\n\noverall_soundscape:\n"),
- job.soundscape?.trim() ? own(job.soundscape.trim()) : frame(DEFAULT_SOUNDSCAPE),
+ frame(`\n\noverall_soundscape:\n${audioVideos.length ? `Reuse the ambience, physical sounds and speech from ${audioVideos.map((reference) => audioLabel(reference.id)).join(", ")} in their corresponding shots.` : "Use only ambience and physical sounds consistent with the source scene; no added speech."}`),
frame(`\n\nnon_diegetic_music:\n${audioVideos.length ? "Retain only music already present in the reused source soundtrack. Add no new score." : "N/A"}`),
];
}
diff --git a/src/lib/shot-tags.test.ts b/src/lib/shot-tags.test.ts
index 5266ad7..1ca31ea 100644
--- a/src/lib/shot-tags.test.ts
+++ b/src/lib/shot-tags.test.ts
@@ -136,7 +136,7 @@ describe("compiling tags into the MiniMax H3 prompt", () => {
"integrated_multimodal_description: [Shot 1] Live-action, cinematic, extreme close-up, low angle, macro lens, "
+ "hands shaping wet clay on a spinning wheel. Camera movement: push in, slow speed, small amplitude. "
+ "Lighting: soft light, practical light. Time of day: golden hour. Mood: intimate. Motion: slow motion.",
- "overall_soundscape: N/A",
+ "overall_soundscape: The ambient sound and physical action sounds are those the scene and actions described above naturally produce. Nothing beyond what that description already establishes is added.",
"non_diegetic_music: N/A",
].join("\n\n"));
});