SFX Brew

v0.4.0
com.sfxbrew/sfxbrew Checked 17 hours ago Published 4 days ago

Game 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.

ParameterTypeDescription
categorystringOnly presets in this category
querystringWords 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…

ParameterTypeDescription
out_path *stringWAV 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 *stringPreset id, see list_presets
countintegerNumber of variants to write (default 1). Useful to let the user pick, or for randomized playback.
js_pathstringAlso write a dependency-free .js file with play functions for these sounds (Web Audio, no audio files needed)
loop_secondsnumberWrite 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…
mutatenumberExtra random tweak amount on top of the seeded result, 0-1 (e.g. 0.15)
seedintegerSeed 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…

ParameterTypeDescription
out_path *stringWAV file to write
patch *objectPatch JSON object with a "layers" array
js_pathstringAlso write a .js file with a play function for this sound
namestringName 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}.

ParameterTypeDescription
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.

ParameterTypeDescription
out_dir *stringDirectory to create the sfxbrew-<preset> folder in, e.g. "." for a Godot project root or "Assets/Audio" for Unity
preset *stringPreset id, see list_presets
countintegerNumber of variations (default 8) or loops (default 2, max 6)
loop_secondsnumberMake seamless loops of about this many seconds. Only for: rain, wind, campfire, stream, drum, caveDrip, thunder, chime, monsterGrowl
seedintegerSeed 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…

ParameterTypeDescription
out_path *stringWAV file to write, e.g. "assets/music/town.wav". With count > 1, files get -01, -02 ... suffixes.
arcstringDynamic energy curve across sections: steady (even), build (gradual rise), drop (punchy start + breakdown), wave (gentle rise and fall)
chord_moodstringChord progression mood
chordsarrayCustom chord progression by chord names, e.g. ["Am", "F", "C", "G"] or ["Dm7", "G7", "Cmaj7", "A7"]
countintegerNumber of different pieces (default 1)
groovestringFreeform rhythm groove independent of mood
hook_onlybooleanStart directly at the chorus/hook (8 bars, ideal for 15-30s short videos)
instrumentsobjectOverride or disable SoundFont instruments per role (melody, counter, pad, accomp, bass, drums), e.g. {"melody": "koto", "counter": "flute", "drums": null}
intensityarrayCustom energy level (0.2-1.0) per section, e.g. [0.7, 0.85, 0.65, 0.92]
meterTime signature beats per bar (3 or 4)
moodstringMusic style for a loop
promptstringNatural language description in Chinese or English (e.g. "B站科技评测,直接高潮30秒" or "治愈系Vlog,三拍子,钢琴和木吉他,不要鼓")
scalestringMusical scale for freeform composition
seedintegerSeed for a reproducible piece; piece i uses seed + i
stems_dirstringDirectory to write individual track stem WAVs (melody.wav, pad.wav, accomp.wav, bass.wav, drums.wav) when using SoundFont moods or tracks
stingerstringRender this short stinger instead of a loop
structurearrayCustom section order (4 bars per section), e.g. ["intro", "A", "breakdown", "C", "outro"]
temponumberCustom BPM tempo
tracksarrayCustom 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…

ParameterTypeDescription
inputs *arrayAudio files and/or folders (folders: all audio files inside)
out_dir *stringFolder to write results into, e.g. "assets/sfx". Must not be where the inputs are if names would collide.
bitsWAV bit depth (default 16)
channels1 = mono, 2 = stereo (default: keep)
fade_in_msnumber
fade_out_msnumber
formatstringOutput format (default wav)
limitbooleanUse 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)
loopbooleanMark outputs as loops (WAV smpl loop point, read by Godot, FMOD, Wwise, GameMaker)
loop_crossfade_msnumberMake a loop seamless by crossfading its tail into its head (implies loop). 200-1000 ms for ambience
lufsnumberTarget loudness for every clip, e.g. -18
min_silencenumberSeconds of silence that separate two clips when slicing (default 0.15)
namestringRename outputs to name-01, name-02 ... (in input order)
overwritebooleanReplace existing files in out_dir (default false)
peak_dbnumberPeak ceiling in dBFS (default -1)
recursivebooleanAlso look into sub-folders
sample_rateintegerDefault 44100
slicebooleanSplit each file at silences into separate clips (e.g. a recording of 10 footsteps)
spritestringJoin all clips into one audio sprite <sprite>.<format> plus <sprite>.json with start/duration of each clip
threshold_dbnumberLevel below which audio counts as silence (default -50)
trimbooleanCut 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.

ParameterTypeDescription
inputs *arrayAudio files and/or folders
recursiveboolean

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: 突ç …

ParameterTypeDescription
out_dir *stringFolder to write into, e.g. "assets/fx"; files go to <out_dir>/sfxbrew-vfx-<name>/
effectstringPreset name (swordQi, spell, hit, lightning, talisman, breakthrough, explosion, aura); with a patch it is just the file name
framesintegerNumber of frames (duration stays the same)
mutatenumber0-1: each variation also randomly tweaks the numeric layer parameters by this much (bigger differences than a new seed)
paletteColour theme name or 4 colours [core, light, mid, dark]; overrides the effect's own colours
patchobjectYour own effect: { "frames": 12, "fps": 24, "loop": false, "palette": "fire", "layers": [ { "type": "flash" }, { "type": "sparks", "count": 20 } ] }. See list_vfx_layers.
previewbooleanReturn the preview image in the result (default true)
scaleintegerPixel style only: enlarge by this factor with hard edges
seedintegerSeed for a reproducible result; variant i uses seed + i
sizeintegerFrame width/height in px
speednumberPlayback speed multiplier (changes fps)
stylestringhd = smooth glow (default 128 px), pixel = pixel art (default 48 px, 5 colours, hard edges)
variantsintegerNumber of variations; the Godot scene picks one at random each play
with_soundtrue = add the paired sound (the preset's own, or patch.sound); or a sound preset id