Repository navigation
fix(timeline): trim chrome per arr-time occurrence - #34
Merged
Merged
Conversation
Trim is master-time, but the audio canvas runs in arr-time. With a chunk repeated N times in a long-form arrangement, the trim master- time has N arr-time occurrences. After #32, the trim-dim band and handles only rendered at min(in)..max(out) — one big region spanning the whole song with handles only at the earliest/latest occurrence. That's wrong: the un-trimmed parts of repeated chunks didn't get dimmed, and only one of the N pairs of handles was draggable. Fix: - Dim path uses sliceByArrSegments(trim.in, trim.out, segments) to get the playable arr-time slices directly. Everything outside any slice is dimmed. Trim entirely outside all segments → whole canvas dimmed. Per-occurrence dim bands fall out for free. - Handles render at every mastersToArrAll(trim.in/out) occurrence. All clipped to canvas extent; off-screen positions don't render. - classifyAudioHit walks all occurrences of trim.in / trim.out and reports trim-in / trim-out on hit at any of them. Drag handler unchanged — it sets master-trim, so dragging any occurrence moves every visual handle in lockstep. Single-take and long-form-without-duplicates: identical to before (one occurrence each). Long-form-with-duplicates: now visually truthful + interactable at every chunk repeat. Co-Authored-By: Claude Opus 4.7 <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.
Summary
Trim is master-time, the audio canvas is arr-time. A chunk repeated N times in long-form gives the trim master-time N arr-time occurrences. After #32, the dim-band and handles only rendered at `min(in)..max(out)` — one block spanning the whole song with handles only at the earliest/latest occurrence.
User feedback: pills are instances of chunks in lanes, and operations should treat each instance independently. Trim chrome should reflect that.
Fix
Single-take + long-form-without-duplicates: byte-identical to pre-fix (one occurrence per trim-bound). Long-form-with-duplicates: visually truthful + every handle is grabbable.
Verified
🤖 Generated with Claude Code