Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ar9av avatar

Audio Composer

  • 2 installs
  • 1 repo stars
  • Updated August 3, 2026
  • ar9av/game-exa

audio-composer is a game-build pipeline skill that generates SFX and looping music for a generated game, using ElevenLabs MP3s when a key is set and Web Audio oscillator synthesis otherwise.

About

This skill generates sound effects and looping background music for a generated 2D game. When ELEVENLABS_API_KEY is set it calls the ElevenLabs text-to-sound-effects API for real MP3s, otherwise it falls back to Web Audio oscillator synthesis at zero cost. A developer runs it in parallel with art generation stages to produce sfx.json, music.json, and an AudioManager.js that plays either source transparently.

  • Two-tier audio: ElevenLabs MP3s when a key is set, Web Audio oscillator synthesis as a zero-cost fallback
  • Produces sfx.json, music.json, and a fixed AudioManager.js runtime template
  • Genre presets set BPM and SFX key sets per game type

Audio Composer by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #214 of 247 Game Development skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

audio-composer capabilities & compatibility

Free in oscillator mode; ElevenLabs mode requires ELEVENLABS_API_KEY and incurs per-request cost.

Capabilities
tile artist · palette enforcer · audio generation
Use cases
orchestration
Pricing
Bring your own API key
From the docs

What audio-composer says it does

Generates genre-appropriate sound effects and looping background music for a generated game.
SKILL.md
real AI-generated MP3s** when `ELEVENLABS_API_KEY` is available, deterministic **chiptune oscillator synthesis** as a zero-cost fallback
SKILL.md
npx skills add https://github.com/ar9av/game-exa --skill audio-composer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars1
Last updatedAugust 3, 2026
Repositoryar9av/game-exa

What it does

Generate SFX and looping music for a generated 2D game, with an offline oscillator fallback.

Who is it for?

Adding sound and music to an AI-generated 2D Phaser-style game.

Skip if: Non-game apps or audio production outside a generated-game pipeline.

When should I use this skill?

Run in parallel with art stages after the GDD is finalized, or when the user says 'add sound', 'add music', or 'upgrade to ElevenLabs audio'.

What you get

sfx.json, music.json, and an AudioManager that plays MP3s or oscillator sounds transparently.

  • sfx.json
  • music.json
  • AudioManager.js

By the numbers

  • 5 genre presets in the BPM/SFX table
  • sequential ElevenLabs requests with retry on HTTP 429

Files

SKILL.mdMarkdownGitHub ↗

Audio Composer — SFX + Music

Two-tier audio system: real AI-generated MP3s when ELEVENLABS_API_KEY is available, deterministic chiptune oscillator synthesis as a zero-cost fallback. The same AudioManager.js handles both transparently — no code change needed in Game.js.

When to use

Run in parallel with the art generation stages (sprite-artist, tile-artist, bg-artist), after GDD is finalized. Also run on an existing game when the user says "add sound", "add music", or "upgrade to ElevenLabs audio."

Two modes

Mode A — ElevenLabs (when ELEVENLABS_API_KEY is set)

Calls POST https://api.elevenlabs.io/v1/sound-generation for each SFX action. Uses the eleven_text_to_sound_v2 model with a genre-flavoured text prompt (e.g. "2D action platformer game, retro 8-bit jump sound, quick upward pitch sweep"). Saves MP3s to public/assets/sfx/<name>.mp3. Adds mp3Path to each entry in sfx.json. AudioManager.js preloads all MP3s as AudioBuffers via decodeAudioData and plays them on demand.

Rate limit: requests are made sequentially with automatic retry on HTTP 429.

Mode B — Web Audio oscillator (no API key, or --no-elevenlabs)

Writes oscillator parameters (freq, dur, type, vol) to sfx.json. AudioManager.js generates sound at runtime using OscillatorNode — no audio files, no network calls, works offline.

Output contract

public/assets/sfx.json         — SFX descriptors (always written)
public/assets/music.json       — music loop: BPM + pentatonic note sequence
public/assets/sfx/<name>.mp3   — real audio files (Mode A only)
src/audio/AudioManager.js      — fixed runtime template (never regenerated)

game-state.json gains state.audio:

{
  "audio": {
    "sfxPath": "assets/sfx.json",
    "musicPath": "assets/music.json",
    "managerPath": "src/audio/AudioManager.js",
    "elevenlabs": true,       // true when Mode A ran
    "mp3Count": 6             // number of MP3s successfully generated
  }
}

sfx.json shape

Mode A (with MP3):

{
  "jump": { "freq": 380, "dur": 0.14, "type": "square", "vol": 0.22, "mp3Path": "assets/sfx/jump.mp3" }
}

Mode B (oscillator only):

{
  "jump": { "freq": 380, "dur": 0.14, "type": "square", "vol": 0.22 }
}

AudioManager.play('jump') checks for mp3Path first; if missing or load fails, falls back to the oscillator params. Per-sound graceful degradation — a failed ElevenLabs response for one SFX doesn't break the rest.

Genre presets

GenreBPMSFX keys
action-platformer / platformer130jump, land, hit, pickup, death, win
top-down-adventure / dungeon-crawler100hit, pickup, death, win
top-down-rpg88pickup, hit, win
shoot-em-up160shoot, explosion, hit, death, win
beat-em-up140hit, death, win

AudioManager usage (codesmith adds these)

import AudioManager from '../audio/AudioManager.js';

// In create():
AudioManager.init(this);        // registers Safari AudioContext unlock

// In event handlers / overlaps:
AudioManager.play('jump');      // plays MP3 if available, oscillator if not
AudioManager.play('pickup');
AudioManager.play('hit');
AudioManager.play('death');
AudioManager.play('win');
AudioManager.stopMusic();       // call on game-over

// Optional:
AudioManager.mute();
AudioManager.unmute();

Safari iOS compatibility

AudioManager.init(scene) registers one-shot pointerdown and keydown listeners that create and unlock the AudioContext on first interaction. MP3 buffers are decoded at that point. This satisfies Safari iOS's user-gesture requirement without any extra plumbing in Game.js.

Process

1. Read game-state.jsongdd.genre. 2. Run scripts/compose_audio.mjs <project-dir>.

  • If ELEVENLABS_API_KEY is set: generate MP3s, fallback per-sound on error.
  • Otherwise: oscillator-only mode.

3. Patch game-state.json with state.audio. 4. Codesmith reads state.audio and adds import AudioManager + AudioManager.init(this) to Game.js.

Scripts

  • scripts/compose_audio.mjs <project-dir> [--bpm N] [--no-elevenlabs]
  • --no-elevenlabs — force oscillator mode even if the key is set
  • --bpm N — override music tempo

Related skills

FAQ

What if I have no ElevenLabs key?

It falls back to Web Audio oscillator synthesis, which needs no audio files and no network calls and works offline.

Does it work on Safari iOS?

Yes, AudioManager.init registers one-shot listeners that unlock the AudioContext on first interaction to satisfy Safari iOS's user-gesture requirement.

Game Developmentfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.