Rfxgen

From akillness/jeo-skills · View interactive version

Rfxgen is an AI agent skill from the GitHub repository akillness/jeo-skills. Generate, convert, preview, and integrate retro game sound effects with raysan5/rfxgen. Use when a user needs coin, laser, explosion, power-up, hit, jump, or blip SFX; wants `.rfx` parameters converted to WAV/raw/C headers; needs batch CLI generation; or must build and troubleshoot rFXGen. Triggers

How to use this skill

Skill file

rFXGen

When to use this skill

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:

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

  1. Design one sound per semantic gameplay event.
  2. Preserve .rfx sources for iteration.
  3. Use mono unless stereo carries intentional information.
  4. Audition repeated and overlapping playback, not just isolated files.
  5. Pin source builds and retain the zlib license notice.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.