Skip to content

fix(app): stop the parked tone that stood in for the bed while backgrounded - #569

Open
khagele wants to merge 1 commit into
efiten:masterfrom
khagele:fix/568-drop-bg-drone
Open

fix(app): stop the parked tone that stood in for the bed while backgrounded#569
khagele wants to merge 1 commit into
efiten:masterfrom
khagele:fix/568-drop-bg-drone

Conversation

@khagele

@khagele khagele commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Closes #568

Backgrounding in full stopped the bed and the generative music and started a held tone in their
place. That tone is withdrawn; hidden now starts nothing.

Why

  • Nothing masked it. The bed is already stopped by the time it starts, so it was the only
    continuous sound in the mix — and since app: the ambient soundbed is thin and static, give it space and movement #496 dialled it from a C3 sine at 0.025 into a B3
    square with three partials at 0.045, swelling and breathing at 1.2 Hz, the one voice that
    carries no information by design was the most attention-seeking shape in the engine.
  • The pocket is not silent without it. cue() and txBlip() have no visibility guard, so
    every reception and every transmission keeps sounding while hidden. "Parked, not dead" was
    already being said by what does carry information.

What changed

  • app/src/sound.js: BG, startBgAmbience() and stopBgAmbience() removed, with their call
    sites on the hidden path, the return path, setMode() and destroy(). The hidden branch is now
    if (mode === 'full') { stopBed(); stopMusic() }.
  • Removing startBgAmbience() also takes its ensureCtx() off the hidden path, so nothing arms a
    pointerdown listener while the page is not visible.
  • docs/2026-07-16-sound-modes.md: an addendum dated 2026-08-31 withdrawing the tone, and a
    pointer to it at the top of the 2026-07-27 addendum that introduced it.
  • changelog.json (both copies): one entry, 16 words.

Unchanged: the transition cues in either active mode (falling on backgrounded, rising on resumed),
the hard stop of bed and music on hidden, the restart of both on return, and every other mode.

Tests

soundengine.test.js loses the four tests that pinned the tone's existence, shape and suspended-
context guard, and gains two:

  • leaves nothing running while hidden — only the transition cue sounds — counts started
    oscillators after backgrounding in full: two, the cue's own notes. Mutation-checked by putting
    a bare held oscillator back on the hidden path (expected 2, got 3).
  • restarts the bed itself on return, not only the music — counts buffer sources rather than
    oscillators, because the bed is looped noise and the music is oscillators, so an oscillator count
    cannot tell a return path that forgot startBed() from one that did not. Mutation-checked by
    dropping startBed() (expected 3 to be greater than 3).

starts nothing while the context is still suspended is kept, retitled: it now covers the whole
hidden path rather than the ambience alone.

Verification

  • npx vitest run in app/: 893 passed (48 files).
  • npm run build in app/: clean.
  • npx vitest run in web/: 509 passed, including parity.test.js on the two changelog copies.

…ounded

Backgrounding in `full` stopped the bed and the music and started a held tone
in their place. With the bed gone nothing masked it, so the one voice that
carries no information by design was the loudest continuous thing in the mix —
and by efiten#496 it had been dialled from a C3 sine at 0.025 into a B3 square with
three partials at 0.045, breathing at 1.2 Hz.

"Parked, not dead" was already being said by what does carry information:
cue() and txBlip() have no visibility guard, so receptions and transmissions
keep sounding while the phone is away. Hidden now stops bed + music and starts
nothing.

Removing startBgAmbience also takes its ensureCtx() off the hidden path, so
nothing arms a pointerdown listener while the page is not visible.

Unchanged: the transition cues in either active mode, the restart of bed and
music on return, and every other mode.

Closes efiten#568

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

app: pocketing the phone in full mode swaps the bed for a pulsing tone that carries nothing

1 participant