Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 8b354483f87a5b9018b2a3f225bbcdfda40a5deb
parent f0a015f148d081551989740d71a0c065945caee9
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 29 Oct 2026 23:43:43 -0400

umtool fx glitch: year: false draws a bare tear, no big year

render.chrome.fx.glitch.year (bool, default true) -- false leaves the new
year off the tear, so with stamp: false the glitch puts no text on screen
(for a cut under a no-on-screen-text rule). Validated as a bool, declared as
an fx.glitch param, written to the schedule only when false: every existing
manifest's schedule and page are byte-identical (checked against the
previous commit). The year element and its cues are left out of the page, so
its frames key anew.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mcommon/lib/report/fxParams.mjs | 1+
Mumtool/docs/knobs.md | 2+-
Mumtool/report-to-video/README.md | 4++--
Mumtool/report-to-video/chrome-fx.mjs | 3++-
Mumtool/report-to-video/chrome-fx.test.mjs | 43+++++++++++++++++++++++++++++++++++++++++++
Mumtool/report-to-video/fx.mjs | 14+++++++++-----
Mumtool/report-to-video/fx.test.mjs | 16+++++++++++++++-
Mumtool/report-to-video/modules/fx.mjs | 2+-
8 files changed, 74 insertions(+), 11 deletions(-)

