fix(app): stop the parked tone that stood in for the bed while backgrounded - #569
Open
khagele wants to merge 1 commit into
Open
fix(app): stop the parked tone that stood in for the bed while backgrounded#569khagele wants to merge 1 commit into
khagele wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #568
Backgrounding in
fullstopped the bed and the generative music and started a held tone in theirplace. That tone is withdrawn; hidden now starts nothing.
Why
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.025into a B3square with three partials at
0.045, swelling and breathing at 1.2 Hz, the one voice thatcarries no information by design was the most attention-seeking shape in the engine.
cue()andtxBlip()have no visibility guard, soevery 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()andstopBgAmbience()removed, with their callsites on the hidden path, the return path,
setMode()anddestroy(). The hidden branch is nowif (mode === 'full') { stopBed(); stopMusic() }.startBgAmbience()also takes itsensureCtx()off the hidden path, so nothing arms apointerdownlistener while the page is not visible.docs/2026-07-16-sound-modes.md: an addendum dated 2026-08-31 withdrawing the tone, and apointer 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.jsloses 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 startedoscillators after backgrounding in
full: two, the cue's own notes. Mutation-checked by puttinga 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 thanoscillators, 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 bydropping
startBed()(expected 3 to be greater than 3).starts nothing while the context is still suspendedis kept, retitled: it now covers the wholehidden path rather than the ambience alone.
Verification
npx vitest runinapp/: 893 passed (48 files).npm run buildinapp/: clean.npx vitest runinweb/: 509 passed, includingparity.test.json the two changelog copies.