Skip to content

recording: pace drivers in content-time (lockstep follow-up)#32

Merged
borisbat merged 3 commits into
masterfrom
bbatkin/recording-content-time-holds
Jun 7, 2026
Merged

recording: pace drivers in content-time (lockstep follow-up)#32
borisbat merged 3 commits into
masterfrom
bbatkin/recording-content-time-holds

Conversation

@borisbat

@borisbat borisbat commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Follow-up to the lockstep-recording sweep (dasImgui #189 / #191, both merged). Converts the node-editor recording drivers from wall-clock sleep() pacing to content-time hold_content.

Why

Under lockstep the recorder captures every rendered frame at a fixed 1/fps delay, so a wall-clock sleep(ms) yields render_rate/fps * ms of video (beats stretch on a fast machine and drift off the real-time voiceover). hold_content(app, ms) waits ms/1000*fps captured frames, so a beat is exactly ms of video. hold_content is a dasImgui playwright function already in scope (these drivers already call say / say_begin / record_check_* from the same module), and hold_content == sleep outside a recording session, so non-recording runs are unchanged.

Changes

10 pacing sleep() calls across 7 drivers → hold_content(app, ...): the lead before a gesture, the flow-pulse loop interval, and the dwell remainder. Effect-waits (wait_for_mouse_idle / record_check_*) are untouched. No hold_remainder helper or ref_time_ticks anchors exist here, so this is purely the sleep → hold_content substitution.

Validation

All 7 drivers lint clean (-load_module dasImgui -load_module dasImguiNodeEditor). Re-recorded first_graph end-to-end (self-verifying): 1594 frames / 30 fps = 53.133 s exactly, dropped 0, exit 0.

🤖 Generated with Claude Code

Convert the node-editor recording drivers from wall-clock sleep() pacing to
content-time hold_content (dasImgui's content-time helper, now on master). Under
lockstep the recorder captures every rendered frame at a fixed 1/fps delay, so a
wall-clock sleep(ms) stretches a beat to render_rate/fps * ms of video and drifts
it off the voiceover; hold_content(app, ms) waits ms/1000*fps captured frames so
the beat is exactly ms of video.

10 pacing sleep() calls across 7 drivers -> hold_content(app, ...): the lead before
a gesture, the flow-pulse loop interval, and the dwell remainder. Effect-waits
(wait_for_mouse_idle / record_check_*) are untouched. hold_content == sleep outside
a recording session, so non-recording runs are unchanged.

Validated by re-recording first_graph (1594 frames / 30fps = 53.133s): exit 0
(self-verifying), dropped 0.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the integration recording drivers’ pacing to be content-time based under lockstep recording, replacing wall-clock sleep() delays with hold_content(app, ...) so recorded video timing matches the intended narration/beat timing independent of machine render speed.

Changes:

  • Replace flow-pulse loop pacing from sleep(interval) to hold_content(app, interval) in multiple recording drivers.
  • Replace “lead-in” and “dwell remainder” sleep(...) calls with hold_content(app, ...) in gesture/chord timing helpers.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/integration/record_styling.das Uses hold_content(app, interval) for link pulse pacing during voiced dwell.
tests/integration/record_first_graph.das Uses hold_content(app, interval) for link pulse pacing during voiced dwell.
tests/integration/record_delete_and_select.das Converts link pulse pacing and Delete-key lead/remainder holds to hold_content.
tests/integration/record_create_by_drag.das Uses hold_content(app, interval) for post-creation link pulse pacing.
tests/integration/record_context_menus.das Uses hold_content(app, interval) for initial “live link” pulse pacing.
tests/integration/record_connect_by_drag.das Uses hold_content(app, interval) for post-link-creation pulse pacing.
tests/integration/record_clipboard.das Converts chord timing helper lead/remainder holds to hold_content.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

borisbat and others added 2 commits June 7, 2026 08:53
Re-records all 9 tutorial .mp4s on the content-time recording drivers
(matches the dasImgui content-time pacing rework). Even beat timing under
the lockstep fixed-dt clock; no wall-clock judder.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l videos

Self-contained per-repo runner: Clean -> Prepare (TTS) -> Record -> Convert
for every tests/integration/record_*.das driver. Run one repo at a time;
defaults re-record the whole repo. Computes its own repo root from
$PSScriptRoot, resolves the sibling dasImgui checkout for the recording
infra + module, and picks up $env:DASLANG.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@borisbat borisbat merged commit 754ed46 into master Jun 7, 2026
5 checks passed
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