audio-module

Play pooled SFX and crossfade dual-source music in Unity projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/punkfuncgames/tetris-clone --skill audio-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audio-module
Source: https://github.com/punkfuncgames/tetris-clone/tree/main/.claude/skills/audio-module
Command: npx skills add https://github.com/punkfuncgames/tetris-clone --skill audio-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes and simplifies audio management for Unity projects by providing deterministic SFX playback, configurable pooled playback, music playback with smooth crossfades, and reactive volume control so developers avoid scattered ad hoc audio logic across scenes and builds.

Core Features & Use Cases

  • SFX playback: positional and global sound effects with configurable pool sizes and pitch randomization for varied audio.
  • Music management: dual-source A/B music playback enabling seamless crossfades, async play/stop with loop support, and pause/resume behavior on game state changes.
  • Volume & mixer integration: master, music, and SFX reactive volume properties with dB conversion and programmatic setter/getter functions.
  • Event-driven integration: bridges MessagePipe events to audio actions and installs via a dependency-injection friendly installer for modular Unity UPM setups.
  • Use Case: play UI click SFX, spawn explosion sounds at positions, and crossfade into battle music when the game state changes.

Quick Start

Use the audio-module to play a sound effect and crossfade into background music in your Unity project.

Frequently Asked Questions about audio-module

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I crossfade background music in Unity between game states?

Music crossfading in Unity is handled using dual-source A/B playback, enabling seamless transitions between tracks. This approach supports async play/stop with loop functionality and pause/resume behavior during game state changes.

How do I play pooled SFX in Unity without audio glitches?

Pooled SFX playback in Unity uses configurable pool sizes to manage positional and global sound effects reliably. This system prevents audio glitches by reusing audio sources and supports pitch randomization for varied sound output.

How does Unity mixer volume control work with dB conversion?

Unity mixer volume control uses reactive properties for master, music, and SFX channels with dB conversion. Programmatic setter and getter functions translate linear volume values into decibels to configure the audio mixer levels.

Can I use MessagePipe events to trigger Unity audio playback?

MessagePipe events can bridge directly to audio actions in Unity to trigger SFX playback and music transitions. The system installs via a dependency-injection friendly installer for modular Unity UPM setups.

What is the best way to centralize Unity audio management for UI and ambient sounds?

Centralizing Unity audio management prevents scattered ad hoc logic by handling UI sounds, ambient audio, and explosions through a single module. It provides deterministic SFX playback and reactive volume control across scenes.

Do I need a specific Unity architecture to use modular audio packages?

A modular Unity UPM package architecture is required to use this audio system effectively. The dependency-injection friendly installer integrates pooled SFX playback and music crossfading into existing UPM workflows.