commit 96d8fec8cc4d2b3262660514023dc3341bc9bef1
parent 3266fac3f86e06abb2aa5a343130005a54097ed4
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 3 Nov 2026 11:28:20 -0500
umtool: a video's out point that `posts fit` chose follows the read's rate -- it was sized to the read, so a faster read shortens it (on mr-obvious, rate 1.08 takes 146 s off the posts; only the 2 hand-set out points keep their length); one set by hand is still the choice
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
4 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -682,7 +682,7 @@ the shape, the mix, recordings, parts, the best part). One writer for a post's n
| `narration.approved` — the picked take on this script, approved (a new script or pick takes it away) | post bench, **approved** | `--approve` · `--unapprove` | `patch: {approved: true \| null}` |
| `narration.off` — keep it all, play un-narrated | post bench, **narrated** | `--off` · `--on` | `patch: {off: true \| null}` |
| `lead`, `tail`, `ramp`, `linger`, `wet`, `lowpassHz`, `duck`, `short` (`hold`\|`loop`), `clip` (`read`\|`full`), `attach` (`under`\|`after`), `lufs`, `rate` — this post's mix | post bench, **the mix** (`rate`: **read rate**); the read lane's voice block dragged sets `lead` | `umtool posts narrate <p> <item> lead=0.6 wet=0.25 short=loop rate=1.1 …` (`k=` back to the cut's) · `umtool posts set-item <p> <item> narration.rate=1.1` (any mix knob as `narration.<k>=`) | `patch: {…}` |
-| `rate` — the READ's speed, 0.8–1.5 (default 1): the voice sped up, its pitch kept (the build's `atempo`; Play's `playbackRate` with `preservesPitch`), the attachment untouched; the item's length, the muffle and the parts follow the faster read (take ÷ rate) | post bench, **the mix**, **read rate**; the read lane says `read in <s> at <r>×` | the cut's: `umtool posts narrate <p> --cut rate=1.08` · a post's: `… <item> rate=1.1` or `posts set-item <p> <item> narration.rate=1.1` | `patch: {rate}` |
+| `rate` — the READ's speed, 0.8–1.5 (default 1): the voice sped up, its pitch kept (the build's `atempo`; Play's `playbackRate` with `preservesPitch`), the attachment untouched; the item's length, the muffle and the parts follow the faster read (take ÷ rate), and so does a video's out point `posts fit` chose (its `window`); one set by hand stays | post bench, **the mix**, **read rate**; the read lane says `read in <s> at <r>×` | the cut's: `umtool posts narrate <p> --cut rate=1.08` · a post's: `… <item> rate=1.1` or `posts set-item <p> <item> narration.rate=1.1` | `patch: {rate}` |
| the attachment's window — its in and out for the read; why it was chosen (`narration.window`) | post bench, the attachment lane's handles; **Re-pick best**; **Play whole attachment** | `umtool posts fit <p> --all \| <item>… [--linger s]` · `posts set-item <p> <item> fit=read[:<linger>]` | `op: "fit", linger?` · the handles: `POST /api/report/post-item {op: "set", patch: {media}}` |
| `render.postNarration` — the cut's mix (every key above but `attach`, and `engine`, `voice`) | — | `umtool posts narrate <p> --cut wet=0.25 clip=full rate=1.08 …` | — |
| undo the last write | post bench, **Undo last change** | `umtool timeline <p> undo` | `op: "undo"` |
diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md
@@ -470,7 +470,7 @@ attachments play beside the words within it.
|---|---|
| the read, un-narrated | the reading time: `clamp(1 + words / 3, 3, 15)` — 3 words a second (about 180 a minute), a second to find the text first — + each post it answers, and the post it quotes, `clamp(words / 3, 1, 4)` (context, not the post) |
| the read, narrated | lead + the take ÷ `rate` + tail + linger (0.4 + take + 0.3 + 1.8 at rate 1: the item ends `linger` after the words; [Narrated post items](#narrated-post-items)) |
-| a video | from the item's first frame, from its in point (or the best part `posts fit` chose) for the read — cut to it; an out point set is kept as the choice; `clip: "full"` plays it whole. Shorter than the read: its last frame held (`short: "loop"` loops it) |
+| a video | from the item's first frame, from its in point (or the best part `posts fit` chose) for the read — cut to it; an out point set by hand is kept as the choice (one `posts fit` set — its recorded `window` — follows the read, so a faster `rate` shortens it); `clip: "full"` plays it whole. Shorter than the read: its last frame held (`short: "loop"` loops it) |
| pictures | the read's time left after the videos, shared out: each image (or a GIF, looped; or a grid, one picture) at least 1.5 s (`POST_PICTURE_MIN`) |
| the item | max(the read, the attachments) |
| `hold` | replaces the whole: a longer hold holds the last thing up, a shorter one cuts the attachments short at it |
diff --git a/umtool/report-to-video/post-item.mjs b/umtool/report-to-video/post-item.mjs
@@ -238,8 +238,12 @@ function planOf(entry, render, hold) {
const span = sch ? round3(sch.at + sch.seconds + k.tail + k.linger) : readingSeconds(entry);
const all = mediaSteps(entry).map((s) => {
if (s.kind !== "video" || k.clip === "full") return s;
- // An out point the operator (or posts fit) set is kept: that span is the choice.
- return fin(s.items[0].end) ? s : { ...s, seconds: round3(Math.min(s.seconds, span)) };
+ // An out point the operator set is kept: that span is the choice. One `posts fit` set (it is the
+ // window it recorded) was sized to the read, so it follows the read: a faster `rate` shortens it.
+ const m = s.items[0];
+ const w = entry?.narration?.window;
+ const fitEnd = sch && isObj(w) && w.media === m.i && fin(w.end) && Math.abs(w.end - m.end) < 0.011;
+ return fin(m.end) && !fitEnd ? s : { ...s, seconds: round3(Math.min(s.seconds, span)) };
});
const videos = all.filter((s) => s.kind === "video").reduce((n, s) => n + s.seconds, 0);
const pics = all.filter((s) => s.kind !== "video");
diff --git a/umtool/report-to-video/post-narration.test.mjs b/umtool/report-to-video/post-narration.test.mjs
@@ -173,6 +173,14 @@ test("THE READ's RATE (operator, 3 Nov: \"read everything the slightest bit fast
assert.equal(p2.total, 15);
assert.equal(p2.steps[0].seconds, 15);
assert.equal(postItemSeconds(slow, cutFast), 15);
+ // An out point `posts fit` set (its recorded window) was sized to the read: it follows a faster read.
+ const fitted = post({ media: [video({ seconds: 30.03, start: 4, end: 20 })], narration: narr(13.5, { window: { media: 0, start: 4, end: 20, score: 1, reason: "fit" } }) });
+ assert.equal(postItemPlan(fitted).total, 16);
+ assert.equal(postItemPlan(fitted, cutFast).total, 15);
+ assert.equal(postItemPlan(fitted, cutFast).steps[0].srcFrom, 4);
+ // One the operator set by hand (no window, or another one) is the choice: kept.
+ const byHand = post({ media: [video({ seconds: 30.03, start: 4, end: 24 })], narration: narr(13.5, { window: { media: 0, start: 4, end: 20, score: 1, reason: "fit" } }) });
+ assert.equal(postItemPlan(byHand, cutFast).total, 20);
// The muffle's schedule on the item's clock: the read ends sooner, the take's own length kept beside it.
const sch = p2.narration;
assert.deepEqual([sch.at, sch.seconds, sch.takeSeconds, sch.rate, sch.voiceEnd, sch.rampEnd], [0.4, 12.5, 13.5, 1.08, 13.2, 14]);