Skip to content

[Product] Add an active rehearsal player with precise looping and role controls #961

Description

@seonghobae

Parent: #958

Buyer-visible gap

BandScope currently concentrates on importing and explaining analysis. The buyer still needs a product surface that turns that analysis into repeatable rehearsal action. Static cue cards, timelines and exports do not by themselves let a player practise a difficult section, count in, loop it, adjust speed, mute/solo a reference part, and verify the next entrance.

This issue completes the core product loop without turning BandScope into a DAW.

Product outcome

A musician selects any detected or user-defined section and rehearses it immediately with a deterministic local transport:

select section or cue
→ hear count-in
→ loop exact passage
→ slow down or restore tempo
→ solo/mute available reference stems
→ navigate cue-to-cue by keyboard
→ preserve progress and return to the same rehearsal state

The analysis remains advisory. The player must expose confidence and allow users to correct loop boundaries when detection is wrong.

Required scope

Transport

  • Play, pause, stop, seek and restart from the current rehearsal cue.
  • Sample-accurate or explicitly bounded loop start/end semantics across supported formats and sample rates.
  • Count-in with configurable beats and meter-aware defaults where meter is available.
  • Playback-rate control with a declared quality boundary; preserve pitch when the chosen backend supports it and label fallback behavior honestly.
  • Keyboard-accessible transport and focus-safe shortcuts that do not trigger while typing in text fields.
  • A single authoritative transport state machine; do not let UI controls, native playback and project persistence race independently.

Rehearsal controls

Runtime architecture

Accessible and honest UI

  • All controls expose name, role, state, shortcut and current value to assistive technology.
  • Waveform/timeline visual selection has an equivalent numeric start/end editor and exact-value table.
  • Show when a loop came from detected analysis versus a user correction.
  • Never report playback success merely because a command returned; confirm observable transport state and rendered position.

Acceptance criteria

  • A licensed local demo and a user-selected local audio file can be played, paused, sought and stopped through the production desktop boundary.
  • Loop timing error is measured against deterministic PCM fixtures at multiple sample rates and remains within a documented bound.
  • Count-in, loop restart, playback-rate changes and cue navigation are deterministic under repeated tests.
  • Device loss, file replacement, unsupported codec, cancellation, app backgrounding and project close fail safely without leaking paths or hanging the UI.
  • Transport state restores after ordinary restart and coordinates with the crash-safe project/autosave issue under [Product Readiness] Complete BandScope 1.0 with measurable rehearsal outcomes #958.
  • Keyboard-only and screen-reader journeys can select a section, start a count-in, loop, pause and clear the loop.
  • Existing cue/action PRs are integrated through one public contract or explicitly superseded; no duplicate local transport stores remain.
  • Production statement/branch coverage and public API documentation are 100% for repository-owned player code.
  • CPU use, memory, underrun/dropout count and worst-case control latency are measured on the supported hardware profiles.
  • Current-head checks, security gates, independent approval and zero unresolved threads pass.

Real-world tests

  • 44.1/48/96 kHz, mono/stereo and short/long files;
  • pickup before bar one, odd meter, tempo change and silence around a boundary;
  • repeated start/stop and rapid loop-boundary edits;
  • Bluetooth/USB device removal and default-device switch;
  • very short loops, invalid reversed ranges and range beyond decoded duration;
  • pause during count-in and stop during loop restart;
  • user-corrected section boundary retained across restart;
  • stem unavailable despite a role recommendation;
  • keyboard focus inside text/numeric input;
  • CPU pressure without UI deadlock or unbounded queue growth.

Non-goals

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dependenciesDependency or lockfile maintenancearea: securitySecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workscope: product-gapCustomer-visible product gapstatus: blockedBlocked by conflict, dependency, or required prerequisitetype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions