Repository navigation
M5.1: audio - #34
Merged
Merged
M5.1: audio#34
Conversation
Sounds and music are pack content: synth sound effects and step-pattern music (no files needed) or audio file assets. settings.audio names the sound for hits, hurts, blocks, KOs, pickups and clearing a level; moves can add a swing and hit sound, levels a music track. A small WebAudio engine plays them, ducks the music while paused, and keeps master, music and effects volumes per browser (start and pause menus). The Forge lists sounds and music with a preview and can swap in an audio file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017AxU91KfohopVBJiiV9gwj
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Stacked on #33 (M4.5). Merge that first.
What's new
Sound is pack content. Packs gain:
sounds: either a synth sound (wave, pitch sweep, duration) or an audio file (anaudioasset or a site URL);music: either a looping pattern of notes (tempo plus tracks likeA2 . C3 - E3) or a looping file;settings.audio, which names the sound for each event: hit, hurt (the player is hit), block, KO, pickup, and clearing a level;sound(the swing) andhitSoundon moves, andmusicon levels.These are optional additions, so older packs stay valid and no schema bump is needed. The registry checks every reference and that file sounds point at audio assets.
Default pack: synth sound effects (whoosh, punch, heavy hit, hurt, block, KO, pickup, clear) and a music pattern for each of the two levels. No audio files are needed, so the repository stays free of binary assets.
Engine (
src/audio/engine.ts, WebAudio):Volume: master, music and effects sliders. They're under SOUND on the start menu (in the controls box) and in the pause menu, and are saved per browser.
Forge:
Bundles: audio files must be MP3, Ogg or WAV. This check came with M4.5: reports, moderation and upload checks #33.
Checks
DEFAULT_CONFIGsnapshot updated on purpose; the only changes are the audio additions.urlandasset;Headless Chromium can't confirm that anything is audible. The run checks that the right sounds are requested at the right moments, using the engine's
audioLog. Worth a listen when you review.Generated by Claude Code