Skip to content

Smooth skips: forward skip blends into the next track over 5 seconds - #100

Merged
sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-smooth-skips
Jul 19, 2026
Merged

sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-smooth-skips

Conversation

@sanylax2

Copy link
Copy Markdown
Collaborator

What

Pressing Next now starts a real transition instead of a hard cut: the current track mixes out and the next mixes in over a fixed 5 seconds, using the full dual-deck machinery (beatmatch, beat-align, bass swap, vocal-aware handling, loudness leveling) — the same blend as an end-of-track transition, just started on demand.

How

  • Player.next(): when audibly playing, not already mid-blend, and the queue has more than one track, it spends the skip and calls beginTransition(toIndex:) at the current position with activeTransitionDuration = 5. Paused players, a second tap mid-blend, and one-track queues hard-cut exactly as before (repeated taps stay predictable).
  • tick() builds its TransitionPlan from activeTransitionDuration ?? transitionSettings.durationSeconds, so the user's crossfade setting still governs natural end-of-track blends; the override only lives for the in-flight blend and clears on finish/cancel.
  • finishTransition() still records the history step, but a new transitionIsSkip flag suppresses the natural-completion skip earn — a skip is a spend; without this, every skip blend would refund itself and the budget would never deplete.

Testing

On device: press Next mid-song → 5-second beatmatched mix-out into the next track, skip badge decremented and staying decremented after the blend completes; natural end-of-track blends still use the configured duration; Next while paused still cuts instantly; previous() after a skip still refunds.

🤖 Generated with Claude Code

https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP


Generated by Claude Code

next() now starts a real dual-deck transition (beat-align, bass swap,
vocal handling — the same machinery as an end-of-track blend) with a
fixed 5 s fade instead of a hard cut, whenever the player is audibly
playing and not already mid-blend. The in-flight blend carries a
duration override so the user's crossfade setting still governs
natural transitions. finishTransition records the history step but
does NOT earn the skip back for skip blends (a skip is a spend);
paused players, second taps mid-blend, and one-track queues hard-cut
as before.
@sanylax0
sanylax0 merged commit dc33748 into main Jul 19, 2026
2 of 4 checks 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.

3 participants