wobblyhead hg > minor_monsters
comparison doc/sound.md @ 32:85d23328a215 0.10.0
added intro music, logic for browser audio triggering on splash screen
| author | ark |
|---|---|
| date | 2026-10-20 18:39 +0200 |
| parents | fe680946164b |
| children |
comparison
equal
deleted
inserted
replaced
| 31:d1ae50439686 | 32:85d23328a215 |
|---|---|
| 33 | tower sold | tower_sold | | | 33 | tower sold | tower_sold | | |
| 34 | placement refused | placement_refused | no legal spot within reach | | 34 | placement refused | placement_refused | no legal spot within reach | |
| 35 | button tap | button_tap | | | 35 | button tap | button_tap | | |
| 36 | map won | map_won | recorded | | 36 | map won | map_won | recorded | |
| 37 | map lost | map_lost | recorded | | 37 | map lost | map_lost | recorded | |
| 38 | splash screen music | intro | recorded, loops while the splash screen shows | | |
| 38 | 39 |
| 39 several recordings per event are allowed; the game picks one at random. | 40 several recordings per event are allowed; the game picks one at random. |
| 40 | 41 |
| 41 the map won sound waits until a boss or monster death sound still playing has | 42 the map won sound waits until a boss or monster death sound still playing has |
| 42 ended, and map lost waits for the last exit sound. the boss wave may not stay | 43 ended, and map lost waits for the last exit sound. the boss wave may not stay |
| 57 ffmpeg. it lists the number of variants per recording and splits those | 58 ffmpeg. it lists the number of variants per recording and splits those |
| 58 recordings at their longest pauses, into NAME_1, NAME_2 and so on. it | 59 recordings at their longest pauses, into NAME_1, NAME_2 and so on. it |
| 59 trims silence, filters low rumble, fades the ends and brings every sound to | 60 trims silence, filters low rumble, fades the ends and brings every sound to |
| 60 the same peak level. the output is mono mp3, which desktop browsers and | 61 the same peak level. the output is mono mp3, which desktop browsers and |
| 61 tablets (including safari) play | 62 tablets (including safari) play |
| 63 - the script can drop the start of a recording up to a set time, and add a | |
| 64 pause of silence after a sound that loops. intro loses its first 3 s, | |
| 65 which hold a burp before the music, and gets 0.3 s of silence at the end | |
| 62 - the build embeds art/sounds/ as base64 in www/data/sounds.js. see | 66 - the build embeds art/sounds/ as base64 in www/data/sounds.js. see |
| 63 architecture.md for why | 67 architecture.md for why |
| 64 | 68 |
| 65 browsers only play sound after the first user interaction. the play button on | 69 browsers only play sound after the first user interaction. on the first |
| 66 the splash screen starts the sound. | 70 splash screen after loading, a sound button covers the play button. it |
| 71 pulses with a red glow, like an armed sell button. tapping it starts the | |
| 72 sound and the intro music, and uncovers the play button. when sound was | |
| 73 switched off in an earlier visit, there is no sound button: the play button | |
| 74 shows at once and starts the sound as before, and there is no music. | |
| 75 | |
| 76 the intro loops until the play button is tapped, then fades out over the | |
| 77 music_fade setting in [sound]. the splash screen that follows a won game | |
| 78 plays the intro at once, as sound is already running. | |
| 67 | 79 |
| 68 the sound button in the top bar switches sound on and off. the choice is | 80 the sound button in the top bar switches sound on and off. the choice is |
| 69 stored in the browser (architecture.md, persistence). until the player first | 81 stored in the browser (architecture.md, persistence). until the player first |
| 70 uses it, the enabled setting in [sound] applies. | 82 uses it, the enabled setting in [sound] applies. |
