agentleFS
EL4CTEOEL4CTEO/godot-skills/skills/godot-audio/SKILL.md

godot-audio

Skill54 starsChanged 14 days agoMITView on GitHub

Audio in Godot 4.7 - bus layout and effects, volume in linear vs dB, SFX players with polyphony and randomization, 3D positional audio (attenuation, doppler, Area reverb buses), adaptive music with AudioStreamInteractive/Synchronized/Playlist, procedural audio and capture, import/loop settings, web playback type. Use for sound effects, music systems, mixers or audio settings menus.

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use godot-multiplayer, godot-2d-movement and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • gosomeaSkill

    godot-multiplayer

    设计 Godot 高层多人游戏:authority、RPC、MultiplayerSpawner/Synchronizer、状态复制、延迟与安全边界。

    Also in 5 projects that use this

  • gosomeaSkill

    godot-2d-movement

    实现 Godot 4.7 的 CharacterBody2D 移动:速度、重力、跳跃、斜坡、coyote time 与输入反馈。制作 2D 玩家控制时使用。

    Also in 3 projects that use this

  • arjun988Skill

    godot-export

    Godot-specific Blender export favoring GLTF/GLB with correct scale, materials, animation clips, and collision shapes via MCP.

    Also in 3 projects that use this

  • +4 more from gosomea

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep music on its own player under the Music bus.

    line 31
  2. Very specific:

    Use Ogg Vorbis for music and long ambience (streamed) and WAV for short SFX (low latency).

    line 34

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Audio (4.7)

Headless runs use the Dummy audio driver, so code paths execute but nothing is heard. Ask the user to listen.

Bus layout (default_bus_layout.tres)

Master ← Music, SFX (← UI, Footsteps), Voice, Ambience. Players pick a bus (bus = &"SFX"). Put effects on buses, not per player: Reverb on an SFX_Reverb bus fed by sends, a Compressor on Music with a voice sidechain (ducking), and AudioEffectHardLimiter on Master (AudioEffectLimiter is deprecated). Code: AudioServer.get_bus_index(&"Music"), set_bus_volume_linear(i, 0.8) (4.4+; use it for sliders), set_bus_volume_db, set_bus_mute, add_bus_effect and set_bus_effect_enabled. Settings sliders should be linear 0..1. linear_to_db()/db_to_linear() convert when needed. Never put dB on a slider directly.

Players

  • AudioStreamPlayer (UI and music), AudioStreamPlayer2D and AudioStreamPlayer3D (positional). volume_linear exists too.
  • Overlapping SFX (gunshots, footsteps): raise max_polyphony on one player instead of spawning players. Use AudioStreamRandomizer (random pitch in semitones, 4.7 random_pitch_semitones, random volume, several variations) as the stream.
  • Fire and forget: spawn a player, play(), then finished.connect(queue_free). Pool them for heavy use (see the reference).
  • 3D: tune unit_size and max_distance, attenuation_model (inverse, inverse square, log, disabled), attenuation_filter_cutoff_hz (muffles distance), doppler_tracking on the player and the AudioListener3D/camera, and panning_strength. Reverb zones: Area3D.reverb_bus_enabled + reverb_bus_name, or audio_bus_override.
  • 4.7 change: AudioStreamPlayer2D/3D.area_mask defaults to 0. If you rely on Area bus overrides, set the mask to the areas' layer.

Music systems (no code-side crossfading hacks)

  • AudioStreamInteractive: clips (intro, explore, combat, boss) plus transition rules (add_transition(from, to, from_time, to_time, fade_mode, fade_beats, …)) with beat- or bar-synced switches. Switch at runtime with (player.get_stream_playback() as AudioStreamPlaybackInteractive).switch_to_clip_by_name(&"combat"). Set BPM, beat count and bar beats on the imported Ogg/WAV for musical timing.
  • AudioStreamSynchronized: layered stems that play in sync. Fade layers with set_sync_stream_volume(i, db) (vertical layering).
  • AudioStreamPlaylist: sequential or shuffled tracks with fades.
  • Keep music on its own player under the Music bus. Set process_mode = PROCESS_MODE_ALWAYS if it should keep playing in pause menus.

Import

Use Ogg Vorbis for music and long ambience (streamed) and WAV for short SFX (low latency). Set loops in the Import dock (loop for Ogg, edit/loop_mode for WAV) instead of in code. Trim silence on import for snappy SFX.

Procedural and analysis

  • AudioStreamGenerator + push_frame()/push_buffer() in _process, for synths and retro beeps.
  • AudioEffectCapture on a bus records or streams audio. AudioEffectSpectrumAnalyzer + get_magnitude_for_frequency_range makes visualizers.
  • Microphone: AudioStreamMicrophone needs audio/driver/enable_input = true and OS permission on mobile.

Web and mobile

  • Web: browsers block audio until the first user input, so start music after a click or tap. The default playback type can be set to Sample (audio/general/default_playback_type, experimental) for lower latency on web.
  • Mobile: keep simultaneous voices low. Pause audio on NOTIFICATION_APPLICATION_PAUSED.

Bus volume settings, SFX pool, adaptive music controller, procedural beep (compiled by the tests): references/patterns.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.