list_presets
List sound presets
List the procedural sound effect presets (Eastern wuxia/xianxia sounds and general game sounds) with category, tags and what each is good for. Optionally filter by category (combat, magic, instrument, ui, items, character, ambience, creature) or a search query such as "metal", "calm" or "sword". Every call to generate_sfx with a preset gives a new random variation; pass a seed to reproduce one.
輸入參數querycategory
generate_sfx
Generate sound effect WAV files
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.
輸入參數seedcountmutatepreset必填js_pathout_path必填
render_patch
Render a custom sound patch
Render a hand-edited patch (for example one returned by generate_sfx with changed values) to a WAV file.
A patch is JSON: { layers: Layer[1..6], reverb 0-1, echo 0-0.9, echoTime s, drive 0-1, crush 0|1-16 bits, gain 0-1 }.
Layer fields (all optional, defaults in brackets):
type: "tone"|"fm"|"string"|"pluck"|"bell"|"noise" ["tone"]; wave: "sine"|"triangle"|"square"|"sawtooth" (tone/fm/pluck)
string: physically modelled plucked string (Karplus-Strong); bright 0-1 [0.5] = darker (guqin) to brighter (pipa); decay = ring time
bell: partials = [[ratio, amplitude, decayMultiplier 0-1], ...] (max 16) for custom bells, gongs, wood blocks; default is a metal bar
sample: a CC0 recording; sample = one of drum-center-loud, drum-center-soft, drum-edge-loud, drum-rim, lightning-1, lightning-2, gong-1, gong-2, erhu-d3, erhu-f5, sword-clash, footstep-stone, arrow, footstep-grass, land, shield-block, page-turn, typewriter, chest-open, monster-growl, campfire, stream; pitch / pitchEnd semitones (slide over slideTime); offset s into the recording;
set hold ≈ recording length to let it ring naturally (lengths s: drum-center-loud 2.7, drum-center-soft 2.7, drum-edge-loud 3.5, drum-rim 1.8, lightning-1 6.5, lightning-2 7, gong-1 10, gong-2 12, erhu-d3 4.9, erhu-f5 6, sword-clash 7.2, footstep-stone 5.4, arrow 4, footstep-grass 3.2, land 2.1, shield-block 3.6, page-turn 8.75, typewriter 4.55, chest-open 11.1, monster-growl 12.8, campfire 10.4, stream 10.4)
freq, freqEnd: Hz, pitch slides exponentially from freq to freqEnd; slideTime: s the slide takes (0 = whole sound)
hold: s to stay at full volume before the decay starts (louder, more violent bodies)
repAccel: gap multiplier per repeat (<1 speeds up, e.g. 0.86 for an accelerating drum build-up); repGain: loudness multiplier per repeat (>1 crescendo)
freqPeak / cutoffPeak (Hz, 0 = off): go up to this value by the end of attack, then down to freqEnd / cutoffEnd (Doppler-like pass-by for swishes)
start: s delay;
輸入參數namepatch必填js_pathout_path必填
get_js_code
Get drop-in JavaScript for sounds
Return one self-contained JavaScript snippet (Web Audio, ~7 KB, no dependencies, no audio files) that defines play functions for several sounds. Best for browser games: paste it in and call e.g. playCoin() after a user gesture. Each sound is either {name, preset, seed} or {name, patch}.
輸入參數sounds必填