Skip to content

tape: captions last per word, playback speed divides time - #727

Draft
foxnne wants to merge 1 commit into
mainfrom
automation/caption-time
Draft

foxnne wants to merge 1 commit into
mainfrom
automation/caption-time

Conversation

@foxnne

@foxnne foxnne commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Part of fizzyedit/work#16

What changes

  • A demo caption stays up Script.reading_ms_per_word (300 ms) per word of title and text at 1x, never under Script.reading_min_ms (2 s). Both are named constants. The old character-count formula with its 12 s cap is gone, so long captions no longer vanish quickly.
  • Playback speed moves from Player.rate into Sequencer.speed: a plain f32, default 1, clamped to 0.5..4 (setSpeed), stepped through Sequencer.speeds = 0.5, 0.75, 1, 1.5, 2, 3, 4 (stepSpeed). playUntil turns a frame's wall time into demo time and wallMs divides a caption's ms by speed, so the whole demo speeds up with it.
  • Seek and rewind ask advance for a demo time, which no speed enters, so they stay exact at any speed.
  • The 0.25x notch is dropped (the floor is 0.5). Player.rate/setRate/stepRate are replaced by player.seq.speed/setSpeed/stepSpeed; the overlay, Editor.zig and the demo.speed command follow. No UI added; the slider is a later PR.
  • docs/AUTOMATION.md describes both.

Verification (Linux cloud)

  • Unit tests: word counts, the 2 s floor and its boundary, title plus text; every notch (0.5 to 4) through playUntil/wallMs; clamping and stepping; a rewind and replay lands on the same moment at every speed.
  • Gates: scripts/check-fmt.sh, scripts/zb build, build test, build test-integration (92/92 steps succeeded), build check-web, build test-sdk-version, build lint, build check-tests-reached all pass.
  • Not seen in a running app: no UI change besides the speed label reading seq.speed.
  • The SDK fingerprint did not move; sdk_version untouched.

Generated by Claude Code

A caption stays up 0.3 s a word of title and text at 1x, never under 2 s
(Script.reading_ms_per_word, reading_min_ms), so long captions no longer
vanish quickly. The player's rate becomes Sequencer.speed, a plain f32 in
0.5..4 (default 1) stepped through 0.5, 0.75, 1, 1.5, 2, 3, 4; it divides
demo time on the wall clock (playUntil, wallMs). Seek and rewind ask
advance for a demo time, so they stay exact at any speed.

Part of fizzyedit/work#16

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lc78nzw65EqAttcHSvg2XF

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants