audio-design
Skill này làm gì
Skill này giải thích cách sắp xếp và cân bằng âm thanh trong game, từ cách bố trí mixer đến nhạc thay đổi theo lối chơi. Nó dành cho nhà thiết kế và nhà phát triển game muốn một bản mix rõ ràng, chuyên nghiệp.
Khi nào nên dùng
- ✓Khi bạn cần sắp xếp âm thanh game thành các bus cho nhạc, hiệu ứng và giọng nói.
- ✓Khi nhạc nên nhỏ lại trong lúc có thoại hoặc tiếng động lớn.
- ✓Khi bạn muốn nhạc phản ứng với mức độ căng thẳng của trận chiến hoặc khám phá.
Liên kết skill
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/audio-design/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn nhạc nền tự động nhỏ lại khi nhân vật nói, và nhạc trở nên dồn dập hơn trong lúc đánh nhau.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đưa mọi âm thanh qua một số ít bus, làm việc với âm lượng theo decibel và thiết lập ducking để nhạc giảm xuống khi có thoại. Nó cũng xếp chồng hoặc chuyển đổi các bản nhạc khi cường độ chơi thay đổi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Audio design
Game audio is a mixing graph plus a music system. Route every sound through a
small set of buses so you can balance and process groups; make music react to
play through layering and re-sequencing rather than looping one track. This skill
teaches the portable practice; bind it to godot-audio, Unity's AudioMixer, or
middleware (FMOD/Wwise) for concrete APIs.
When to use
- Use to design a bus/mixer layout, set group volumes, and apply effects (reverb, compression, EQ) to groups of sounds.
- Use to duck music/ambience under dialogue or impacts (sidechain).
- Use to build adaptive music that responds to combat/exploration intensity.
- Use to add SFX variation (pitch/sample randomization) and sync events to a beat.
When not to use: for the engine's concrete audio nodes/streams, use
godot-audio or the engine's audio skill. Loading/streaming and asset import are
engine concerns. For UI sliders that drive bus volume, see the engine UI skill.
Core workflow
- Lay out buses, not per-sound volume. A typical tree:
Master ← {Music, SFX, Ambience, UI, Voice}. Everything plays into a bus; the player's settings sliders map to bus volumes. Never set hundreds of clip volumes by hand. - Work in decibels, not linear. Perceived loudness is logarithmic. Volume controls and automation should operate in dB; convert only at the edges.
- Leave headroom and hit a loudness target. Keep true peaks at or below -1 dBTP and measure integrated loudness over a representative play session with an ITU-R BS.1770 meter. Sony's ASWG-R001 recommendation, the usual reference, is -24 LUFS (±2) for console/PC played on TVs and speakers and -18 LUFS (±2) for handheld/mobile. Music-streaming targets such as -14 LUFS are not game targets.
- Duck competing sources with a sidechain compressor (or volume automation): when voice/important SFX plays, the music bus dips, then recovers.
- Make music adaptive via vertical layering (stems faded in/out) and/or horizontal re-sequencing (swap segments at musical boundaries). See the reference.
- Vary repeated SFX with small random pitch/volume offsets and sample pools so footsteps and hits don't sound robotic.
- Verify on real output. Listen on headphones and speakers; check that the mix balances, ducking is audible but not pumping, and music transitions land on the beat — never assume from the editor meters alone.
Patterns
Snippets are Godot 4.7 GDScript; the Unity 6.3 LTS and middleware equivalents are noted under each one.
1. Bus routing and slider-to-gain mapping
# Route sounds to named buses; control GROUPS, not individual clips.
sfx_player.bus = &"SFX"
music_player.bus = &"Music"
# Map a 0..1 settings slider to bus gain. Squaring the slider first spreads the
# audible change over the whole travel; a raw linear-amplitude slider puts most of
# the change in the bottom fifth.
func set_bus_volume(bus_name: StringName, slider01: float) -> void:
var idx := AudioServer.get_bus_index(bus_name)
var gain := clampf(slider01, 0.0, 1.0)
AudioServer.set_bus_mute(idx, gain <= 0.0) # true silence at 0
AudioServer.set_bus_volume_linear(idx, gain * gain) # = set_bus_volume_db(idx, linear_to_db(gain * gain))
# WRONG: AudioServer.set_bus_volume_db(idx, slider01): "0.5" is +0.5 dB (no audible
# change) and 0 is 0 dB (full volume).
Unity 6.3 LTS: expose the group's Volume as a mixer parameter, then
mixer.SetFloat("MusicVolume", 20f * Mathf.Log10(Mathf.Max(gain * gain, 0.0001f))) (the mixer
floor is -80 dB). An AudioSource whose Output group is empty plays outside your mixer groups,
so no category slider or snapshot affects it: route every source.
2. Ducking via sidechain (music dips under voice)
A compressor on the music bus, keyed by the voice bus, lowers the music while dialogue plays and releases afterwards. Starting values: threshold about -30 dB on the voice signal, ratio 4:1 to 8:1, attack as fast as the effect allows (up to ~10 ms), release 300-500 ms.
# Godot 4.7: AudioEffectCompressor reads its sidechain bus for threshold detection.
func _ready() -> void:
var duck := AudioEffectCompressor.new()
duck.sidechain = &"Voice" # the bus that triggers the dip
duck.threshold = -30.0 # dB, range -60..0
duck.ratio = 8.0 # range 1..48
duck.attack_us = 2000.0 # MICROseconds, range 20..200
Câu hỏi thường gặp
Skill có bao quát một engine cụ thể không?
Không. Nó không phụ thuộc engine và có thể kết nối với Godot, Unity hoặc phần mềm trung gian như FMOD hay Wwise.
Vì sao chỉnh âm lượng bằng decibel?
Skill cho biết độ to mà con người cảm nhận là theo hàm logarit, nên decibel giúp điều chỉnh âm lượng mượt hơn.
Biến thể hiệu ứng âm thanh là gì?
Đó là thay đổi cao độ hoặc mẫu âm thanh một chút để các âm lặp lại không nghe máy móc.
Chi tiết
Mô tả gốc của tác giả
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization. Engine-neutral. Use when the user mentions audio mixing, audio buses, adaptive/dynamic music, ducking, SFX variation, music layers, or syncing gameplay to the beat.
Độ phổ biến
- Sao GitHub
- 6.6k
- Vị trí xếp hạng
- #13792
- Giấy phép
- Apache-2.0
- Cập nhật
- 28/10/2026
Bình luận
- …
Thêm skill từ kho mã này
router
6.6kGiúp agent của bạn chọn đúng skill phát triển game cho yêu cầu, dựa trên engine bạn dùng và loại công việc cần làm.
ai-behavior-trees-utility-ai
6.6kGiúp agent của bạn xây dựng behavior tree và hệ thống utility AI cho kẻ thù và nhân vật trong game, chọn hành động theo độ ưu tiên và điểm số.
camera-systems
6.6kGiúp agent của bạn xây dựng camera game bám theo mượt, giữ trong phạm vi màn chơi, và xoay quanh hoặc nhìn quanh trong 3D.
create-game-assets
6.6kGiúp agent của bạn lập kế hoạch và kiểm tra một bộ hình ảnh game nhất quán, từ hướng dẫn phong cách và danh sách sprite đến quy tắc kích thước và đặt tên.
Skill tương tự
openai-whisper-api
394kCho phép agent của bạn chuyển bản ghi âm thành văn bản bằng dịch vụ chuyển đổi của OpenAI, với tùy chọn nhãn người nói và tệp đầu ra.
openai-whisper
394kGiúp agent của bạn chuyển âm thanh thành văn bản trên chính máy tính bằng lệnh Whisper, không cần khóa API và không cần tải lên đám mây.
sag
394kGiúp agent của bạn đọc văn bản thành tiếng nói bằng giọng ElevenLabs và phát kết quả trên máy tính, kèm mẹo về phát âm và biểu cảm.