audio_manage
Manage Godot audio: create players, assign streams, control playback, synthesize sound effects, and configure buses, music, and sound managers.
Instructions
Sound effects, music, ambience (AudioStreamPlayer / 2D / 3D).
Ops: • player_create(parent_path, name="AudioStreamPlayer", type="1d") Create an AudioStreamPlayer / 2D / 3D node. type: "1d" | "2d" | "3d". • player_set_stream(player_path, stream_path) Assign an AudioStream resource (.ogg/.wav/.mp3 or .tres). Returns duration_seconds. • player_set_playback(player_path, volume_db?, pitch_scale?, autoplay?, bus?) Update common playback properties atomically. Pass only fields to change; at least one of volume_db/pitch_scale/autoplay/bus required. • play(player_path, from_position=0.0) Start real editor preview playback. Not undoable. • stop(player_path) Stop editor preview playback. Not undoable. • list(root="res://", include_duration=True) Scan project for AudioStream resources (every subclass + .tres/.res). • generate_procedural_sfx(preset="jump", dest_path="", duration=0.0, sample_rate=22050) Synthesize a chiptune PCM .wav sound effect directly into res://. Presets: jump | coin | laser | hit | explosion | powerup | step | click. • scaffold_buses(volumes=None) Configure standard Master, Music, SFX, and UI audio buses in AudioServer. • scaffold_music_player(parent_path="", name="MusicPlayer", stream_path="", autoplay=True, volume_db=0.0, bus="Music", loop=True) Scaffold a dedicated background music player (AudioStreamPlayer) routed to the Music bus with autoplay and loop configuration. • scaffold_sound_manager(name="SoundManager", script_path="res://scripts/sound_manager.gd", pool_size=16, bus="SFX", register_autoload=True) Scaffold a multi-channel sound effect manager singleton with AudioStreamPlayer pooling, pitch variation, and 2D spatial audio helper. • bus_list() List all AudioServer buses with their properties and effects. • bus_add(name, send="Master", volume_db=0.0, at_pos=-1) Add a new audio bus and route it to a parent bus. • bus_remove(bus) Remove an audio bus by name or index. • bus_set_properties(bus, volume_db?, send?, solo?, mute?, bypass_effects?) Update properties on an existing bus. • bus_add_effect(bus, effect_type, at_position=-1, enabled=True, params={}) Add an audio effect to a bus. Types: Reverb, Delay, Chorus, Phaser, Distortion, EQ, Compressor, Limiter, LowPassFilter, HighPassFilter, BandPassFilter, NotchFilter, Amplify. • bus_save_layout(path="res://default_bus_layout.tres") Save the current AudioServer bus layout to a resource file.
Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||