Skip to content

0017. Sound effects and music as synthesizer data

  • Status: Accepted (2026-11-27, Phase 1b gate)
  • Date: 2026-11-27
  • Phase: 1

The owner chose original art and audio made by Claude for the sample game (no downloaded packs). Recorded audio would need an external tool or a large generated WAV per sound, and the platform is AI-first: an AI tool should be able to read and tweak a sound (“make the jump higher-pitched”) as easily as a prefab.

  • A new asset type synth points at a small JSON document (schema synth.schema.json): either a sound (sfxr-style: wave, pitch slide, arpeggio, vibrato, envelope, low-pass) or a song (tracks of note patterns such as "C4 - E4 ." played in a sequence, plus a drum line with k s h).
  • @ludrel/audio renders them to buffers when the asset loads (renderSound, renderSong, 22 050 Hz mono, seeded noise so output is deterministic). Songs render as seamless loops.
  • Synth files are validated with the other documents: in dev, in tests and at build time.
  • Recorded files (audio asset type, decoded by the browser) remain supported for games that want them.
  • Sprout’s 11 sound effects and 3 songs weigh about 9 kB of JSON in total, and AI tools can edit every one of them.
  • The sound is deliberately “chiptune”; realistic audio still needs recorded files.
  • Rendering a 16 s song takes a few milliseconds on load; very long songs should be split or recorded instead.