Generate sound effect WAV files
generate_sfxSynthesizes game sound effects locally from a preset into 16-bit mono WAV files, returning file paths, seeds for exact reproduction, and editable patch JSON.
Instructions
Synthesize game sound effects locally from a preset and write 16-bit mono 44.1 kHz WAV files. Free for commercial use, no attribution. Returns file paths, the seed of each variant (reuse it to get the exact same sound) and the patch JSON (edit it and call render_patch to fine-tune). Presets: swordQi, guqin, bell, gong, spell, thunder, lightning, breakthrough, talisman, alchemy, chime, flute, qiGather, pipa, erhu, woodfish, drum, coin, pickup, click, confirm, error, jump, hit, explosion, laser, powerUp, levelUp, whoosh, arrow, swordClash, footstepStone, rain, notify, footstepGrass, land, shieldBlock, wind, campfire, stream, caveDrip, pageTurn, typing, chestOpen, monsterGrowl.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for a reproducible result; variant i uses seed + i | |
| count | No | Number of variants to write (default 1). Useful to let the user pick, or for randomized playback. | |
| mutate | No | Extra random tweak amount on top of the seeded result, 0-1 (e.g. 0.15) | |
| preset | Yes | Preset id, see list_presets | |
| js_path | No | Also write a dependency-free .js file with play functions for these sounds (Web Audio, no audio files needed) | |
| out_path | Yes | WAV file to write, e.g. "assets/sfx/coin.wav". Relative paths resolve against the server working directory. With count > 1, files get -01, -02 ... suffixes. |