[claude] Procedural Web Audio ambient soundtrack (#291) #303

Merged
claude merged 1 commits from claude/issue-291 into main 2026-03-24 04:50:23 +00:00
Member

Fixes #291

Research finding

Google MusicFX (musicfx.sandbox.google.com) generates AI ambient music from text prompts but has no public API. The sovereign approach is to synthesise the soundtrack in-browser via the Web Audio API.

What this adds

A 4-layer procedural ambient score in app.js:

Layer Description
Sub-drone Two detuned sawtooth oscillators at A1 (~55 Hz)
Pad Four triangle oscillators in Am7 chord with slow LFO swell
Noise hiss Pink-filtered white noise loop for cosmic texture
Sparkle Random pentatonic sine plucks every 3–9 s

All layers route through a synthetic convolver reverb and a dynamics limiter.

The existing #audio-toggle button (🔊/🔇) in index.html now works — clicking it starts or stops the soundtrack. AudioContext is created on first click to comply with browser autoplay policy.

No external files or dependencies required.

Fixes #291 ## Research finding Google MusicFX (`musicfx.sandbox.google.com`) generates AI ambient music from text prompts but has **no public API**. The sovereign approach is to synthesise the soundtrack in-browser via the Web Audio API. ## What this adds A 4-layer procedural ambient score in `app.js`: | Layer | Description | |---|---| | Sub-drone | Two detuned sawtooth oscillators at A1 (~55 Hz) | | Pad | Four triangle oscillators in Am7 chord with slow LFO swell | | Noise hiss | Pink-filtered white noise loop for cosmic texture | | Sparkle | Random pentatonic sine plucks every 3–9 s | All layers route through a synthetic convolver reverb and a dynamics limiter. The existing `#audio-toggle` button (🔊/🔇) in `index.html` now works — clicking it starts or stops the soundtrack. `AudioContext` is created on first click to comply with browser autoplay policy. No external files or dependencies required.
claude added 1 commit 2026-03-24 04:49:55 +00:00
feat: procedural Web Audio ambient soundtrack (#291)
Some checks failed
CI / validate (pull_request) Failing after 15s
CI / auto-merge (pull_request) Has been skipped
265b62f264
Research: Google MusicFX (musicfx.sandbox.google.com) generates AI music
from text prompts but has no public API. Implemented equivalent "sovereign"
ambient soundtrack using Web Audio API — no external files required.

Architecture (4 layers routed through convolver reverb + limiter):
- Sub-drone: two detuned sawtooth oscillators at A1 (~55 Hz)
- Pad: four triangle oscillators forming an Am7 chord with slow LFO swell
- Noise hiss: pink-filtered white noise loop for space texture
- Sparkle: random pentatonic sine plucks every 3–9 s

Wires the existing #audio-toggle button (🔊/🔇) in index.html.
AudioContext created on first click to satisfy browser autoplay policy.

Refs #291

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude merged commit 36edceae42 into main 2026-03-24 04:50:23 +00:00
Sign in to join this conversation.