Imported from akillness/jeo-skills (
.agent-skills/rfxgen/SKILL.md). Install upstream withnpx skills add akillness/jeo-skills --skill rfxgen. Copyright stays with the author.
rFXGen
When to use this skill
- Generate compact retro/chiptune sound effects from named presets.
- Tune and save
.rfxparameter files in the desktop UI. - Convert
.rfxinto.wav,.qoa,.raw, or C header data. - Batch sound generation or diagnose an rFXGen source build.
Route coding-agent notification packs to game-sounds. Route runtime event architecture and engine playback integration to an engine-specific audio skill after assets are generated.
Instructions
Step 1: Define the asset contract
Capture the gameplay event, preset family, output format, sample rate, sample size, channel count, duration/style constraints, loop behavior, naming, and runtime target. Start with one representative sound before generating a full kit.
Supported upstream generation presets at the inspected revision are:
coin laser explosion powerup hit jump blip
Supported format values are sample rates 22050|44100, sample sizes 8|16|32, and channels 1|2.
Step 2: Prefer an existing binary or online tool
bash .agent-skills/rfxgen/scripts/setup.sh --check
Use the official WebAssembly tool for quick interactive design when local installation is unnecessary. Build from source only when a reproducible CLI or code change is required.
bash .agent-skills/rfxgen/scripts/setup.sh --clone
bash .agent-skills/rfxgen/scripts/setup.sh --build
The upstream CMake project fetches raylib when it is not already available, so a build may require network access and platform development libraries.
Step 3: Generate through the validated wrapper
bash .agent-skills/rfxgen/scripts/generate.sh \
--preset explosion --output assets/sfx/explosion.wav \
--format 44100,16,1
The wrapper validates preset, extension, and format before invoking rfxgen. Set RFXGEN_BIN when the binary is not on PATH.
Step 4: Convert or export deliberately
The native CLI accepts .rfx and supported audio input with --input, and output in .wav, .qoa, .raw, or .h. Keep .rfx alongside exported audio when future tuning matters. Use .h only when embedding bytes is appropriate for the target build; otherwise prefer an external asset pipeline.
Step 5: Integrate as an event-driven kit
Name assets by abstract game event, not by implementation callsite. Keep loudness and frequency ranges distinct enough for rapid recognition. Test common overlap cases, repeated triggers, pause/resume, and low-volume playback.
Step 6: Verify observable output
For every generated asset:
- confirm the file exists and is non-empty;
- inspect sample rate, bit depth, and channels with
ffprobeor equivalent; - audition on target hardware;
- confirm no clipping and no unintended long tail;
- verify the game event triggers the right semantic sound;
- preserve attribution/license information when distributing source or modified rFXGen code.
Examples
Generate a mono jump sound
bash .agent-skills/rfxgen/scripts/generate.sh \
--preset jump --output jump.wav --format 22050,16,1
Convert tuned parameters
rfxgen --input tuned-hit.rfx --output tuned-hit.wav --format 44100,16,1
Best practices
- Design one sound per semantic gameplay event.
- Preserve
.rfxsources for iteration. - Use mono unless stereo carries intentional information.
- Audition repeated and overlapping playback, not just isolated files.
- Pin source builds and retain the zlib license notice.
References
references/cli-and-build.md— CLI matrix, build notes, and verification checklist.references/upstream.md— inspected revision and license.- rFXGen
- Official WebAssembly tool