diff --git a/common/lib/report/fxParams.mjs b/common/lib/report/fxParams.mjs @@ -82,6 +82,7 @@ export const COMPOSITION_PARAMS = Object.freeze({ oneOf("on", "where the glitch tears", ["year", "every", "clips"], "year"), sec("seconds", "the glitch's length", 0.2, 1.5, 0.5), bool("stamp", "the glitch's date stamp", true), + bool("year", "the glitch's big year", true), ]), "fx.thenNow": Object.freeze([ sec("seconds", "the THEN/NOW wipe's length", 0.3, 2, 0.6), diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -579,7 +579,7 @@ Overlays on the picture -- receipts, a zoom, the scrubber, a kinetic quote, punc | Knob | Range · default | From a terminal | |---|---|---| | `render.chrome.fx.<effect>` | scrubber · receipts · zoom · kineticQuote · redact · odometer · punchIn · thenNow · whip · glitch | a take: `umtool take <p> --effect <name>` | -| `render.chrome.fx.glitch.on`, `.clips` | `year` (a tear at each cut between years) · `every` (each cut between clips) · `clips` (only the cut INTO each clip `clips` names: 1–60 ids, each with a clip right before it) · default `year`; `clips` only with `on: "clips"`. `.seconds` 0.2–1.5 · 0.5, `.stamp` (the `PLAY ▶` date) · `true` | manifest | +| `render.chrome.fx.glitch.on`, `.clips` | `year` (a tear at each cut between years) · `every` (each cut between clips) · `clips` (only the cut INTO each clip `clips` names: 1–60 ids, each with a clip right before it) · default `year`; `clips` only with `on: "clips"`. `.seconds` 0.2–1.5 · 0.5, `.stamp` (the `PLAY ▶` date) · `true`, `.year` (the new year big over the tear; `false` with `stamp: false` is a bare tear, no text) · `true` | manifest | ### Thread rail diff --git a/umtool/report-to-video/README.md b/umtool/report-to-video/README.md @@ -949,7 +949,7 @@ defaults. "redact": { "position": "bottom", "size": 44, "maxWords": 14, "clips": ["c02"] }, "odometer": { "position": "top-right", "label": "times", "at": "phrase" }, "scrubber": { "position": "top", "thumbs": true }, - "glitch": { "on": "year", "seconds": 0.5, "stamp": true }, // or { "on": "clips", "clips": ["c03", "c07"] } + "glitch": { "on": "year", "seconds": 0.5, "stamp": true, "year": true }, // or { "on": "clips", "clips": ["c03", "c07"] } "thenNow": { "pairs": [{ "then": "c03", "now": "c04" }], "seconds": 0.6, "dates": "date" }, "receipts": { "position": "right", "width": 0.36 }, "zoom": { "width": 0.56 }, @@ -972,7 +972,7 @@ defaults. | `redact` | The same line as a page of transcript, every word under a black bar; each bar lifts off as its word is said, the punch phrase highlighted in amber when it is revealed. `kineticQuote` and `redact` are one treatment a clip: when both are on, give one of them `clips` (a clip named by neither falls to the one without a list). | | `odometer` | A counter in a corner: rolling digits, the count going up on each clip — `montage.n` when the clip has it, else its place — at the punch phrase (`at: "phrase"`, else a quarter second in), a 9 rolling on to the next 0. `label` under it ("times"; "" for none). | | `scrubber` | A date rail across the box: a year mark per new year, a tick per dated clip, a playhead that slides to each clip's day as it comes in, with a thumbnail of the clip (its segment's middle frame, `thumbs`) and its date riding under it. The rail keeps clear of an odometer in a corner on its edge. | -| `glitch` | A VHS tear at each cut between two years (`on: "every"`: every cut between clips; `on: "clips"`: only the cut INTO each clip its `clips` list names, 1–60 ids, each with a clip right before it — `clips` is refused under any other `on`): scanlines, torn bars in two channels and noise for `seconds` centred on the cut, the new year big with its colours split, and a `PLAY ▶` date stamp in the corner (`stamp`). Seeded, so every frame is the same tear on every render. | +| `glitch` | A VHS tear at each cut between two years (`on: "every"`: every cut between clips; `on: "clips"`: only the cut INTO each clip its `clips` list names, 1–60 ids, each with a clip right before it — `clips` is refused under any other `on`): scanlines, torn bars in two channels and noise for `seconds` centred on the cut, the new year big with its colours split (`year`), and a `PLAY ▶` date stamp in the corner (`stamp`); `year: false, stamp: false` is a bare tear with no text on screen. Seeded, so every frame is the same tear on every render. | | `thenNow` | For each pair — a clip and the very next one — a divider sweeps across the box with the THEN clip's date riding its left and the NOW clip's its right, a scrim on the THEN side. With a crossfade (`transition` > 0) the cut itself becomes a wipe (`xfade=transition=wipeleft`, on that join only) and the divider rides its edge, x = W·(1 − p), over the transition; on a hard cut the divider sweeps alone over `seconds`, centred on the cut. `dates: "year"` shows years only. | | `receipts` | A clip's screenshots (`fx.receipts`, beside the manifest: png/jpg/webp) fly in one after another and fan on one side of the box (`width` of it), then a marker swipes amber over each card's `mark` (fractions of the shot: left, top, right, bottom). They fly out before the clip leaves. | | `punchIn` | The picture snaps in to `scale` (1.2) on each of a clip's `fx.punchIn` seconds — and, with `auto`, on each laugh its captions write ("haha", "lol", "lmao") — for `hold` seconds, about the upper third (`anchor: "upper"`) or the middle, with a white flash and a viewfinder's corners closing on it. Made where the cut is joined (`punchInParts`: the box cropped and scaled back over itself, between those seconds of the segment's clock), so no segment file changes; the hard-cut record names it. | diff --git a/umtool/report-to-video/chrome-fx.mjs b/umtool/report-to-video/chrome-fx.mjs @@ -468,7 +468,8 @@ export function fxPlan(schedule, render, assets = {}) { for (let v = 0; v < 3; v += 1) set(`gn${n}_${v}`, end, { autoAlpha: 0 }); for (let j = 0; j < SL; j += 1) set(`gl${n}_${j}`, end, { autoAlpha: 0, y: 0, x: 0, height: px(10) }); let year = ""; - if (b.year != null) { + // The new year big over the tear, unless the glitch is bare (`year: false`). + if (b.year != null && fx.glitch.year !== false) { const yk = `gy${n}`; init[yk] = { autoAlpha: 0, x: 0, scale: 1.25 }; set(yk, b.at - stepDur, { autoAlpha: 1, x: px(-22), scale: 1.25 }); diff --git a/umtool/report-to-video/chrome-fx.test.mjs b/umtool/report-to-video/chrome-fx.test.mjs @@ -155,6 +155,21 @@ test("a window plays the cut's own clock from `from`", () => { assert.match(html, /data-duration="4"/); }); +test("the page: a bare glitch (year: false, stamp: false) tears with no text; the default draws the year", () => { + const page = (glitch) => fxHtml(schedule({ glitch }), render({ glitch }), { fonts: FONTS }); + const dflt = page({ on: "every" }); + assert.equal((dflt.match(/class="gl-year"/g) ?? []).length, 3, "a year per tear by default"); + assert.equal(page({ on: "every", year: true }), dflt, "year: true is the default, byte for byte"); + const bare = page({ on: "every", year: false, stamp: false }); + assert.equal((bare.match(/class="fx-glitch"/g) ?? []).length, 3, "the same three tears"); + assert.equal((bare.match(/class="gl-slice"/g) ?? []).length, (dflt.match(/class="gl-slice"/g) ?? []).length); + assert.doesNotMatch(bare, /class="gl-year"|class="gl-vhs"/); + assert.ok(!dataOf(bare).cues.some((c) => /^gy\d/.test(c.k)), "no cue moves a year"); + // The tear itself plays the same cues, the year's aside. + const tear = (html) => dataOf(html).cues.filter((c) => !/^g[yv]\d/.test(c.k)); + assert.deepEqual(tear(bare), tear(page({ on: "every", stamp: false }))); +}); + test("frame keys: a glitch's changed clips list changes the keys of the frames at the cuts it tears", () => { const keysOf = (glitch) => { const s = schedule({ glitch }); @@ -172,6 +187,10 @@ test("frame keys: a glitch's changed clips list changes the keys of the frames a assert.deepEqual(keysOf({ on: "clips", clips: ["c3"], stamp: false }), A); const C = keysOf({ on: "clips", clips: ["c2"], stamp: false }); for (const id of ["c2", "c3"]) assert.notEqual(A[cutFrame(id)], C[cutFrame(id)], `the cut into ${id}`); + // A bare tear is another picture at its cut: never a reused frame with the year. + const bare = keysOf({ on: "clips", clips: ["c3"], stamp: false, year: false }); + assert.notEqual(bare[cutFrame("c3")], A[cutFrame("c3")], "year: false keys its frames anew"); + assert.deepEqual(keysOf({ on: "clips", clips: ["c3"], stamp: false, year: true }), A, "year: true keys as the default"); }); // --------------------------------------------------------------------------- @@ -339,6 +358,30 @@ test("pixels: the glitch tears only around its cut", { skip: !haveChromium }, as } }); +test("pixels: a bare glitch (year: false) tears at its cut and leaves nothing after it; with its year, the year stays", { skip: !haveChromium }, async () => { + const shots = async (glitch) => { + const { dir, sched, still } = await project({ glitch }); + try { + const b = sched.fx.glitch.bursts[0]; + return { torn: await still(b.at), after: await still(Math.round((b.at + b.seconds / 2 + 0.3) * 1000) / 1000), dir }; + } catch (e) { + rmSync(dir, { recursive: true, force: true }); + throw e; + } + }; + const g = fxGeometry(render({ glitch: {} })); + const whole = [0, 0, g.width, g.height]; + const bare = await shots({ year: false, stamp: false }); + const withYear = await shots({ stamp: false }); + try { + assert.ok(inked(bare.torn, ...whole) > 0.2, "the bare tear is torn at the cut"); + assert.ok(inked(bare.after, ...whole) < 0.001, "and nothing is on screen once it has passed"); + assert.ok(inked(withYear.after, ...whole) > 0.001, "the default's year is still up then"); + } finally { + for (const s of [bare, withYear]) rmSync(s.dir, { recursive: true, force: true }); + } +}); + test("pixels: the scrubber's playhead sits on its clip's day", { skip: !haveChromium }, async () => { const { dir, sched, still } = await project({ scrubber: {} }); try { diff --git a/umtool/report-to-video/fx.mjs b/umtool/report-to-video/fx.mjs @@ -7,8 +7,9 @@ // redact: { position, size, maxWords, clips? } the cited line under black bars that lift as it is said // odometer: { position, label, at } rolling digits: the count goes up on each clip // scrubber: { position, thumbs } a date rail, the playhead sliding to each clip's day -// glitch: { on, seconds, stamp, clips? } a VHS tear at each cut between years -// (on "every": each cut; on "clips": the cut into each named clip) +// glitch: { on, seconds, stamp, year, clips? } a VHS tear at each cut between years +// (on "every": each cut; on "clips": the cut into each named clip; +// year false: the tear bare, no big year) // thenNow: { pairs: [{ then, now }], seconds, dates } a moving divider between a THEN clip and its NOW // receipts: { position, width } a clip's screenshots fan in, a marker swipes the cited line // zoom: { width } a screenshot pushed in on its focus box @@ -59,7 +60,7 @@ export const FX_DEFAULTS = Object.freeze({ redact: Object.freeze({ position: "bottom", size: 44, maxWords: 14, clips: null }), odometer: Object.freeze({ position: "top-right", label: "times", at: "phrase" }), scrubber: Object.freeze({ position: "top", thumbs: true }), - glitch: Object.freeze({ on: "year", seconds: 0.5, stamp: true, clips: null }), + glitch: Object.freeze({ on: "year", seconds: 0.5, stamp: true, year: true, clips: null }), thenNow: Object.freeze({ pairs: Object.freeze([]), seconds: 0.6, dates: "date" }), receipts: Object.freeze({ position: "right", width: 0.36 }), zoom: Object.freeze({ width: 0.56 }), @@ -130,7 +131,7 @@ const ALLOWED = { redact: ["position", "size", "maxWords", "clips"], odometer: ["position", "label", "at"], scrubber: ["position", "thumbs"], - glitch: ["on", "seconds", "stamp", "clips"], + glitch: ["on", "seconds", "stamp", "year", "clips"], thenNow: ["pairs", "seconds", "dates"], receipts: ["position", "width"], zoom: ["width"], @@ -214,6 +215,7 @@ export function validateFx(fx, where = "render.chrome.fx") { if (v.on !== undefined && !FX_GLITCH_ON.includes(v.on)) errors.push(`${w}.on must be ${oneOf(FX_GLITCH_ON)}`); if (v.seconds !== undefined && !numIn(v.seconds, 0.2, 1.5)) errors.push(`${w}.seconds must be from 0.2 to 1.5`); if (v.stamp !== undefined && typeof v.stamp !== "boolean") errors.push(`${w}.stamp must be true or false`); + if (v.year !== undefined && typeof v.year !== "boolean") errors.push(`${w}.year must be true or false`); // `clips` is the list `on: "clips"` tears into, and nothing else's. const listed = v.clips !== undefined && v.clips !== null; if (listed && (!Array.isArray(v.clips) || !v.clips.length || v.clips.length > FX_GLITCH_CLIPS_MAX || @@ -694,7 +696,9 @@ export function fxSchedule({ segments, entries, metas = [], render, D, total, wo year: db ? db.y : null, date: db ? fxDateLabel(db) : "", seed: k, }); } - out.glitch = { stamp: gl.stamp, bursts }; + // `year: false` (a bare tear, no text) is written only when it is off, so + // every schedule without it is byte for byte what it was. + out.glitch = { stamp: gl.stamp, ...(gl.year === false ? { year: false } : {}), bursts }; } // ---- THEN / NOW --------------------------------------------------------------- diff --git a/umtool/report-to-video/fx.test.mjs b/umtool/report-to-video/fx.test.mjs @@ -102,7 +102,7 @@ test("fxOn / fxKeysOn / resolveFx: an effect is on when it is an object", () => assert.equal(fxOn(render({})), false); assert.equal(fxOn(render({ glitch: null })), false); assert.deepEqual(fxKeysOn(render({ glitch: {}, odometer: null, scrubber: {} })), ["scrubber", "glitch"]); - assert.deepEqual(resolveFx(render({ glitch: { seconds: 0.8 } }), "glitch"), { on: "year", seconds: 0.8, stamp: true, clips: null }); + assert.deepEqual(resolveFx(render({ glitch: { seconds: 0.8 } }), "glitch"), { on: "year", seconds: 0.8, stamp: true, year: true, clips: null }); assert.equal(resolveFx(render({}), "glitch"), null); }); @@ -317,6 +317,20 @@ test("the glitch's clips: a list for on \"clips\" alone, 1 to 60 ids, each a cli assert.deepEqual(m({ on: "every" }), []); }); +test("the glitch's year: true or false; false is written to the schedule, true (the default) leaves it as it was", () => { + assert.deepEqual(validateFx({ glitch: { year: false, stamp: false } }), []); + assert.deepEqual(validateFx({ glitch: { year: true } }), []); + assert.match(validateFx({ glitch: { year: "no" } }).join(), /glitch\.year must be true or false/); + const timeline = [clip("c1", "2019-05-02"), clip("c2", "2021-01-01"), clip("c3", "2021-06-01"), clip("c4", "2026-01-01")]; + const dflt = sched({ glitch: { on: "every" } }, { timeline }).fx.glitch; + assert.ok(!("year" in dflt), "no year key unless it is off"); + assert.deepEqual(sched({ glitch: { on: "every", year: true } }, { timeline }).fx.glitch, dflt); + const bare = sched({ glitch: { on: "every", year: false, stamp: false } }, { timeline }).fx.glitch; + assert.equal(bare.year, false); + // The bursts are the same tears: only the page leaves the year out. + assert.deepEqual(bare.bursts, dflt.bursts); +}); + test("the scrubber: a tick per dated clip, the rail padded, a year mark per new year", () => { const s = sched({ scrubber: {} }); const sc = s.fx.scrubber; diff --git a/umtool/report-to-video/modules/fx.mjs b/umtool/report-to-video/modules/fx.mjs @@ -21,7 +21,7 @@ export default defineModule({ intro: "Overlays on the picture -- receipts, a zoom, the scrubber, a kinetic quote, punch-ins, whip cuts -- (`render.chrome.fx`, fx.mjs); `umtool takes effects <p>` lists the presets.", rows: [ ["`render.chrome.fx.<effect>`", "scrubber · receipts · zoom · kineticQuote · redact · odometer · punchIn · thenNow · whip · glitch", "a take: `umtool take <p> --effect <name>`"], - ["`render.chrome.fx.glitch.on`, `.clips`", "`year` (a tear at each cut between years) · `every` (each cut between clips) · `clips` (only the cut INTO each clip `clips` names: 1–60 ids, each with a clip right before it) · default `year`; `clips` only with `on: \"clips\"`. `.seconds` 0.2–1.5 · 0.5, `.stamp` (the `PLAY ▶` date) · `true`", "manifest"], + ["`render.chrome.fx.glitch.on`, `.clips`", "`year` (a tear at each cut between years) · `every` (each cut between clips) · `clips` (only the cut INTO each clip `clips` names: 1–60 ids, each with a clip right before it) · default `year`; `clips` only with `on: \"clips\"`. `.seconds` 0.2–1.5 · 0.5, `.stamp` (the `PLAY ▶` date) · `true`, `.year` (the new year big over the tear; `false` with `stamp: false` is a bare tear, no text) · `true`", "manifest"], ], }, region: "fx",