Phase 18 — Audio (music director + SFX catalog + bus wiring)
Adds an AudioManager autoload with three buses (Master, Music routed to Master, SFX routed to Master), a small catalog of looping music + one-shot SFX, and a single persistent AudioStreamPlayer for the music director. Music * Day and night loops swap on Clock.phase_changed (night during the night phase, day everywhere else). Tracks pulled from Retro Farming Music 1 (day) and Cozy Melodies Pack 1 (night), both loopable OGG. SFX * Tree.fell, Rock.mined, BigRock.mined → tree_fell / mine_tick. * EventBus.pawn_took_damage → combat_hit (Sword Pack 1). * EventBus.storyteller_event_fired → ui_confirm sting. * EventBus.alert_added → ui_click. * play_sfx is rate-limited per key (80ms cooldown) so fast-sim doesn't saturate the mixer. Settings + suspend * SettingsMenu master/music/sfx sliders now live-bind to the bus dB via Audio.set_*_linear (linear → dB internally, 0 → -80dB silence). The ambient slider is intentionally unwired; no ambient bus this pass. * NOTIFICATION_APPLICATION_PAUSED + FOCUS_OUT mute the Master bus to match the existing "no background sim" rule. Resume + focus restore it. Bundle housekeeping * Two zipped packs in the ElvGames bundle (Cozy Melodies Pack 1, Retro Farming Music 1) extracted in place to keep pack identity intact for the license/credits string. 8 OGG files curated into audio/ at ~5.3MB. Verified end-to-end via MCP runtime: buses online, day_loop plays at boot, manual phase swap day→night→day round-trips, slider linear→dB mapping correct (0.5 → -6.02dB, 0.0 → -80dB), tree_fell SFX triggers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fb07a3fa15
commit
d819c13a9d
25 changed files with 437 additions and 8 deletions
BIN
audio/music/day_loop.ogg
Normal file
BIN
audio/music/day_loop.ogg
Normal file
Binary file not shown.
19
audio/music/day_loop.ogg.import
Normal file
19
audio/music/day_loop.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://gh1dj6e0s30i"
|
||||
path="res://.godot/imported/day_loop.ogg-1ef9d593f4880150447e96ed1638de1a.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/music/day_loop.ogg"
|
||||
dest_files=["res://.godot/imported/day_loop.ogg-1ef9d593f4880150447e96ed1638de1a.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/music/night_loop.ogg
Normal file
BIN
audio/music/night_loop.ogg
Normal file
Binary file not shown.
19
audio/music/night_loop.ogg.import
Normal file
19
audio/music/night_loop.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://hm47ast0d47p"
|
||||
path="res://.godot/imported/night_loop.ogg-1fb74a57de28c3ab1846d94968313401.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/music/night_loop.ogg"
|
||||
dest_files=["res://.godot/imported/night_loop.ogg-1fb74a57de28c3ab1846d94968313401.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/sfx/chop_tick.ogg
Normal file
BIN
audio/sfx/chop_tick.ogg
Normal file
Binary file not shown.
19
audio/sfx/chop_tick.ogg.import
Normal file
19
audio/sfx/chop_tick.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://dk2ss1sdgm8lw"
|
||||
path="res://.godot/imported/chop_tick.ogg-1191be103addf15adb12fb1d2ad20399.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx/chop_tick.ogg"
|
||||
dest_files=["res://.godot/imported/chop_tick.ogg-1191be103addf15adb12fb1d2ad20399.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/sfx/combat_hit.ogg
Normal file
BIN
audio/sfx/combat_hit.ogg
Normal file
Binary file not shown.
19
audio/sfx/combat_hit.ogg.import
Normal file
19
audio/sfx/combat_hit.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://blu62gt88uk35"
|
||||
path="res://.godot/imported/combat_hit.ogg-2c581babb041c9b69d6880bc8effd337.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx/combat_hit.ogg"
|
||||
dest_files=["res://.godot/imported/combat_hit.ogg-2c581babb041c9b69d6880bc8effd337.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/sfx/mine_tick.ogg
Normal file
BIN
audio/sfx/mine_tick.ogg
Normal file
Binary file not shown.
19
audio/sfx/mine_tick.ogg.import
Normal file
19
audio/sfx/mine_tick.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://d06ntx5yx8svj"
|
||||
path="res://.godot/imported/mine_tick.ogg-718359cc14cbf53d082e1aa4ad5475b4.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx/mine_tick.ogg"
|
||||
dest_files=["res://.godot/imported/mine_tick.ogg-718359cc14cbf53d082e1aa4ad5475b4.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/sfx/tree_fell.ogg
Normal file
BIN
audio/sfx/tree_fell.ogg
Normal file
Binary file not shown.
19
audio/sfx/tree_fell.ogg.import
Normal file
19
audio/sfx/tree_fell.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://cqivy0rn03sou"
|
||||
path="res://.godot/imported/tree_fell.ogg-4d1a7ace71389c0ff9fe8b0fedd012ba.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx/tree_fell.ogg"
|
||||
dest_files=["res://.godot/imported/tree_fell.ogg-4d1a7ace71389c0ff9fe8b0fedd012ba.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/sfx/ui_click.ogg
Normal file
BIN
audio/sfx/ui_click.ogg
Normal file
Binary file not shown.
19
audio/sfx/ui_click.ogg.import
Normal file
19
audio/sfx/ui_click.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://dwo0kvjvyio6h"
|
||||
path="res://.godot/imported/ui_click.ogg-be6446e005e272718f7786e12bdf1e1e.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx/ui_click.ogg"
|
||||
dest_files=["res://.godot/imported/ui_click.ogg-be6446e005e272718f7786e12bdf1e1e.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
audio/sfx/ui_confirm.ogg
Normal file
BIN
audio/sfx/ui_confirm.ogg
Normal file
Binary file not shown.
19
audio/sfx/ui_confirm.ogg.import
Normal file
19
audio/sfx/ui_confirm.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://bfgwe7ycnmuc3"
|
||||
path="res://.godot/imported/ui_confirm.ogg-f006b0c94e1ad4799df46c4e5bc06e82.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx/ui_confirm.ogg"
|
||||
dest_files=["res://.godot/imported/ui_confirm.ogg-f006b0c94e1ad4799df46c4e5bc06e82.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
Loading…
Add table
Add a link
Reference in a new issue