Skip to content

Per-section syncing (non-uniform time-map) for songs that change tempo/meter #8

Closed
5 of 5 issues completed
Closed

Description

@cchacs

Effort: L

Status

Backlog not being worked on right now. Filed to capture the design so the current uniform sync work (issue #16 / the sync-detection follow-up) can stay in scope.

Problem

The Sync Tempo/Offset feature applies one uniform BPM factor + one offset across the entire song (deliberately — issue #16 scoped full per-note DTW warping out). That model can't correctly align a song whose tempo or time signature changes mid-track, because no single factor fits every section.

Concrete case: Pink Floyd — "Money" is in 7/8 for the verses/main riff and switches to 4/4 for the guitar solo. On a correctly-synced .sloppak of it:

  • whole-song beat tracking reads ~128–129 BPM (the 7/8 quarter-note tempo), matching the tab;
  • but the solo section (the Lead arrangement's opening, ~186s in) has a genuinely different local tempo/feel.

A uniform factor derived from one section would smear every other section. For songs like this the best the uniform model can do is recognize the tab is already aligned and do no harm (factor ≈ 1, offset ≈ 0) — it can't actually improve a section-varying song.

Proposal

Add an optional per-section sync that produces a piecewise / non-uniform time-map instead of one global factor+offset:

  • Use the arrangement's existing sections[] markers (Intro/Verse/Chorus/Solo/…) as region boundaries.
  • Run the same chroma + DTW alignment (from the current sync redesign) per section, anchored on each section's opening notes against the audio for that region.
  • Produce a per-section (factor, offset) (or a set of anchor correspondences) and bake it into note timestamps once, offline — consistent with the rhythm-game model (fixed committed timestamps; no live warping at play time).
  • Per-section confidence + the ability to apply/skip individual sections (a bad match on one section shouldn't move the others).

Design considerations / open questions

  • Beat grid interaction. A non-uniform warp changes what "BPM" means afterward and how the shared ebeats grid (used for quantization/snapping in the canvas timeline) is reconciled. Needs a real decision: re-derive ebeats from the warped timeline, or keep a separate authored grid?
  • Data model. Today sections are {name, number, start_time} and there's one song-wide beat grid. Piecewise correction likely needs either per-section tempo metadata or a resampled ebeats array — a schema change with save/build/XML round-trip implications.
  • Boundary handling. Discontinuities at section edges (a section that ends early/late) — clamp, blend, or snap to the next section's anchor?
  • Scope guard. Should stay offline/baked (not a live score-follower — see issue fix(security): restrict youtube-audio to YouTube hostnames #16's note on why Slopsmith isn't a live-alignment system).
  • UX. How to present per-section results without overwhelming (per-section confidence badges, "apply all high-confidence" vs. review each).

Relationship to current work

The uniform sync redesign (issue #16 + follow-up PRs) remains the shipped model and should keep its do-no-harm guarantee: on an already-synced song (including meter-changing ones like Money), it must return factor ≈ 1 / offset ≈ 0 rather than inventing a damaging global correction. This issue is the strictly-bigger feature to actually correct section-varying songs, and is intentionally deferred.

🤖 Generated with Claude Code


Migrated from Maestro-Ltd/slopsmith-plugin-editor#23.

Activity

  1. added theissue type on Aug 3, 2026
  2. added
    invalidThis doesn't seem right
    and removed on Aug 3, 2026
  3. self-assigned this
    on Aug 4, 2026
  4. cchacs commented on Oct 2, 2026

    @cchacs
    CollaboratorAuthor

    Split into sub-issues (proposed; this issue is still marked Backlog, so these are for planning, not a commitment to start). The numbered titles ("Per-section sync N/5") map to issue numbers as shown:

    Order Sub-issue Depends on
    1 #22 Per-section sync 1/5: guard the uniform model's do-no-harm behavior on meter-changing songs none
    1 #23 Per-section sync 2/5: decide data model, beat grid and boundary handling (design, no code) none
    1 #24 Per-section sync 3/5: per-section alignment engine (chroma + DTW per section, with confidence) none (analysis only)
    2 #25 Per-section sync 4/5: bake the piecewise warp into note timestamps #23, #24
    3 #26 Per-section sync 5/5: per-section results UI #24, #25

    The "Design considerations / open questions" in this issue are #23. #22 protects the shipped do-no-harm guarantee before anything is built on it.


    Generated by Claude Code

  5. cchacs commented on Oct 2, 2026

    @cchacs
    CollaboratorAuthor

    @itsjustroxi I've removed you from your other assigned issues and kept you on this one, because it lists open design questions that need decisions before any build (still marked Backlog, so this is for when it is picked up). They are now broken out in sub-issue #23:

    1. Beat grid: re-derive ebeats from the warped timeline, or keep a separate authored grid? (The issue calls this "a real decision".)
    2. Data model: per-section tempo metadata or a resampled ebeats array, and the resulting schema change and save/build/XML round-trip implications (any new pack-format key must land in feedpak-spec first).
    3. Boundary handling at section edges: clamp, blend, or snap to the next section's anchor?
    4. Scope guard: confirm it stays offline and baked into committed timestamps rather than becoming a live score-follower.

    Generated by Claude Code

  6. cchacs commented on Oct 11, 2026

    @cchacs
    CollaboratorAuthor

    Design sub-issue #23 is complete in merged PR #68. Per-section sync time-map decisions now define the shared-grid/data-model contract, constrained continuous boundaries and offline baking scope, including skipped-section and round-trip requirements.

    No new feedpak schema key is needed. #24 still owns alignment/confidence, #25 baking and round-trip tests, and #26 the review UI. This parent remains open; per-section sync is not yet implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions