Skip to content

performance: the song decides whether parts loop; no checkbox - #250

Merged
petersalomonsen merged 1 commit into
masterfrom
song-driven-performance
Sep 27, 2026
Merged

petersalomonsen merged 1 commit into
masterfrom
song-driven-performance

Conversation

@petersalomonsen

Copy link
Copy Markdown
Owner

This removes the performance checkbox. Whether a part loops is now decided by the song, and navigating between parts always works while it plays.

Why. The checkbox bundled four things:

  1. waits active or inert;
  2. whether a part can be jumped to by name;
  3. the agent's fast path and stage tools;
  4. an automatic switch of the agent's session.

Only the first is a real choice, and the song already states it: a part loops because it ends in waitForSignal.

What changes:

  • Waits follow the song. Live playback always honours them. The new loopParts(false) makes every wait after it play straight through; it resets on each compile. An export (an OfflineAudioContext render) never waits, as before.
  • Jumping to a part by name works whenever the song plays.
  • The agent is on stage whenever the song plays and has parts:
    • part names and "next" are handled by the panel itself, without the model;
    • other text is a stage turn: stage prompt, low effort, where the playhead is.
  • When stopped, the same text is an ordinary chat.
  • The producer role also gets list_parts, go_to_part and send_signal.
  • No automatic session switch. /new starts a fresh session, which is worth doing before a show.
  • Removed: the checkbox and window.togglePerformanceMode.
  • Docs: song-api.md has a new "Performance: looping parts and signals" section, including loopParts.

Tests:

  • Sequencer: waits marked by loopParts(false) play through; the compiler marks the waits after it; each compile starts looping again. test-sequencer 16/16.
  • Worklet spec, through the real audio worklet: parts loop by default, and loopParts(false) plays through. Chromium passes locally.
  • Stage-agent e2e: stage behaviour while playing, ordinary chat when stopped. 2/2 locally.
  • Roles, test-agent-tools 146/146; test-quickjs-sandbox 19/19; headless studio 3/3.

🤖 Generated with Claude Code

The performance checkbox bundled four things: waits active or inert, part
jumps allowed, the agent's fast path and stage tools, and an automatic
agent-session switch. Only the first is a real choice, and the song already
states it: a part loops because it ends in waitForSignal.

- Live playback always honours the waits; loopParts(false) in the song makes
  the waits after it play straight through (reset per compile). An export -
  an OfflineAudioContext render - never waits, as before.
- Jumping to a part by name works whenever the song plays.
- The agent is on stage whenever the song plays and has parts: part names
  and "next" are dispatched by the panel, other text is a stage turn (stage
  prompt, low effort, playhead state). Stopped, it is an ordinary chat. The
  producer also has list_parts/go_to_part/send_signal. No automatic session
  switch: /new starts a fresh one (worth it before a show).
- The checkbox and window.togglePerformanceMode are gone.

Tests: sequencer (loopParts inert waits; compiler marks waits after
loopParts(false)), the worklet spec (loops by default, loopParts(false)
plays through), the stage-agent e2e (stage while playing, ordinary chat when
stopped), roles; song-api.md updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying webassemblymusic with  Cloudflare Pages  Cloudflare Pages

Latest commit: 44fe368
Status: ✅  Deploy successful!
Preview URL: https://b41e73dc.webassemblymusic.pages.dev
Branch Preview URL: https://song-driven-performance.webassemblymusic.pages.dev

View logs

@petersalomonsen
petersalomonsen merged commit 3febb12 into master Sep 27, 2026
9 checks passed
@petersalomonsen
petersalomonsen deleted the song-driven-performance branch September 27, 2026 08:51
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