[art] No music — audio.js synthesizes SFX only, no background music or ambient track #10

Closed
opened 2026-09-23 14:33:44 +00:00 by Mark · 1 comment
Owner

Asset gap.

web/js/audio.js synthesizes 10 SFX cues (shot, melee, boom, alert, hack, pickup, click, door, win, lose) via WebAudio oscillators and noise buffers. No music is loaded or scheduled anywhere.

The README's gameplay loop is "semi-realtime squad tactics — strike teams, playbooks, snap-focus events." A 3-mission campaign with persistent progression and an after-action report is unaccompanied by any background music.

What's missing:

  • Title-screen track (synthwave/cyberpunk, loopable)
  • Mission ambient (low-key tactical tension, loopable)
  • After-action / win sting (post-mission report)

Implementation note: audio.js already gates on first user gesture (silent no-op when AudioContext unavailable). Music should follow the same pattern — synthesized if no asset available, or load an OGG/MP3 if dropped into web/assets/music/.

Acceptance:

  • Title screen plays a looped track on first user gesture
  • Mission in-progress plays ambient at lower gain than SFX
  • Win/lose play the existing sting cues (already there)

Refs: web/js/audio.js synthesizes SFX at _master.gain = 0.14.

**Asset gap.** `web/js/audio.js` synthesizes 10 SFX cues (shot, melee, boom, alert, hack, pickup, click, door, win, lose) via WebAudio oscillators and noise buffers. No music is loaded or scheduled anywhere. The README's gameplay loop is "semi-realtime squad tactics — strike teams, playbooks, snap-focus events." A 3-mission campaign with persistent progression and an after-action report is unaccompanied by any background music. **What's missing:** - Title-screen track (synthwave/cyberpunk, loopable) - Mission ambient (low-key tactical tension, loopable) - After-action / win sting (post-mission report) **Implementation note:** `audio.js` already gates on first user gesture (silent no-op when AudioContext unavailable). Music should follow the same pattern — synthesized if no asset available, or load an OGG/MP3 if dropped into `web/assets/music/`. **Acceptance:** - Title screen plays a looped track on first user gesture - Mission in-progress plays ambient at lower gain than SFX - Win/lose play the existing sting cues (already there) Refs: `web/js/audio.js` synthesizes SFX at `_master.gain = 0.14`.
Author
Owner

Shipped as commit a53d5c0 on main. Synthesized two looped tracks in web/js/audio.js (no asset files required):

  • title: 8-step A-minor arpeggio + sub-bass drone, 4s loop, fires on showTitle()
  • ambient: detuned drone pair + LFO + sparse filtered noise ticks, 12s loop, fires on DEPLOY / CONTINUE
  • win / lose: existing sting cues unchanged; music stops via audioMusic(null) in endMission so the sting is clean
  • pause: audioDuck(true/false) fades the music bus from 0.06 to 0.018 instead of stopping playback

Music bus sits well below the SFX master (0.06 vs 0.14) so it never competes with combat cues. The full asset-loader scaffolding (_tryLoadAsset, _playAssetLoop) is wired up and ready to be enabled in one place if/when OGGs are dropped into web/assets/music/ -- see the README there.

make ci all gates green after rebase: 7 smoke scripts + lint + Playwright + Godot headless import.

Shipped as commit a53d5c0 on main. Synthesized two looped tracks in web/js/audio.js (no asset files required): - title: 8-step A-minor arpeggio + sub-bass drone, 4s loop, fires on showTitle() - ambient: detuned drone pair + LFO + sparse filtered noise ticks, 12s loop, fires on DEPLOY / CONTINUE - win / lose: existing sting cues unchanged; music stops via audioMusic(null) in endMission so the sting is clean - pause: audioDuck(true/false) fades the music bus from 0.06 to 0.018 instead of stopping playback Music bus sits well below the SFX master (0.06 vs 0.14) so it never competes with combat cues. The full asset-loader scaffolding (_tryLoadAsset, _playAssetLoop) is wired up and ready to be enabled in one place if/when OGGs are dropped into web/assets/music/ -- see the README there. make ci all gates green after rebase: 7 smoke scripts + lint + Playwright + Godot headless import.
Mark closed this issue 2026-09-24 15:43:43 +00:00
Sign in to join this conversation.
No description provided.