/godot-dev:godot-audiofrom godot-dev
Provides guidance on Godot audio: AudioStreamPlayer in 2D/3D, bus layouts, effects, music loops/transitions, import settings, and troubleshooting silent/late/clipping sound.
Ships in godot-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Every sound plays through a player on a bus; the bus layout is a resource the project names. Headless runs use the Dummy audio driver: nothing is heard, but the mix still runs, so routing, levels, clipping and ducking can be measured.
| The situation | Read |
|---|---|
| Setting up sound for a game: which player, which bus | Players and The bus layout below |
| Silent, late or clipping sound | reference/buses.md §6, then scripts/bus_meter.py |
| Bus volumes, settings sliders, the dB maths | reference/buses.md §2 |
| A misspelt bus, a send to nowhere, a muted or soloed bus | reference/buses.md §3 |
| Limiter, compressor, ducking music under dialogue, filters | reference/buses.md §4 |
| What headless can and cannot prove about audio | reference/buses.md §5 |
| Import settings for WAV, Ogg Vorbis, MP3; a track that will not loop | reference/import.md |
| Music across scenes, crossfades, music in the pause menu | reference/music.md §1-3 · resources/music_player.gd |
| Calm-to-chase music, transitions on the bar | reference/music.md §4 |
| Many short sounds: pooling, polyphony, the same sound ten times in a frame | Players below · resources/sound_bank.gd |
| Generating the music and sound effects themselves | comfyui-asset-generation |
| Which gameplay event plays which sound | godot-gameplay |
| Node | For | Key properties |
|---|---|---|
AudioStreamPlayer | music, UI, anything heard the same everywhere | stream, bus, volume_db, pitch_scale, max_polyphony |
AudioStreamPlayer2D | a sound from a place in a 2D world: the gate, a sentry | max_distance (px), attenuation, panning_strength; heard from the current Camera2D or an AudioListener2D |
AudioStreamPlayer3D | the same in 3D | unit_size, max_distance, attenuation_model, max_db; heard from the current camera or an AudioListener3D |
max_polyphony is 1 by default: a second play() on the same player cuts the first. Raise it
for a sound that overlaps itself, or use a pool.max_distance is silent: headless, 2500 px from the camera with the default
2000 its level reads -200 dB; at 500 px it is panned, about 8 dB down on the far side.play() starts from 0 each call: never call it every frame.resources/sound_bank.gd is a pool for non-positional sounds: one bus, a fixed number of
voices, voice stealing (the oldest is cut), at most max_per_frame starts of one sound per
frame, a little pitch jitter:const SoundBank = preload("res://audio/sound_bank.gd")
var sfx := SoundBank.new()
func _ready() -> void:
add_child(sfx)
sfx.register(&"parcel", preload("res://sfx/parcel.wav"), -3.0)
sfx.register(&"gate_open", preload("res://sfx/gate_open.wav"))
func _on_parcel_picked() -> void:
sfx.play(&"parcel")
templates/default_bus_layout.tres, copied to res://default_bus_layout.tres (the default of
audio/buses/default_bus_layout), loads at start-up:
| Bus | Send | Effects | For |
|---|---|---|---|
| Master | — | AudioEffectHardLimiter, ceiling -1 dBFS | the sum never clips |
| Music | Master | AudioEffectCompressor, sidechain Voice | -6 dB; ducks under dialogue |
| SFX | Master | — | game sounds, sound_bank.gd |
| UI | Master | — | menu sounds |
| Voice | Master | — | dialogue, callouts |
Rules that keep it working:
bus property reads back "Master"; a bus that sends to a missing bus also lands on
Master. Both escape their volume sliders without an error.AudioServer.set_bus_volume_linear), not dB.resources/music_player.gd: equal-power crossfades, no restart of the track already
playing, AudioStreamInteractive clip switches).loop=true for Ogg and MP3, edit/loop_mode for WAV.python3 scripts/bus_meter.py --project game --duck Music:Voice --tone-db -6
It loads the project's layout, plays a test tone on each bus alone and then on all of them, and
reads the bus meters, which the Dummy driver keeps live: each bus's route and gain to Master, the
full mix's peak, how far Voice ducks Music. It fails (exit 2) on a bus whose tone never reaches
Master or reaches it 60 dB or more down (with the reason: muted, at -80 dB, another soloed), a
send to a missing bus, a full mix over 0 dBFS, ducking under --duck-min dB, a literal bus name
(bus = &"SFX", var bus: StringName = &"SFX") in any scene, resource or script that the layout
lacks, and any ERROR: or WARNING: line the run prints; exit 3 when nothing was verified (no Godot, a
timeout, no sentinel), 1 a usage error. --allow-silent BUS exempts a bus meant to be silent.
What no headless run can tell: what reaches the speakers, the output latency, the OS mixer, a click at a loop seam, whether the mix sounds right. Those need a person listening.
scripts/bus_meter.py --selftest (needs GODOT_BIN) measures the template (every bus reaches
Master, Music at -6.00 dB, the limiter holds four hot buses at -1.00 dBFS, Voice ducks Music and
does not duck SFX), fails broken layouts on each fault (muted, soloed, -80 dB, a missing send,
clipping, misspelt names in a scene and a script), and exercises sound_bank.gd (the per-frame
cap, the pool, stealing the oldest voice, voices pausing with the tree, stop_all) and
music_player.gd (an equal-power fade at 0.707 and 0.707 half way, faded, no restart, a
fade-out, playing on under a paused tree, switch_clip on an AudioStreamInteractive).
AudioStreamPlayer
added in a scene is the one with the misspelt bus.parcel, gate_open, gate_pass), the same strings the game's
events use, so a log line and a sound match.| Need | Skill |
|---|---|
| Generating music, stingers and sound effects | comfyui-asset-generation |
| Which events a game raises, and where sounds hook in | godot-gameplay |
| Pausing, scene changes and the autoload that can hold the music player | godot-scene-flow |
| Running Godot headless and trusting the result | godot-verify |
reference/buses.md (opens in a new tab)reference/import.md (opens in a new tab)reference/music.md (opens in a new tab)resources/music_player.gd (opens in a new tab)resources/sound_bank.gd (opens in a new tab)scripts/bus_meter.py (opens in a new tab)templates/default_bus_layout.tres (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tipoli5890/game-studio --plugin godot-dev28 skills in this plugin
/godot-2d-controllerMove a 2D character in Godot: CharacterBody2D jump, coyote time, jump buffer, slopes, one-way and moving platforms, top-down movement./godot-2d-renderingGodot 2D look: draw order, z_index and y-sort, CanvasLayer, 2D lights and shadows, canvas shaders, Parallax2D, pixel-perfect scaling./godot-2d-rigA layered 2D character into Godot: rig2d.json to Skeleton2D, Bone2D and weighted Polygon2D parts, cut-out animation, 2D IK.