Skip to content

Fix time warp repetition semantics: split pattern into chunks instead of speeding it up - #27

Merged
ncg777 merged 1 commit into
mainfrom
copilot/fix-time-warp-repetition-parameter
Aug 7, 2026
Merged

Fix time warp repetition semantics: split pattern into chunks instead of speeding it up#27
ncg777 merged 1 commit into
mainfrom
copilot/fix-time-warp-repetition-parameter

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The time warp repetition parameter (timeWarpRepeats) was implemented based on a misunderstanding: it compressed the whole pattern into 1/k of the track period and replayed it k times, effectively making the sequence k times faster.

The intended semantics: the pattern plays once at its normal rate, and the track period is split into k equal 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 by k.
  • cli/generate.ts (buildTrackEvents): same fix for the CLI/offline renderer so it stays in sync with the browser scheduler.
  • Warp quantize divisions are now scaled to steps-per-chunk so the quantize grid remains step-aligned.
  • Updated the parameter label and descriptions in src/components/EditorSurface.vue, src/presets.ts, cli/cli.ts, and cli/mcp.ts.

TimeWarpPreview already drew the curve piecewise per chunk, so the visualization now matches the actual scheduling behavior.

Validation

  • yarn type-check passes
  • yarn build:cli passes

Co-authored-by: ncg777 <15840233+ncg777@users.noreply.github.com>
Copilot AI requested a review from ncg777 August 7, 2026 03:29
@ncg777
ncg777 marked this pull request as ready for review August 7, 2026 03:30
@ncg777
ncg777 merged commit f3139f2 into main Aug 7, 2026
1 check 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