SFX Brew
v0.4.0Game SFX, music, audio cleanup and engine-ready 2D effects for AI agents, rendered locally.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
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.
| Parameter | Type | Description |
|---|---|---|
category | string | Only presets in this category |
query | string | Words that must all match the name, description, keywords or tags |
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, shield…
| Parameter | Type | Description |
|---|---|---|
out_path * | string | 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. |
preset * | string | Preset id, see list_presets |
count | integer | Number of variants to write (default 1). Useful to let the user pick, or for randomized playback. |
js_path | string | Also write a dependency-free .js file with play functions for these sounds (Web Audio, no audio files needed) |
loop_seconds | number | Write a seamless loop of about this many seconds instead of a one-shot (the WAV carries a loop point). Only for loopable presets: rain, wind, campfire, stream, drum, caveDrip, thunder, chime, monsterG… |
mutate | number | Extra random tweak amount on top of the seeded result, 0-1 (e.g. 0.15) |
seed | integer | Seed for a reproducible result; variant i uses seed + i |
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], ...] (ma…
| Parameter | Type | Description |
|---|---|---|
out_path * | string | WAV file to write |
patch * | object | Patch JSON object with a "layers" array |
js_path | string | Also write a .js file with a play function for this sound |
name | string | Name used for the JS play function (default: file name) |
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}.
| Parameter | Type | Description |
|---|---|---|
sounds * | array |
export_pack Export a game-engine sound pack
Write a ready-to-use folder for game engines: several WAV variations of one preset (or several seamless loops), a Godot 4 AudioStreamRandomizer (.tres, plays a random variation each time), a Unity SfxBrewPlayer.cs component, a plain Web Audio .js player and a README. Loop WAVs carry a loop point that Godot, FMOD, Wwise and GameMaker read. Writes <out_dir>/sfxbrew-<preset>/. For Godot, out_dir should be the project root (res://) so the .tres paths resolve.
| Parameter | Type | Description |
|---|---|---|
out_dir * | string | Directory to create the sfxbrew-<preset> folder in, e.g. "." for a Godot project root or "Assets/Audio" for Unity |
preset * | string | Preset id, see list_presets |
count | integer | Number of variations (default 8) or loops (default 2, max 6) |
loop_seconds | number | Make seamless loops of about this many seconds. Only for: rain, wind, campfire, stream, drum, caveDrip, thunder, chime, monsterGrowl |
seed | integer | Seed for reproducible results; variation i uses seed + i |
generate_music Compose a music loop
Compose and render background music locally as a seamless stereo WAV loop (the WAV carries a loop point; one full piece with intro, themes and outro, about 1-2 minutes). Every seed is a different piece in the same style. Moods: calm (Calm Eastern piece: guqin and bamboo flute over strings. Exploration, villages, menus.); battle (Eastern battle music: pipa, spiccato low strings and big war drums. Combat, bosses.); mystery (Sparse, misty Eastern piece: flute and guqin over held strings, wooden fish. Caves, ruins, night.); sad (Slow erhu lament over strings and guqin. Loss, farewells, sad story b…
| Parameter | Type | Description |
|---|---|---|
out_path * | string | WAV file to write, e.g. "assets/music/town.wav". With count > 1, files get -01, -02 ... suffixes. |
arc | string | Dynamic energy curve across sections: steady (even), build (gradual rise), drop (punchy start + breakdown), wave (gentle rise and fall) |
chord_mood | string | Chord progression mood |
chords | array | Custom chord progression by chord names, e.g. ["Am", "F", "C", "G"] or ["Dm7", "G7", "Cmaj7", "A7"] |
count | integer | Number of different pieces (default 1) |
groove | string | Freeform rhythm groove independent of mood |
hook_only | boolean | Start directly at the chorus/hook (8 bars, ideal for 15-30s short videos) |
instruments | object | Override or disable SoundFont instruments per role (melody, counter, pad, accomp, bass, drums), e.g. {"melody": "koto", "counter": "flute", "drums": null} |
intensity | array | Custom energy level (0.2-1.0) per section, e.g. [0.7, 0.85, 0.65, 0.92] |
meter | Time signature beats per bar (3 or 4) | |
mood | string | Music style for a loop |
prompt | string | Natural language description in Chinese or English (e.g. "B站科技评测,直接高潮30秒" or "治愈系Vlog,三拍子,钢琴和木吉他,不要鼓") |
scale | string | Musical scale for freeform composition |
seed | integer | Seed for a reproducible piece; piece i uses seed + i |
stems_dir | string | Directory to write individual track stem WAVs (melody.wav, pad.wav, accomp.wav, bass.wav, drums.wav) when using SoundFont moods or tracks |
stinger | string | Render this short stinger instead of a loop |
structure | array | Custom section order (4 bars per section), e.g. ["intro", "A", "breakdown", "C", "outro"] |
tempo | number | Custom BPM tempo |
tracks | array | Custom multi-track MIDI note array for SoundFont rendering |
process_audio Process audio files for a game
Clean up ANY audio files (WAV, MP3, OGG, FLAC; recordings, downloads or generated sounds) so they are game-ready, in one pass: consistent loudness (integrated LUFS, BS.1770) with a peak ceiling and optional limiter, trim silence, split a file at silences into clips, fades, seamless loops (crossfade + WAV loop point), channel/sample-rate conversion, renaming to name-01, name-02 ..., WAV/MP3/OGG output, or one audio sprite file + JSON map (Howler.js format). Inputs are never overwritten. Returns before/after loudness, peak and length per clip. Typical targets: about -20 LUFS with limit true for…
| Parameter | Type | Description |
|---|---|---|
inputs * | array | Audio files and/or folders (folders: all audio files inside) |
out_dir * | string | Folder to write results into, e.g. "assets/sfx". Must not be where the inputs are if names would collide. |
bits | WAV bit depth (default 16) | |
channels | 1 = mono, 2 = stereo (default: keep) | |
fade_in_ms | number | |
fade_out_ms | number | |
format | string | Output format (default wav) |
limit | boolean | Use a peak limiter so the target is reached even for spiky sounds (default false: gain stops at the peak ceiling and the result says how far short) |
loop | boolean | Mark outputs as loops (WAV smpl loop point, read by Godot, FMOD, Wwise, GameMaker) |
loop_crossfade_ms | number | Make a loop seamless by crossfading its tail into its head (implies loop). 200-1000 ms for ambience |
lufs | number | Target loudness for every clip, e.g. -18 |
min_silence | number | Seconds of silence that separate two clips when slicing (default 0.15) |
name | string | Rename outputs to name-01, name-02 ... (in input order) |
overwrite | boolean | Replace existing files in out_dir (default false) |
peak_db | number | Peak ceiling in dBFS (default -1) |
recursive | boolean | Also look into sub-folders |
sample_rate | integer | Default 44100 |
slice | boolean | Split each file at silences into separate clips (e.g. a recording of 10 footsteps) |
sprite | string | Join all clips into one audio sprite <sprite>.<format> plus <sprite>.json with start/duration of each clip |
threshold_db | number | Level below which audio counts as silence (default -50) |
trim | boolean | Cut silence at start and end |
analyze_audio Measure audio files
Measure audio files (WAV, MP3, OGG, FLAC): integrated loudness (LUFS), peak (dBFS), length, sample rate, channels, silence at start and end, clipped samples. Use it to find sounds that are too loud, too quiet or padded with silence before calling process_audio.
| Parameter | Type | Description |
|---|---|---|
inputs * | array | Audio files and/or folders |
recursive | boolean |
list_vfx_layers List 2D effect layers
Everything needed to write your own effect for generate_vfx: the coordinate system, the patch fields, the parameters shared by every layer, each layer type (flash, ring, glint, beam, slash, bolt, trail, burst, sparks, swirl, smoke, debris, sigil, shape) with its parameters, ranges and defaults, the colour palettes, and the built-in presets as example patches. Read it once before writing a patch.
generate_vfx Generate a 2D effect (sprite sheet)
Render a 2D visual effect as transparent PNG frames and write a ready-to-use folder: a sprite sheet (<name>_strip<N>.png, GameMaker auto-slices it), single frames, a TexturePacker-format atlas JSON (Phaser load.atlas, PixiJS Assets.load), Godot 4 SpriteFrames .tres plus a .tscn scene that plays the effect and its sound (one-shots free themselves, loops keep playing), the patch JSON, and a README with Unity/Phaser/Pixi/GameMaker steps. Either pick a preset (swordQi: 剑气 Sword qi; spell: 法术 Spell; hit: 击中 Hit; lightning: 雷电 Lightning; talisman: 符箓 Talisman; breakthrough: 突ç …
| Parameter | Type | Description |
|---|---|---|
out_dir * | string | Folder to write into, e.g. "assets/fx"; files go to <out_dir>/sfxbrew-vfx-<name>/ |
effect | string | Preset name (swordQi, spell, hit, lightning, talisman, breakthrough, explosion, aura); with a patch it is just the file name |
frames | integer | Number of frames (duration stays the same) |
mutate | number | 0-1: each variation also randomly tweaks the numeric layer parameters by this much (bigger differences than a new seed) |
palette | Colour theme name or 4 colours [core, light, mid, dark]; overrides the effect's own colours | |
patch | object | Your own effect: { "frames": 12, "fps": 24, "loop": false, "palette": "fire", "layers": [ { "type": "flash" }, { "type": "sparks", "count": 20 } ] }. See list_vfx_layers. |
preview | boolean | Return the preview image in the result (default true) |
scale | integer | Pixel style only: enlarge by this factor with hard edges |
seed | integer | Seed for a reproducible result; variant i uses seed + i |
size | integer | Frame width/height in px |
speed | number | Playback speed multiplier (changes fps) |
style | string | hd = smooth glow (default 128 px), pixel = pixel art (default 48 px, 5 colours, hard edges) |
variants | integer | Number of variations; the Godot scene picks one at random each play |
with_sound | true = add the paired sound (the preset's own, or patch.sound); or a sound preset id |