recording: pace drivers in content-time (lockstep follow-up)#22
Merged
Conversation
Convert the ImPlot recording drivers from wall-clock pacing to content-time, matching dasImgui's content-time helpers (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; content-time holds wait for ms/1000*fps captured frames instead. Per driver: drop the local wall-clock hold_remainder(dwell, t0) helper and use dasImgui's hold_remainder_content; anchor each beat in captured frames (record_frame_count) instead of ref_time_ticks; convert pacing sleep(ms) -> hold_content(app, ms). Also drop a pre-existing unused `require implot` (STYLE030) that lingered in three of the drivers (needed for the changed files to pass lint). record_drag_tools.das needs no change -- it already paces every beat with say() (content-time since dasImgui #191) and has no wall-clock holds. Validated by re-recording line_plot (869 frames / 30fps = 28.967s) and query_and_hover (802 / 30 = 26.733s): exit 0 (every record_check_* gesture assertion passes -> content-time waits match the synth timelines), dropped 0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the ImPlot integration recording drivers to pace narration beats in content-time (captured frames) rather than wall-clock time, so recorded beat lengths remain consistent regardless of render rate and stay aligned with voiceover.
Changes:
- Replaces wall-clock beat timing (
ref_time_ticks()+sleep) with captured-frame timing (record_frame_count(app)+hold_content/hold_remainder_content). - Removes per-file
hold_remainderhelpers in favor of the sharedhold_remainder_content. - Drops an unused
require implotin the affected drivers to satisfy linting.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/record_subplots.das | Switches beat lead/hold pacing to content-time; removes unused require implot and local hold_remainder. |
| tests/integration/record_shaded_and_stairs.das | Replaces wall-clock beat anchoring/holds with record_frame_count + hold_remainder_content. |
| tests/integration/record_realtime_scroll.das | Anchors the narration window to captured frames and uses hold_remainder_content; removes unused require implot. |
| tests/integration/record_query_and_hover.das | Converts beat timing to content-time and removes unused require implot. |
| tests/integration/record_multi_series.das | Uses hold_content for lead-in and hold_remainder_content for beat remainder timing. |
| tests/integration/record_multi_axes.das | Converts lead-in sleeps to hold_content and beat remainder to hold_remainder_content. |
| tests/integration/record_line_plot.das | Converts lead-in and intra-zoom pacing from sleep to hold_content, and uses hold_remainder_content for beat remainder. |
| tests/integration/record_heatmap_histogram.das | Switches beat anchors to captured frames and uses hold_remainder_content. |
| tests/integration/record_colormaps_and_style.das | Switches beat anchors to captured frames and uses hold_remainder_content. |
| tests/integration/record_bar_groups_and_pie.das | Converts lead-in and dwell sleeps to hold_content and uses hold_remainder_content for beat remainder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Re-records all 11 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. line_plot driver was already content-time in this branch. 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the lockstep-recording sweep (dasImgui #189 / #191, both merged). Converts the ImPlot recording drivers from wall-clock pacing to content-time, so beats match their intended length regardless of render rate and stay aligned with the voiceover.
Why
Under lockstep the recorder captures every rendered frame at a fixed
1/fpsdelay, so a wall-clocksleep(ms)yieldsrender_rate/fps * msof video (beats stretch on a fast machine and drift off the real-time voiceover). Content-time holds wait forms/1000*fpscaptured frames, so a beat is exactlymsof video.Changes (per driver)
def hold_remainder(dwell, t0)helper; use dasImgui'shold_remainder_content.record_frame_count) instead ofref_time_ticks.sleep(ms)→hold_content(app, ms)(leads, mid-beat dwells). Effect-waits (wait_for_mouse_idle/record_check_*/move_to) are untouched.require implot(STYLE030) that lingered in three drivers — required for the now-changed files to pass the CI lint gate.record_drag_tools.dasneeds no change: it already paces every beat withsay()(content-time since #191) and has no wall-clock holds.Validation
All 10 drivers lint clean (
-load_module dasImgui -load_module dasImguiImplot). Re-recorded two self-verifying drivers end-to-end:exit 0 means every
record_check_*gesture assertion passed → the content-time holds stay in sync with the synth mouse/scroll timelines.🤖 Generated with Claude Code