Fix time warp repetition semantics: split pattern into chunks instead of speeding it up - #27
Merged
Merged
Conversation
Co-authored-by: ncg777 <15840233+ncg777@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ncg777
August 7, 2026 03:29
View session
ncg777
marked this pull request as ready for review
August 7, 2026 03:30
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.
Summary
The time warp repetition parameter (
timeWarpRepeats) was implemented based on a misunderstanding: it compressed the whole pattern into1/kof the track period and replayed itktimes, effectively making the sequencektimes faster.The intended semantics: the pattern plays once at its normal rate, and the track period is split into
kequal chunks with the warp curve applied locally within each chunk.Changes
src/App.vue(buildTrackEvents): removed the chunk replay loop; each step is now mapped to the chunk it falls into, and the warp is applied to its normalized position within that chunk. Note times and durations are no longer divided byk.cli/generate.ts(buildTrackEvents): same fix for the CLI/offline renderer so it stays in sync with the browser scheduler.src/components/EditorSurface.vue,src/presets.ts,cli/cli.ts, andcli/mcp.ts.TimeWarpPreviewalready drew the curve piecewise per chunk, so the visualization now matches the actual scheduling behavior.Validation
yarn type-checkpassesyarn build:clipasses