Repository navigation
fix(editor): correct long-form loop placement (arr-time anchoring) - #48
< 8000 span class="titleSuffix__ZhvAF5">Merged
Merged
Conversation
Loop regions live in arr-time on the composed timeline, but several loop-set sites derived the anchor from master-time. These are no-ops for single-take (arr == master) and only misbehave in long-form arrangements. - TransportBar (toggleLoop, set in/out points) and SyncTuner (loop-around-playhead) used masterToArr(currentTime), which scans for the first segment whose master range contains the playhead and snaps onto the FIRST occurrence of a repeated chunk. They now use the authoritative playback.timelineT so the loop lands where the playhead actually is. - SyncTuner.setLoopAroundPlayhead built the loop straight from master-time (offset by the segment delta in long-form). Extracted a tested loopAroundPlayhead() helper that works purely in arr-time. - useAudioMaster parks the idle <audio> at arrToMaster(loop.start) instead of the raw arr value, so a wrap firing immediately after a loop is set doesn't start from a cold/wrong decoder position. - Timeline: while a loop is active, a pill click only selects (no seek), so the walker's immediate-wrap doesn't yank playback out of the loop. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 of 5 tasks
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.
<
2C47
/div>
Summary
Loop regions live in arr-time on the composed timeline, but several loop-set sites derived the anchor from master-time. These are no-ops for single-take (arr == master) and only misbehave in long-form arrangements.
toggleLoop, set in/out points) and SyncTuner (loop-around-playhead) usedmasterToArr(currentTime), which scans for the first segment whose master range contains the playhead and snaps onto the first occurrence of a repeated chunk. They now use the authoritativeplayback.timelineT, so the loop lands where the playhead actually is.loopAroundPlayhead()helper that works purely in arr-time.<audio>atarrToMaster(loop.start)instead of the raw arr value, so a wrap firing right after a loop is set doesn't start from a cold/wrong decoder position.Notes
Test plan
tsccleanloopAroundPlayheadcases🤖 Generated with Claude Code