Frontend: Album 1 BGM player + full SFX wiring to sound-effects/*.wav #68

Closed
opened 2026-04-26 08:14:01 +00:00 by PlasticDigits · 11 comments
PlasticDigits commented 2026-04-26 08:14:01 +00:00 (Migrated from gitlab.com)

Summary

Ship a layered audio experience in the frontend: background music (Album 1) via a small in-app player, plus one-shot and sparse-loop SFX from frontend/public/sound-effects/{name}.wav, with SFX mixed above the music. Authoritative product guidance lives in docs/frontend/sound-effects-recommendations.md; this issue turns that into concrete implementation + acceptance work.

  • Web Audio (or a thin wrapper): at least two gain nodes — bgmGain (album) and sfxGain (SFX), both feeding master with user mute and per-bus volume (see accessibility below).
  • SFX load *.wav with decode once, AudioBufferSource per play (or pool); avoid reusing one HTMLAudioElement for overlapping hits.
  • Autoplay policy: the album must not play() on load. It starts (or is armed) on the first user gesture on the page (click / key / touch) — e.g. same handler used to unlock BGM, then continue in-order playback.
  • Kumbaya / high-frequency path: SFX for quote refresh and disabled CTAs should stay subtle (see sound-effects-recommendations.md §6); avoid spamming the same *.wav on every TanStack refetch.

Album 1 — music player (deliverable 1)

Asset root: frontend/public/music/album_1/ (order below).

# File Display name (suggested)
1 01-hills-dawn.mp3 Hills at Dawn
2 02-coin-path.mp3 Coin Path
3 03-rainbow-switchback.mp3 Rainbow Switchback
4 04-moss-and-brass.mp3 Moss and Brass
5 05-jig-generator.mp3 Jig Generator
6 06-starline-overworld.mp3 Starline Overworld
7 07-lucky-run.mp3 Lucky Run
8 08-kumbaya-campfire.mp3 Kumbaya Campfire

Player behavior

  • Plays sequentially from track 1 → 8, then may loop the album or stop at end (pick one, document; looping is a better default for ambient sessions).

  • Default BGM level: bgmGain 0.25 of nominal (i.e. 25% perceived starting volume vs max slider) when the user has not changed the slider; persist preference in localStorage (or existing settings pattern).

  • Controls (must exist in the UI and be wired):

    • Play / pause the current BGM.
    • Skip next (advance to next track; if on last, wrap to first or stop — same rule as end-of-album).
    • Current track name (human-readable, from table above; keep in code as a single const playlist).
    • Mute (master or BGM-only; document; prefer separate SFX vs BGM mute if time allows, else master mute is acceptable for v1).
    • Volume slider (0–100% mapped to gain, with sensible curve e.g. logarithmic for perception).
  • Autoplay / unlock: on first user interaction with the document (within the app shell), if BGM is enabled and not yet started, call play(); show player state (playing / current title).

  • SFX over music: SFX bus gain independent of BGM; default mix so SFX are clear without clipping; optional light ducking of BGM on SFX (nice-to-have, not required for acceptance).


SFX — current frontend/public/sound-effects/*.wav (deliverable 2)

File What it is Primary UI / event hooks (wire here)
ui_button_click.wav Soft, felt/wood-style click Primary + secondary buttons (Connect, Buy, copy, non-destructive actions), view/tab switches, generic in-app navigation that uses <button> / CTA.
coin_hit_shallow.wav Low–mid “coin / value” hit Your buy: optional layer at tx submit (after sign) and/or as shorter “value” accent before charmed_confirm on confirm; not for every poller tick.
charmed_confirm.wav Warm, chordal “stake / charm” stamp Onchain success for own buy / buyFor / relevant write confirmations (TimeCurve, treasury flows where UX signals “you’re in”); wallet connect success; generic tx confirmed (where not an error).
peer_buy_distant.wav Quieter, filtered coin Indexer / feed of other wallets buying (e.g. activity stream, notifications). Throttle (e.g. max 1 SFX / N s per source or per UI batch).
timer_heartbeat_calm.wav Low, thumpy pulse Timer in “attention” regime (e.g. onchain remaining time in a mid band — product-defined threshold, align with timerHardReset / hero timer UX). Sparse (interval in tens of seconds), never every second.
timer_heartbeat_urgent.wav Slightly faster / brighter thump Urgent timer band (e.g. final 1–2 min or user “stakes high” mode). Sparse; respect reduced-sound (see below).
warbow_twang.wav Plucked, bowed ladder WarBow highlights: BP ladder / podium explainer, restrained stinger on notable BP or rank change (not every re-render). Steal / guard / revenge: remap or add assets later; if v1 maps to one, prefer one mapping only to avoid confusion.
kumbaya_whoosh.wav Low-mid whoosh, “route air” Kumbaya path / non-CL8Y entry: when a new swap route is first applied, or CTA path mode changes ETH / USDM; not on every quote refetch — pair with in-flight state (swapQuoteLoading in useTimeCurveSaleSession / issue 56).

Gaps (tracked but may ship after v1, or re-map existing file temporarily)

Many moments in sound-effects-recommendations.md (modal open/close, 13m/15m hard reset, error/revert, sale end, redeem pour, PvP steal/guard/revenge) do not yet have a dedicated *.wav. For full coverage, either: (a) add new scripts/sound-effects presets + regenerate, or (b) temporarily map the closest file (e.g. kumbaya_whoosh for “route”, ui_button_click for “disabled”) and document the mapping. This issue’s acceptance criteria require every user-facing control and major activity in the app to have an intentional SFX (including “silent on purpose” for e.g. hover), with no silent gaps for primary CTAs and core TimeCurve + wallet flows.


Where to integrate (wiring map — non-exhaustive file hints)

  • App shell / layout: mount audio context + BGM + player chrome; first user gesture unblocks playback.
  • TimeCurve / Simple (and related): frontend/src/pages/TimeCurveSimplePage.tsx, useTimeCurveSaleSession, timer / phase hooks (useTimecurveHeroTimer, timeCurveSimplePhase), buy CTA, CHARM / spend controls, Kumbaya quote flow.
  • Wallet: RainbowKit / wagmi connect, disconnect, signing states, tx submit, receipt error/success in shared hooks or a single wallet audio helper.
  • Navigation: route changes, any view switch (e.g. Simple / Arena / Protocol) where present.
  • Global errors / toasts: failure path SFX (pending dedicated asset, see gaps).

Accessibility & settings

  • Respect user OS reduced sound (if you add a toggle) and optionally tie to prefers-reduced-motion per doc.
  • Expose at least: master volume, mute, and (ideal) SFX vs BGM level or mute.

Acceptance criteria

  1. Album player: Exposes play/pause, skip, current track name, mute, and volume; default BGM 25%; playlist plays in order from album_1; BGM autoplays only after first user interaction with the page; state is clear in the UI.
  2. SFX over BGM: All one-shots go through an SFX path with gain independent of BGM, mixed so SFX are audible over music at default levels.
  3. Full app coverage: For each of: buttons, links that navigate in-app, toggles, form submits, modals, tabs/views, and major onchain- or indexer-driven events the user can trigger or observe, there is a defined mapping to either a specific sound-effects/{x}.wav or an explicit no SFX (and why) — no accidental silence on primary actions.
  4. Inventory satisfaction: The eight *.wav above are used where the table says; throttling and no spam on Kumbaya quote / cooldown are verified.
  5. Documentation: Short README or doc section (e.g. under docs/frontend/) links playlist order, SFX file names, and wiring pattern for future assets.

Related doc: docs/frontend/sound-effects-recommendations.md · Regen SFX: cd scripts/sound-effects && python generate.py --out ../../frontend/public/sound-effects


Out of scope (optional follow-ups)

  • New procedural presets for error, hard reset, sale end, PvP-specific hits.
  • BGM ducking and 3D panning.
## Summary Ship a **layered audio experience** in the frontend: **background music** (Album 1) via a small **in-app player**, plus **one-shot and sparse-loop SFX** from `frontend/public/sound-effects/{name}.wav`, with SFX **mixed above** the music. Authoritative product guidance lives in `docs/frontend/sound-effects-recommendations.md`; this issue turns that into **concrete implementation + acceptance** work. ## Architecture (recommended) - **Web Audio (or a thin wrapper):** at least two gain nodes — **`bgmGain`** (album) and **`sfxGain`** (SFX), both feeding **master** with user **mute** and **per-bus volume** (see accessibility below). - **SFX** load `*.wav` with **decode once, `AudioBufferSource` per play** (or pool); avoid reusing one HTMLAudioElement for overlapping hits. - **Autoplay policy:** the album must **not** `play()` on load. It **starts (or is armed)** on the **first user gesture** on the page (click / key / touch) — e.g. same handler used to unlock BGM, then continue in-order playback. - **Kumbaya / high-frequency path:** SFX for quote refresh and disabled CTAs should stay **subtle** (see `sound-effects-recommendations.md` §6); avoid spamming the same `*.wav` on every TanStack refetch. --- ## Album 1 — music player (deliverable 1) **Asset root:** `frontend/public/music/album_1/` (order below). | # | File | Display name (suggested) | |---|------|-------------------------| | 1 | `01-hills-dawn.mp3` | Hills at Dawn | | 2 | `02-coin-path.mp3` | Coin Path | | 3 | `03-rainbow-switchback.mp3` | Rainbow Switchback | | 4 | `04-moss-and-brass.mp3` | Moss and Brass | | 5 | `05-jig-generator.mp3` | Jig Generator | | 6 | `06-starline-overworld.mp3` | Starline Overworld | | 7 | `07-lucky-run.mp3` | Lucky Run | | 8 | `08-kumbaya-campfire.mp3` | Kumbaya Campfire | **Player behavior** - Plays **sequentially** from track 1 → 8, then may **loop the album** or **stop** at end (pick one, document; looping is a better default for ambient sessions). - **Default BGM level:** `bgmGain` **0.25** of nominal (i.e. **25%** perceived starting volume vs max slider) when the user has not changed the slider; persist preference in `localStorage` (or existing settings pattern). - **Controls (must exist in the UI and be wired):** - **Play / pause** the current BGM. - **Skip next** (advance to next track; if on last, wrap to first or stop — same rule as end-of-album). - **Current track name** (human-readable, from table above; keep in code as a single `const` playlist). - **Mute** (master or BGM-only; document; prefer **separate SFX vs BGM mute** if time allows, else master mute is acceptable for v1). - **Volume** slider (0–100% mapped to gain, with sensible curve e.g. logarithmic for perception). - **Autoplay / unlock:** on **first** user **interaction** with the document (within the app shell), if BGM is enabled and not yet started, call `play()`; show player state (playing / current title). - **SFX over music:** SFX bus gain **independent** of BGM; default mix so SFX are **clear** without clipping; optional light **ducking** of BGM on SFX (nice-to-have, not required for acceptance). --- ## SFX — current `frontend/public/sound-effects/*.wav` (deliverable 2) | File | What it is | **Primary UI / event hooks (wire here)** | |------|------------|-------------------------------------------| | `ui_button_click.wav` | Soft, felt/wood-style click | Primary + secondary **buttons** (Connect, Buy, copy, non-destructive actions), **view/tab** switches, generic **in-app** navigation that uses `<button>` / CTA. | | `coin_hit_shallow.wav` | Low–mid “coin / value” hit | **Your** buy: optional layer at **tx submit** (after sign) and/or as **shorter** “value” accent before `charmed_confirm` on **confirm**; **not** for every poller tick. | | `charmed_confirm.wav` | Warm, chordal “stake / charm” stamp | **Onchain success** for **own** `buy` / `buyFor` / **relevant write** confirmations (TimeCurve, treasury flows where UX signals “you’re in”); **wallet connect success**; generic **tx confirmed** (where not an error). | | `peer_buy_distant.wav` | Quieter, filtered coin | **Indexer / feed** of **other wallets** buying (e.g. activity stream, notifications). **Throttle** (e.g. max 1 SFX / N s per source or per UI batch). | | `timer_heartbeat_calm.wav` | Low, thumpy pulse | **Timer in “attention”** regime (e.g. onchain remaining time in a **mid** band — product-defined threshold, align with `timerHardReset` / hero timer UX). **Sparse** (interval in tens of seconds), never every second. | | `timer_heartbeat_urgent.wav` | Slightly faster / brighter thump | **Urgent** timer band (e.g. final **1–2 min** or user “stakes high” mode). **Sparse**; respect reduced-sound (see below). | | `warbow_twang.wav` | Plucked, bowed ladder | **WarBow** highlights: BP ladder / podium explainer, **restrained** stinger on **notable** BP or rank change (not every re-render). Steal / guard / revenge: **remap** or add assets later; if v1 maps to one, prefer **one** mapping only to avoid confusion. | | `kumbaya_whoosh.wav` | Low-mid whoosh, “route air” | **Kumbaya** path / **non-CL8Y** entry: when a **new swap route** is first applied, **or** CTA path mode changes **ETH / USDM**; **not** on every `quote` refetch — pair with in-flight state (`swapQuoteLoading` in `useTimeCurveSaleSession` / [issue 56](docs/frontend/timecurve-views.md#buy-quote-refresh-kumbaya-issue-56)). | **Gaps (tracked but may ship after v1, or re-map existing file temporarily)** Many moments in `sound-effects-recommendations.md` (modal open/close, **13m/15m hard reset**, error/revert, sale end, **redeem** pour, PvP steal/guard/revenge) **do not** yet have a dedicated `*.wav`. For **full** coverage, either: **(a)** add new `scripts/sound-effects` presets + regenerate, or **(b)** temporarily map the **closest** file (e.g. `kumbaya_whoosh` for “route”, `ui_button_click` for “disabled”) and document the mapping. This issue’s **acceptance criteria** require **every user-facing control and major activity** in the app to have an **intentional** SFX (including “silent on purpose” for e.g. hover), with **no silent gaps** for primary CTAs and core TimeCurve + wallet flows. --- ## Where to integrate (wiring map — non-exhaustive file hints) - **App shell / layout:** mount **audio context + BGM + player chrome**; **first user gesture** unblocks playback. - **TimeCurve / Simple (and related):** `frontend/src/pages/TimeCurveSimplePage.tsx`, `useTimeCurveSaleSession`, timer / phase hooks (`useTimecurveHeroTimer`, `timeCurveSimplePhase`), buy CTA, CHARM / spend controls, Kumbaya quote flow. - **Wallet:** RainbowKit / wagmi connect, disconnect, **signing** states, tx submit, receipt error/success in shared hooks or a single **wallet audio** helper. - **Navigation:** route changes, any **view switch** (e.g. Simple / Arena / Protocol) where present. - **Global errors / toasts:** failure path SFX (pending dedicated asset, see gaps). **Accessibility & settings** - Respect user OS **reduced sound** (if you add a toggle) and optionally tie to `prefers-reduced-motion` per doc. - Expose at least: **master volume**, **mute**, and (ideal) **SFX vs BGM** level or mute. --- ## Acceptance criteria 1. **Album player:** Exposes play/pause, skip, **current track name**, **mute**, and **volume**; **default BGM 25%**; playlist plays **in order** from `album_1`; BGM autoplays only after **first** user **interaction** with the page; state is **clear** in the UI. 2. **SFX over BGM:** All one-shots go through an **SFX** path with gain **independent** of BGM, mixed so SFX are **audible** over music at default levels. 3. **Full app coverage:** For **each** of: **buttons, links that navigate in-app, toggles, form submits, modals, tabs/views, and major onchain- or indexer-driven events** the user can trigger or observe, there is a **defined** mapping to **either** a specific `sound-effects/{x}.wav` **or** an explicit **no SFX** (and why) — no accidental silence on primary actions. 4. **Inventory satisfaction:** The eight `*.wav` above are **used** where the table says; throttling and **no spam** on Kumbaya quote / cooldown are verified. 5. **Documentation:** Short **README or doc section** (e.g. under `docs/frontend/`) links playlist order, SFX file names, and **wiring** pattern for future assets. **Related doc:** `docs/frontend/sound-effects-recommendations.md` · **Regen SFX:** `cd scripts/sound-effects && python generate.py --out ../../frontend/public/sound-effects` --- ## Out of scope (optional follow-ups) - New procedural presets for **error**, **hard reset**, **sale end**, PvP-specific hits. - BGM **ducking** and **3D** panning.
PlasticDigits commented 2026-04-26 09:08:49 +00:00 (Migrated from gitlab.com)

mentioned in commit 54ba8cd736

mentioned in commit 54ba8cd736f81b92faaeafe830302c97f05d540c
PlasticDigits commented 2026-04-26 09:08:49 +00:00 (Migrated from gitlab.com)

mentioned in commit 5b087686a9

mentioned in commit 5b087686a922d5806413bfddab3a83808548ef29
PlasticDigits commented 2026-04-26 09:09:51 +00:00 (Migrated from gitlab.com)

Issue #68 — implementation merged to main (54ba8cd)

Implemented the Web Audio layered stack from the issue: Album 1 (tracks 1–8) via bgmGain + HTMLAudioElement / MediaElementSourceNode, SFX via decoded buffers on sfxGain, master + per-bus mutes and localStorage (yieldomega:audio:v1:).

Behavior

  • First pointer gesture unlocks AudioContext and prefetches core WAVs; BGM does not auto-start — user presses Play in the header bar (avoids double-toggle with the same click).
  • TimeCurve Simple: coin_hit_shallow after buy tx submit; charmed_confirm on receipt and on redeemCharms receipt; kumbaya_whoosh on CL8Y/ETH/USDM pay-mode change; peer buys (indexer head, not self) + timer heartbeats (≤13m calm / ≤2m urgent, throttled); timer SFX off when prefers-reduced-motion.
  • Wallet: charmed_confirm on connect false→true (no sound on cold load when already connected).
  • Global UI: delegated ui_button_click on primary buttons/nav links; softer gain on disabled buttons; inputs/ranges excluded.

Docs / crosslinks

  • docs/frontend/sound-effects-recommendations.md §8, docs/frontend/timecurve-views.md (Simple audio), docs/testing/invariants-and-business-logic.md (table row + subsection), skills/README.md, .cursor/skills/yieldomega-guardrails/SKILL.md item 17.

Tests run: cd frontend && npm run typecheck && npm test (Vitest all green). Playwright navigation was not completed in this environment (hung waiting on browser); recommend a quick CI / local UI smoke.


@brouie please verify when you have a moment. Checklist:

  • Fresh load: no audio until interaction; header shows Interact to enable audio — then Play for BGM; Play starts Album 1 track 1; Skip advances; track title updates; Pause stops.
  • Volume / mute: BGM default ~25%; BGM mute, SFX mute, and All mute behave; reload persists prefs.
  • Nav / buttons: clicks on nav, Connect, etc. play a subtle UI click; disabled Buy plays a softer click.
  • TimeCurve Simple (with indexer): switching CL8Y / ETH / USDM plays kumbaya_whoosh once per change (not on every quote refetch).
  • Buy path: shallow coin after submit, charmed confirm on success; wallet connect success = charmed (not on page refresh when already connected).
  • Peer buys + timer: when another wallet buys appear at top of feed, distant sound at most ~every 8s; in last 13m of sale, sparse calm heartbeat; last 2m urgent variant; with OS reduced motion, no timer heartbeats.
  • Redeem: successful redeem plays charmed_confirm.

Issue left open for your sign-off.

## Issue #68 — implementation merged to `main` (54ba8cd) Implemented the **Web Audio** layered stack from the issue: **Album 1** (tracks 1–8) via `bgmGain` + `HTMLAudioElement` / `MediaElementSourceNode`, **SFX** via decoded buffers on `sfxGain`, **master** + per-bus mutes and **localStorage** (`yieldomega:audio:v1:`). **Behavior** - First **pointer** gesture **unlocks** `AudioContext` and prefetches core WAVs; **BGM does not auto-start** — user presses **Play** in the header bar (avoids double-toggle with the same click). - **TimeCurve Simple:** `coin_hit_shallow` after `buy` tx submit; `charmed_confirm` on receipt and on `redeemCharms` receipt; `kumbaya_whoosh` on CL8Y/ETH/USDM pay-mode change; **peer** buys (indexer head, not self) + **timer** heartbeats (≤13m calm / ≤2m urgent, throttled); timer SFX off when `prefers-reduced-motion`. - **Wallet:** `charmed_confirm` on connect **false→true** (no sound on cold load when already connected). - **Global UI:** delegated `ui_button_click` on primary buttons/nav links; softer gain on **disabled** buttons; inputs/ranges excluded. **Docs / crosslinks** - `docs/frontend/sound-effects-recommendations.md` §8, `docs/frontend/timecurve-views.md` (Simple audio), `docs/testing/invariants-and-business-logic.md` (table row + subsection), `skills/README.md`, `.cursor/skills/yieldomega-guardrails/SKILL.md` item **17**. **Tests run:** `cd frontend && npm run typecheck && npm test` (Vitest all green). Playwright navigation was not completed in this environment (hung waiting on browser); recommend a quick CI / local UI smoke. --- @brouie please verify when you have a moment. **Checklist:** - [ ] Fresh load: **no** audio until interaction; header shows **Interact to enable audio — then Play for BGM**; **Play** starts Album 1 track 1; **Skip** advances; track title updates; **Pause** stops. - [ ] **Volume / mute:** BGM default ~25%; BGM mute, SFX mute, and All mute behave; reload persists prefs. - [ ] **Nav / buttons:** clicks on nav, Connect, etc. play a subtle **UI click**; **disabled** Buy plays a softer click. - [ ] **TimeCurve Simple (with indexer):** switching **CL8Y / ETH / USDM** plays **kumbaya_whoosh** once per change (not on every quote refetch). - [ ] **Buy path:** shallow **coin** after submit, **charmed** confirm on success; **wallet connect** success = charmed (not on page refresh when already connected). - [ ] **Peer buys + timer:** when another wallet buys appear at top of feed, **distant** sound at most ~every 8s; in last **13m** of sale, sparse calm heartbeat; last **2m** urgent variant; with OS **reduced motion**, no timer heartbeats. - [ ] **Redeem:** successful redeem plays **charmed_confirm**. Issue left **open** for your sign-off.
PlasticDigits commented 2026-04-26 10:55:18 +00:00 (Migrated from gitlab.com)

mentioned in issue #71

mentioned in issue #71
PlasticDigits commented 2026-05-01 03:12:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #103

mentioned in issue #103
Brouie commented 2026-05-01 15:23:23 +00:00 (Migrated from gitlab.com)

mentioned in issue #108

mentioned in issue #108
Brouie commented 2026-05-01 15:29:45 +00:00 (Migrated from gitlab.com)

Source-level pre-walkthrough on 54ba8cd (carried into 243e2a0) surfaced a concrete gap.

Confirmed at source level

  • All 8 SFX WAVs present in frontend/public/sound-effects/: charmed_confirm, coin_hit_shallow, kumbaya_whoosh, peer_buy_distant, timer_heartbeat_calm, timer_heartbeat_urgent, ui_button_click, warbow_twang.
  • All 8 registered in src/audio/sfxUrls.ts.
  • localStorage key yieldomega:audio:v1: consistent across audioPreferences.ts and audioPlaybackState.ts.

Finding — filed as #108

Acceptance criterion 4 ("The eight *.wav above are used where the table says") is currently regressed: 3 of the 8 registered SFX have zero call sites in the codebase:

SFX Call sites
coin_hit_shallow 0 (your commit cited "after buy tx submit" — not wired)
kumbaya_whoosh 0 (your commit cited "on CL8Y/ETH/USDM pay-mode change" — not wired)
warbow_twang 0 (also not in prefetchCommonSfx list)

Full inventory + repro + suggested fix in #108.

cc @PlasticDigits

Source-level pre-walkthrough on `54ba8cd` (carried into `243e2a0`) surfaced a concrete gap. ### Confirmed at source level - All 8 SFX WAVs present in `frontend/public/sound-effects/`: `charmed_confirm`, `coin_hit_shallow`, `kumbaya_whoosh`, `peer_buy_distant`, `timer_heartbeat_calm`, `timer_heartbeat_urgent`, `ui_button_click`, `warbow_twang`. - All 8 registered in `src/audio/sfxUrls.ts`. - localStorage key `yieldomega:audio:v1:` consistent across `audioPreferences.ts` and `audioPlaybackState.ts`. ### Finding — filed as #108 Acceptance criterion 4 ("The eight `*.wav` above are used where the table says") is currently regressed: 3 of the 8 registered SFX have **zero call sites** in the codebase: | SFX | Call sites | |---|---| | `coin_hit_shallow` | 0 (your commit cited "after `buy` tx submit" — not wired) | | `kumbaya_whoosh` | 0 (your commit cited "on CL8Y/ETH/USDM pay-mode change" — not wired) | | `warbow_twang` | 0 (also not in `prefetchCommonSfx` list) | Full inventory + repro + suggested fix in [#108](https://gitlab.com/PlasticDigits/yieldomega/-/issues/108). cc @PlasticDigits
PlasticDigits commented 2026-05-02 04:33:58 +00:00 (Migrated from gitlab.com)

Kumbaya whoosh is for future, other 2 need wiring

Kumbaya whoosh is for future, other 2 need wiring
PlasticDigits commented 2026-05-02 05:11:32 +00:00 (Migrated from gitlab.com)

mentioned in commit ae72b9d016

mentioned in commit ae72b9d01667b2e0aee5aac7b461f74ff364b220
PlasticDigits commented 2026-05-02 05:32:37 +00:00 (Migrated from gitlab.com)

Update — @brouie please re-verify (#68 maintainer guidance + inventory #108)

Shipped coin_hit_shallow on TimeCurve buy / single-tx buyViaKumbaya submit (tx hash returned, before receipt) via playGameSfxCoinHitBuySubmit in useTimeCurveSaleSession, useTimeCurveArenaModel, and lib/timeCurveKumbayaSingleTx.ts.

warbow_twang is wired for indexed ladder podium cues only (shouldPlayWarbowRankStinger in frontend/src/audio/warbowRankSfxPolicy.ts + throttle ~18s in WebAudioMixer; useArenaWarbowRankSfx in Arena view). Mid-pack rank drift (e.g. 10→4) stays silent by design — tests in warbowRankSfxPolicy.test.ts.

kumbaya_whoosh remains off prefetch / UX until explicit pay-route wiring (per PlasticDigits).

Invariant / docs: INV-AUDIO-68-WIRE in docs/testing/invariants-and-business-logic.md, sound-effects §8, timecurve-views (Simple/Arena audio), manual QA #manual-qa-sfx-coin-warbow-108. Cross-links from .cursor/skills/yieldomega-guardrails/SKILL.md, skills/README.md, skills/play-timecurve-warbow/SKILL.md, skills/contributor-mobile-album-dock/SKILL.md.

Automated verification: cd frontend && npm ci && npm run typecheck && npm run test -- --run (Vitest green).

Issue left open for your sign-off.

Checklist for @brouie

  • Buy: Shallow coin right after signing buy / buyViaKumbaya, charmed still on receipt; no coin on approvals/wrap-only steps on two-hop path.
  • WarBow: Twang only on top-3 indexed milestones (enter podium or climb within ranks 1–3); throttle feels sane; no ping on irrelevant rank jitter.
  • Kumbaya whoosh: Still absent on quote refetch-only.
  • Prefetch list includes warbow_twang, excludes whoosh.
  • Doc anchors: INV-AUDIO-68-WIRE + manual QA #manual-qa-sfx-coin-warbow-108.
## Update — @brouie please re-verify (#68 maintainer guidance + inventory #108) Shipped **`coin_hit_shallow`** on **TimeCurve `buy` / single-tx `buyViaKumbaya` submit** (**tx hash** returned, **before** receipt) via `playGameSfxCoinHitBuySubmit` in `useTimeCurveSaleSession`, `useTimeCurveArenaModel`, and `lib/timeCurveKumbayaSingleTx.ts`. **`warbow_twang`** is **wired** for **indexed ladder podium cues** only (**`shouldPlayWarbowRankStinger`** in `frontend/src/audio/warbowRankSfxPolicy.ts` + throttle \~18s in `WebAudioMixer`; `useArenaWarbowRankSfx` in Arena view). Mid-pack rank drift (e.g. **10→4**) stays silent by design — tests in `warbowRankSfxPolicy.test.ts`. **`kumbaya_whoosh`** remains **off** prefetch / UX until explicit pay-route wiring (per PlasticDigits). **Invariant / docs:** `INV-AUDIO-68-WIRE` in `docs/testing/invariants-and-business-logic.md`, sound-effects §8, timecurve-views (Simple/Arena audio), manual QA [\#manual-qa-sfx-coin-warbow-108](docs/testing/manual-qa-checklists.md). Cross-links from `.cursor/skills/yieldomega-guardrails/SKILL.md`, `skills/README.md`, `skills/play-timecurve-warbow/SKILL.md`, `skills/contributor-mobile-album-dock/SKILL.md`. **Automated verification:** `cd frontend && npm ci && npm run typecheck && npm run test -- --run` (Vitest green). Issue **left open** for your sign-off. ### Checklist for @brouie - [ ] **Buy:** Shallow coin right after signing **buy** / **buyViaKumbaya**, **charmed** still on receipt; no coin on approvals/wrap-only steps on two-hop path. - [ ] **WarBow:** Twang only on **top-3 indexed** milestones (enter podium or climb within ranks **1–3**); throttle feels sane; **no** ping on irrelevant rank jitter. - [ ] **Kumbaya whoosh:** Still absent on quote refetch-only. - [ ] Prefetch list includes **`warbow_twang`**, excludes **whoosh**. - [ ] Doc anchors: INV-AUDIO-68-WIRE + manual QA `#manual-qa-sfx-coin-warbow-108`.
Brouie commented 2026-05-04 03:09:06 +00:00 (Migrated from gitlab.com)

all 4 checklist items pass — source + audible.

source-side wiring:

  • playGameSfxCoinHitBuySubmit defined at audio/playGameSfx.ts:19-20 (gainMul 0.9), called from 3 modules per your note — useTimeCurveSaleSession.ts:1051 (Simple), useTimeCurveArenaModel.tsx:2293 (Arena), lib/timeCurveKumbayaSingleTx.ts:111 (single-tx Kumbaya)
  • all 3 call sites are post-writeContractAsync resolve, before waitForTransactionReceipt
  • warbow_twang wired via WebAudioMixer.ts:341 throttle + useArenaWarbowRankSfx.ts consumer
  • warbowRankSfxPolicy.test.ts 5/5 vitest pass (covers 10→4 mid-pack silence + top-3 entry/movement triggers)
  • prefetch list at AudioEngineProvider.tsx:71-81 includes warbow_twang, correctly excludes kumbaya_whoosh
  • doc anchors INV-AUDIO-68-WIRE at invariants-and-business-logic.md:416 + manual-qa-sfx-coin-warbow-108 at manual-qa-checklists.md:469 resolve

audible walk on /timecurve/arena:

  • buy CHARM submit → coin_hit_shallow plays as expected, fires the moment the tx hash returns
  • warbow podium climb after buy → warbow_twang plays as expected (throttle behaves)
  • slider move + CL8Y/ETH/USDM tab toggling → silent, no whoosh

all 4 items in your checklist pass.

all 4 checklist items pass — source + audible. **source-side wiring**: - `playGameSfxCoinHitBuySubmit` defined at `audio/playGameSfx.ts:19-20` (gainMul 0.9), called from 3 modules per your note — `useTimeCurveSaleSession.ts:1051` (Simple), `useTimeCurveArenaModel.tsx:2293` (Arena), `lib/timeCurveKumbayaSingleTx.ts:111` (single-tx Kumbaya) - all 3 call sites are post-`writeContractAsync` resolve, before `waitForTransactionReceipt` - `warbow_twang` wired via `WebAudioMixer.ts:341` throttle + `useArenaWarbowRankSfx.ts` consumer - `warbowRankSfxPolicy.test.ts` 5/5 vitest pass (covers 10→4 mid-pack silence + top-3 entry/movement triggers) - prefetch list at `AudioEngineProvider.tsx:71-81` includes warbow_twang, correctly excludes kumbaya_whoosh - doc anchors `INV-AUDIO-68-WIRE` at invariants-and-business-logic.md:416 + `manual-qa-sfx-coin-warbow-108` at manual-qa-checklists.md:469 resolve **audible walk on /timecurve/arena**: - buy CHARM submit → coin_hit_shallow plays as expected, fires the moment the tx hash returns - warbow podium climb after buy → warbow_twang plays as expected (throttle behaves) - slider move + CL8Y/ETH/USDM tab toggling → silent, no whoosh all 4 items in your checklist pass.
Brouie (Migrated from gitlab.com) closed this issue 2026-05-04 03:09:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/yieldomega#68
No description provided.