pluginagentmarketplace

audio-systems

6
0
# Install this skill:
npx skills add pluginagentmarketplace/custom-plugin-game-developer --skill "audio-systems"

Install specific skill from multi-skill repository

# Description

|

# SKILL.md


name: audio-systems
version: "2.0.0"
description: |
Game audio systems, music, spatial audio, sound effects, and voice implementation.
Build immersive audio experiences with professional middleware integration.
sasmp_version: "1.3.0"
bonded_agent: 04-audio-sound-design
bond_type: PRIMARY_BOND

parameters:
- name: middleware
type: string
required: false
validation:
enum: [wwise, fmod, unity_audio, unreal_audio, custom]
- name: audio_type
type: string
required: false
validation:
enum: [sfx, music, voice, ambient, ui]

retry_policy:
enabled: true
max_attempts: 3
backoff: exponential

observability:
log_events: [start, complete, error]
metrics: [active_voices, cpu_usage, memory_usage]


Audio & Sound Systems

Audio Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GAME AUDIO PIPELINE                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  SOURCES: SFX | Music | Voice | Ambient                     β”‚
β”‚                         ↓                                    β”‚
β”‚  MIDDLEWARE: Wwise / FMOD / Engine Audio                    β”‚
β”‚                         ↓                                    β”‚
β”‚  PROCESSING: 3D Spatial | Reverb | EQ | Compression         β”‚
β”‚                         ↓                                    β”‚
β”‚  MIXING: Master β†’ Submixes β†’ Individual Tracks              β”‚
β”‚                         ↓                                    β”‚
β”‚  OUTPUT: Speakers / Headphones (Stereo/Surround/Binaural)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Audio Programming

Unity Audio Manager

// βœ… Production-Ready: Audio Manager
public class AudioManager : MonoBehaviour
{
    public static AudioManager Instance { get; private set; }

    [System.Serializable]
    public class SoundBank
    {
        public string id;
        public AudioClip[] clips;
        [Range(0f, 1f)] public float volume = 1f;
        [Range(0.1f, 3f)] public float pitchVariation = 0.1f;
    }

    [SerializeField] private SoundBank[] _soundBanks;
    [SerializeField] private int _poolSize = 20;

    private Dictionary<string, SoundBank> _bankLookup;
    private Queue<AudioSource> _sourcePool;

    private void Awake()
    {
        if (Instance != null) { Destroy(gameObject); return; }
        Instance = this;
        DontDestroyOnLoad(gameObject);

        InitializePool();
        BuildLookup();
    }

    public void PlaySound(string id, Vector3 position)
    {
        if (!_bankLookup.TryGetValue(id, out var bank)) return;
        if (bank.clips.Length == 0) return;

        var source = GetPooledSource();
        source.transform.position = position;
        source.clip = bank.clips[Random.Range(0, bank.clips.Length)];
        source.volume = bank.volume;
        source.pitch = 1f + Random.Range(-bank.pitchVariation, bank.pitchVariation);
        source.Play();

        StartCoroutine(ReturnToPool(source, source.clip.length));
    }

    private AudioSource GetPooledSource()
    {
        if (_sourcePool.Count > 0) return _sourcePool.Dequeue();
        return CreateNewSource();
    }

    private void InitializePool() { /* ... */ }
    private void BuildLookup() { /* ... */ }
    private AudioSource CreateNewSource() { /* ... */ }
    private IEnumerator ReturnToPool(AudioSource s, float delay) { /* ... */ }
}

FMOD Integration

// βœ… Production-Ready: FMOD Event Player
public class FMODEventPlayer : MonoBehaviour
{
    [SerializeField] private FMODUnity.EventReference _eventRef;

    private FMOD.Studio.EventInstance _instance;
    private bool _isPlaying;

    public void Play()
    {
        if (_isPlaying) Stop();

        _instance = FMODUnity.RuntimeManager.CreateInstance(_eventRef);
        _instance.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(transform));
        _instance.start();
        _isPlaying = true;
    }

    public void SetParameter(string name, float value)
    {
        if (_isPlaying)
            _instance.setParameterByName(name, value);
    }

    public void Stop(bool allowFadeout = true)
    {
        if (!_isPlaying) return;

        _instance.stop(allowFadeout
            ? FMOD.Studio.STOP_MODE.ALLOWFADEOUT
            : FMOD.Studio.STOP_MODE.IMMEDIATE);
        _instance.release();
        _isPlaying = false;
    }

    private void OnDestroy() => Stop(false);
}

Spatial Audio

3D AUDIO CONFIGURATION:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ATTENUATION CURVES:                                         β”‚
β”‚                                                              β”‚
β”‚  Volume β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                                       β”‚
β”‚         β”‚            β–ˆβ–ˆβ–ˆβ–ˆ                                   β”‚
β”‚         β”‚                β–ˆβ–ˆβ–ˆβ–ˆ                               β”‚
β”‚         β”‚                    β–ˆβ–ˆβ–ˆβ–ˆ                           β”‚
β”‚         └──────────────────────────→ Distance               β”‚
β”‚         0m     10m    30m    50m                            β”‚
β”‚                                                              β”‚
β”‚  Min Distance: 1m (full volume)                             β”‚
β”‚  Max Distance: 50m (inaudible)                              β”‚
β”‚  Rolloff: Logarithmic (realistic)                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Music Systems

Adaptive Music State Machine

MUSIC STATE TRANSITIONS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                              β”‚
β”‚   [EXPLORATION] ←──────────→ [TENSION]                      β”‚
β”‚        β”‚                        β”‚                           β”‚
β”‚        ↓                        ↓                           β”‚
β”‚   [DISCOVERY]              [COMBAT]                         β”‚
β”‚                                 β”‚                           β”‚
β”‚                                 ↓                           β”‚
β”‚                            [VICTORY] / [DEFEAT]             β”‚
β”‚                                                              β”‚
β”‚  Transition Rules:                                           β”‚
β”‚  β€’ Crossfade on beat boundaries                             β”‚
β”‚  β€’ 2-4 bar transition windows                               β”‚
β”‚  β€’ Intensity parameter controls layers                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Mixing Guidelines

Bus Content Target Level
Master Final mix -3dB peak
Music BGM, Stingers -12dB to -6dB
SFX Gameplay sounds -6dB to 0dB
Voice Dialogue, VO -6dB to -3dB
Ambient Environment -18dB to -12dB

πŸ”§ Troubleshooting

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Audio popping/clicking                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Add fade in/out (5-10ms)                                  β”‚
β”‚ β†’ Check sample rate mismatches                              β”‚
β”‚ β†’ Increase audio buffer size                                β”‚
β”‚ β†’ Use audio source pooling                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Too many simultaneous sounds                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Implement voice limiting per category                     β”‚
β”‚ β†’ Priority system (important sounds steal)                  β”‚
β”‚ β†’ Distance-based culling                                    β”‚
β”‚ β†’ Virtual voices (middleware feature)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Music transitions are jarring                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Align transitions to musical bars                         β”‚
β”‚ β†’ Use crossfades (1-4 seconds)                              β”‚
β”‚ β†’ Prepare transition stingers                               β”‚
β”‚ β†’ Match keys between sections                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Optimization

Platform Max Voices Compression Streaming
Mobile 16-32 High (Vorbis) Required
Console 64-128 Medium Large files
PC 128-256 Low Optional

Use this skill: When implementing audio, designing sound, or composing music.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.