AI media harness for planning, generating, and editing locally
TypeScript
Use N/A for empty Sound prompts
Bittife4a157b9270
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex 1b482d4..ac80a87 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -22,6 +22,7 @@ Changes since 0.3.2.## Fixes and improvements+- 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.tsindex caa48a9..ab0659b 100644--- a/src/lib/project.character-replace.test.ts+++ b/src/lib/project.character-replace.test.ts@@ -63,6 +63,9 @@ 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.tsindex 820f1a0..64e28d8 100644--- a/src/lib/project.test.ts+++ b/src/lib/project.test.ts@@ -325,15 +325,9 @@ describe("project schema", () => {}});- 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.+ it("uses N/A when no Sound prompt is given", () => {const soundscape = section(compileMiniMaxH3Prompt("a rocket launch over the ocean"), "overall_soundscape");- 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);- }+ expect(soundscape.trim()).toBe("N/A");});it("never compiles an audio-tagged reference as a visible subject", () => {diff --git a/src/lib/project.ts b/src/lib/project.tsindex d4b9c16..b1a5ea5 100644--- a/src/lib/project.ts+++ b/src/lib/project.ts@@ -964,16 +964,8 @@ function endSentence(text: string): string {return !text || /[.!?…]$/.test(text) ? text : `${text}.`;}-/* 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.";+// Empty Sound and Music prompts explicitly compile to N/A.+const DEFAULT_SOUNDSCAPE = "N/A";const DEFAULT_MUSIC = "N/A";const referenceLabel = (reference: ProjectReference, index: number) => `<Subject ${index + 1}>`;@@ -1455,7 +1447,8 @@ function compileCharacterReplaceSegments(job: GenerationJob, references: Projectreturn [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${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\noverall_soundscape:\n"),+ job.soundscape?.trim() ? own(job.soundscape.trim()) : frame(DEFAULT_SOUNDSCAPE),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.tsindex 1ca31ea..5266ad7 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: 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.",+ "overall_soundscape: N/A","non_diegetic_music: N/A",].join("\n\n"));});