Skip to content

feat: add lookahead scheduler#14

Merged
britle20 merged 3 commits into
developfrom
feat/5-lookahead-scheduler
Jun 4, 2026
Merged

feat: add lookahead scheduler#14
britle20 merged 3 commits into
developfrom
feat/5-lookahead-scheduler

Conversation

@britle20

@britle20 britle20 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #5.

Adds a tick-based lookahead scheduler for 1-bar loop playback and exposes sample loop transport APIs from the browser audio engine.

Changes

  • Added PPQ 480 tick/time conversion utilities and tests.
  • Added a React-independent lookahead scheduler with loop boundary tests.
  • Added startSampleLoop, stopLoop, and transport snapshot APIs to the browser audio engine.
  • Moved unit tests under tests/unit/ and added tsconfig.test.json so test files are typechecked.
  • Updated audio engine/testing docs, feature status, and Active Issue Order.

Testing

  • npm run typecheck
  • npm run lint
  • npm run test
  • npm run build

Screenshots

Not applicable. This is audio scheduling infrastructure without UI changes.

Notes / Limitations

  • Manual browser audio listening was not performed because no UI caller exists for this scheduler yet.
  • stopLoop() clears future scheduler windows, but Web Audio events already submitted inside the short schedule-ahead window may still fire.

Follow-up

  • Wire drum sequencer clip events into startSampleLoop() in a later feature.

@britle20 britle20 merged commit bc3de0a into develop Jun 4, 2026
1 check passed
@britle20 britle20 mentioned this pull request Jun 4, 2026
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.

1 participant