Skip to content

Slice 12 — Beat Grid: detection, nudge, energy #13

Closed

Description

@cbaucom

Parent

#1

What to build

Beat Grid module: decode the soundtrack (Web Audio), estimate BPM and beat offsets; nudge(targetDuration, beatGrid, energy) snaps each slide's boundary to the nearest beat without hard-quantizing. Energy setting (calm/medium/punchy) maps to beats-held-per-slide bands. Beat sync is a cascade setting with a global off switch.

Type: AFK | Stories: 18, 19, 20, 22

User stories covered

  • Story 18: slide transitions nudged to land on music beats
  • Story 19: Energy setting controlling how many beats each slide holds (calm vs punchy)
  • Story 20: beat sync uses target durations as baseline (nudged, not hard-quantized)
  • Story 22: turn beat sync off entirely so durations are exactly what was set

Acceptance criteria

  • Given a synthesized click track of known BPM, when analyzed, then detected BPM is within ±2% and offset within ±30ms.
  • Given beat sync on, when planned, then every slide boundary lands on a beat and each duration deviates from its target by at most half a beat interval.
  • Given beat sync off, when planned, then durations equal targets exactly.
  • Given each energy level on the same timeline+track, when planned, then average slide duration differs in the expected direction.

Technical notes

Decode adapter thin; all math pure and heavily tested with synthetic fixtures. Detection results cached in slideshow.json so reopen doesn't re-analyze.

Blocked by

Activity

  1. cbaucom commented on Jun 11, 2026

    @cbaucom
    OwnerAuthor

    PR opened: #32

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentTriaged PRD ready for agent implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions