02900/ps3-homebrew-skills/psl1ght-audio
Claude Code and agent skill by 02900/ps3-homebrew-skills
- community
Checking that the SKILL.md file is still in the repository.
Audio on PS3 via MikMod. Use when adding music or sound effects to PS3 homebrew — MikMod plays tracker modules / PCM samples (NOT OGG/MP3); synthesize SFX in code or load samples from memory via an MREADER; hand-built WAVs must be little-endian (the PPU is big-endian); loop long music as a sample; and init defensively because a bad audio init can hang the console.
Install
npx vskill@latest install 02900/ps3-homebrew-skills/psl1ght-audioSKILL.md
Audio (MikMod)
MikMod plays tracker modules and samples (PCM) — it cannot decode OGG/MP3. Drive it with MikMod_Update() once per frame and reserve voices with MikMod_SetNumVoices(music, sfx) (sample playback needs sfx voices reserved).
raylib-on-PS3 has no working audio device. On the RSXGL/raylib stack, raylib'sInitAudioDevice/LoadSound/PlaySoundaren't linkable (undefined references — even fromdead code). MikMod, below, is the audio path for raylib ports too: embed the game's.wavsand load them withSample_LoadGenericvia an MREADER (see Load audio from memory).
Synthesize SFX in code — no assets needed
You can generate sound effects procedurally: build a PCM waveform with math (a decaying sine for a "thud", a falling sweep for a "pew", noise for an explosion), wrap it as a little-endian WAV in memory, and load it as a MikMod sample. Self-contained (no asset files), great for prototyping, placeholders, or a stylized retro feel.
noisef() is a tiny LCG mapped to −1..1. Vary frequency/decay/noise mix per effect. (Note: if you want to avoid the libm dependency for sinf/expf, a square wave via a manual phase wrap + linear envelope sounds fine and needs no math lib.)
Load audio from memory via an MREADER
MikMod's loaders (Sample_LoadGeneric, Player_LoadGeneric) take an `MREADER`, not a raw pointer. Implement a ~5-function in-memory reader over an embedded buffer (from bin2o) and pass &reader.core:
Embed the .wav with bin2o by naming the file *.bin in data/ (the Makefile's bin2o rule keys on extension; MikMod parses the RIFF header, not the filename).
Convert real assets to a clean canonical WAV first (strips odd chunks that loaders trip on), e.g. with ffmpeg:
Hand-built WAV bytes must be little-endian (PPU is big-endian) ⚠️
WAV is little-endian by spec. If you build a WAV yourself (e.g. for synthesized SFX), write the header fields and the int16 PCM as explicit LE bytes — a naive u32/s16 store is big-endian on the PPU and MikMod will misread it. (Real .wav files from ffmpeg are already LE, so this only bites hand-built buffers.)
Loop long music as a sample (the OGG/MP3 way)
Since MikMod can't play OGG/MP3 and a module would mean re-authoring, decode the track to PCM WAV on the host (ffmpeg) — or synthesize a melody — and play it as one long looping sample: set SF_LOOP + loopend, and play with SFX_CRITICAL so transient SFX voices can't steal it.
Init audio defensively — it can hang the console ⚠️
A bad audio init can freeze a PS3 (double-init is a known hang), and you can't hear it on the dev host. Guard every step; on any failure set an audio_ok = 0 flag and make all calls no-ops (degrade to silence). Isolate audio in its own file so it's easy to disable.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/psl1ght-audio/SKILL.md
Popularity
- Repository stars
- 3
- Repository forks
- 1
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/02900/ps3-homebrew-skills/psl1ght-audio)