> with volume/mute and effects, music vs SFX routing, db/linear volume, and precise sync-to-beat playback timing. Use when playing sounds or music in a Godot project, routing AudioStreamPlayer nodes to buses, adjusting bus volume via AudioServer, or syncing gameplay to the beat.
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill godot-audio
Play SFX and music, route them through buses, control volume in decibels, and time
gameplay to the beat. Targets Godot 4.3+.
adjusting volume/mute from code, adding bus effects (reverb, compressor), positional 3D
audio, or syncing events to music.
When *not* to use: engine-agnostic audio *design* (adaptive music structure, mixing
philosophy, ducking patterns) → audio-design; importing/encoding assets outside Godot.
AudioStreamPlayer — non-positional (music, UI, global SFX).AudioStreamPlayer2D / AudioStreamPlayer3D — positional; volume/pan from distance.AudioStream to stream (.ogg for music/loops, .wav for short SFX)and play(). Set autoplay for music that starts with the scene.
bus to a named bus (e.g. "Music", "SFX").Define buses in the Audio panel (bottom dock); each can have volume, mute, solo, and
effects.
0 dB = unchanged,-80 dB ≈ silent. Convert with linear_to_db/db_to_linear.
AudioServer by bus index.@onready var sfx: AudioStreamPlayer = $Sfx # stream assigned in the editor
func play_jump() -> void:
sfx.pitch_scale = randf_range(0.95, 1.05) # slight variation avoids fatigue
sfx.play()
# For many overlapping copies, use an AudioStreamPlayer with an
# AudioStreamPolyphonic stream, or spawn short-lived players and free on `finished`.
func set_music_volume(linear_0_to_1: float) -> void:
var bus := AudioServer.get_bus_index("Music")
# Convert a 0..1 slider to decibels; clamp avoids -inf at 0.
AudioServer.set_bus_volume_db(bus, linear_to_db(maxf(linear_0_to_1, 0.0001)))
func toggle_sfx(muted: bool) -> void:
AudioServer.set_bus_mute(AudioServer.get_bus_index("SFX"), muted)
@onready var a: AudioStreamPlayer = $MusicA
@onready var b: AudioStreamPlayer = $MusicB
func crossfade_to(stream: AudioStream, secs := 1.5) -> void:
b.stream = stream
b.volume_db = -40.0
b.play()
var tw := create_tween().set_parallel(true)
tw.tween_property(a, "volume_db", -40.0, secs) # fade out current
tw.tween_property(b, "volume_db", 0.0, secs) # fade in next
tw.chain().tween_callback(a.stop)
var tmp := a; a = b; b = tmp # swap roles
@onready var music: AudioStreamPlayer = $Music
func get_playback_time() -> float:
# Add time since the last audio mix, subtract output latency, for sub-frame accuracy.
var t := music.get_playback_position() + AudioServer.get_time_since_last_mix()
return t - AudioServer.get_output_latency()
volume_db/set_bus_volume_db are decibels. Settingvolume_db = 0.5 is nearly full volume, not half. Map sliders with linear_to_db.
linear_to_db(0.0) is -inf. Clamp the linear value to a small minimum (e.g.0.0001) before converting, or special-case 0 → mute.
get_bus_index("Muisc") returns -1; calls then erroror no-op. Match the exact bus name from the Audio panel.
AudioStreamPolyphonic, or AudioStreamPlayer per-shot freed on finished.
.ogg import has aLoop option; AudioStreamWAV has loop_mode).
get_playback_position() alone is jittery — it updates per audio mix,not per frame; add get_time_since_last_mix() and subtract get_output_latency().
AudioListener3D/Camera3D to hear it, or max_distance/attenuation too tight, or wrong bus muted.
.tres), adding effects (reverb/compressor/EQ) and side-chainducking, AudioStreamPolyphonic/AudioStreamInteractive, microphone capture, and
procedural audio with AudioStreamGenerator, read references/buses-and-effects.md.
audio-design — engine-agnostic adaptive music, mixing, and ducking practice.godot-animation — syncing animation/Tween to get_playback_position().godot-ui-control — volume sliders wired to AudioServer.Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Improves the quality of images, especially screenshots, by enhancing resolution, sharpness, and clarity. Perfect for preparing images for presentations, documentation, or social media posts.
Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
Microscopy data management platform. Access images via Python, retrieve datasets, analyze pixels, manage ROIs/annotations, batch processing, for high-content screening and microscopy workflows.
Python library for working with DICOM (Digital Imaging and Communications in Medicine) files. Use this skill when reading, writing, or modifying medical imaging data in DICOM format, extracting pixel data from medical images (CT, MRI, X-ray, ultrasound), anonymizing DICOM files, working with DICOM metadata and tags, converting DICOM images to other formats, handling compressed DICOM data, or processing medical imaging datasets. Applies to tasks involving medical image analysis, PACS systems, radiology workflows, and healthcare imaging applications.
This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets.
Take gamedev-skills/godot-audio from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.