@adatechnology/game-audio 0.3.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/assets/sfx/CREDITOS.md +1046 -0
- package/assets/sfx/ambiente/ambience_city_day_01.ogg +0 -0
- package/assets/sfx/ambiente/ambience_city_day_02.ogg +0 -0
- package/assets/sfx/ambiente/ambience_construction_01.ogg +0 -0
- package/assets/sfx/ambiente/ambience_night_01.ogg +0 -0
- package/assets/sfx/ambiente/ambience_room_tone_01.ogg +0 -0
- package/assets/sfx/ambiente/ambience_room_tone_02.ogg +0 -0
- package/assets/sfx/ambiente/ambience_rural_day_01.ogg +0 -0
- package/assets/sfx/ambiente/ambience_rural_day_02.ogg +0 -0
- package/assets/sfx/ambiente/rain_loop_01.ogg +0 -0
- package/assets/sfx/ambiente/water_river_loop_01.ogg +0 -0
- package/assets/sfx/ambiente/water_river_loop_02.ogg +0 -0
- package/assets/sfx/ambiente/water_river_loop_03.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_01.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_02.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_03.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_04.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_05.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_06.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_07.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_08.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_09.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_10.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_11.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_12.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_13.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_14.ogg +0 -0
- package/assets/sfx/ambiente/water_splash_15.ogg +0 -0
- package/assets/sfx/armas/bolt_lift_medium_01.ogg +0 -0
- package/assets/sfx/armas/bolt_lift_medium_02.ogg +0 -0
- package/assets/sfx/armas/bolt_lift_medium_03.ogg +0 -0
- package/assets/sfx/armas/bolt_lift_medium_04.ogg +0 -0
- package/assets/sfx/armas/bolt_lift_medium_05.ogg +0 -0
- package/assets/sfx/armas/bolt_lock_medium_01.ogg +0 -0
- package/assets/sfx/armas/bolt_lock_medium_02.ogg +0 -0
- package/assets/sfx/armas/bolt_lock_medium_03.ogg +0 -0
- package/assets/sfx/armas/bolt_lock_medium_04.ogg +0 -0
- package/assets/sfx/armas/bolt_lock_medium_05.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_heavy_01.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_medium_01.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_medium_02.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_medium_03.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_medium_04.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_medium_05.ogg +0 -0
- package/assets/sfx/armas/bolt_pull_medium_06.ogg +0 -0
- package/assets/sfx/armas/bolt_push_heavy_01.ogg +0 -0
- package/assets/sfx/armas/bolt_push_medium_01.ogg +0 -0
- package/assets/sfx/armas/bolt_push_medium_02.ogg +0 -0
- package/assets/sfx/armas/bolt_push_medium_03.ogg +0 -0
- package/assets/sfx/armas/bolt_push_medium_04.ogg +0 -0
- package/assets/sfx/armas/bolt_push_medium_05.ogg +0 -0
- package/assets/sfx/armas/bolt_push_medium_06.ogg +0 -0
- package/assets/sfx/armas/casing_drop_concreto_01.ogg +0 -0
- package/assets/sfx/armas/casing_drop_concreto_02.ogg +0 -0
- package/assets/sfx/armas/casing_drop_concreto_03.ogg +0 -0
- package/assets/sfx/armas/casing_drop_metal_01.ogg +0 -0
- package/assets/sfx/armas/casing_drop_metal_02.ogg +0 -0
- package/assets/sfx/armas/casing_drop_metal_03.ogg +0 -0
- package/assets/sfx/armas/casing_drop_terra_01.ogg +0 -0
- package/assets/sfx/armas/casing_drop_terra_02.ogg +0 -0
- package/assets/sfx/armas/casing_drop_terra_03.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_light_01.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_light_02.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_light_03.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_light_04.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_medium_01.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_medium_02.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_medium_03.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_medium_04.ogg +0 -0
- package/assets/sfx/armas/charging_handle_pull_medium_05.ogg +0 -0
- package/assets/sfx/armas/charging_handle_release_medium_01.ogg +0 -0
- package/assets/sfx/armas/charging_handle_release_medium_02.ogg +0 -0
- package/assets/sfx/armas/charging_handle_release_medium_03.ogg +0 -0
- package/assets/sfx/armas/charging_handle_release_medium_04.ogg +0 -0
- package/assets/sfx/armas/charging_handle_release_medium_05.ogg +0 -0
- package/assets/sfx/armas/cylinder_close_light_01.ogg +0 -0
- package/assets/sfx/armas/cylinder_close_light_02.ogg +0 -0
- package/assets/sfx/armas/cylinder_close_light_03.ogg +0 -0
- package/assets/sfx/armas/cylinder_close_light_04.ogg +0 -0
- package/assets/sfx/armas/cylinder_close_light_05.ogg +0 -0
- package/assets/sfx/armas/cylinder_eject_light_01.ogg +0 -0
- package/assets/sfx/armas/cylinder_eject_light_02.ogg +0 -0
- package/assets/sfx/armas/cylinder_eject_light_03.ogg +0 -0
- package/assets/sfx/armas/cylinder_open_light_01.ogg +0 -0
- package/assets/sfx/armas/cylinder_open_light_02.ogg +0 -0
- package/assets/sfx/armas/cylinder_open_light_03.ogg +0 -0
- package/assets/sfx/armas/cylinder_open_light_04.ogg +0 -0
- package/assets/sfx/armas/cylinder_open_light_05.ogg +0 -0
- package/assets/sfx/armas/lever_close_medium_01.ogg +0 -0
- package/assets/sfx/armas/lever_close_medium_02.ogg +0 -0
- package/assets/sfx/armas/lever_open_medium_01.ogg +0 -0
- package/assets/sfx/armas/lever_open_medium_02.ogg +0 -0
- package/assets/sfx/armas/mag_out_heavy_01.ogg +0 -0
- package/assets/sfx/armas/mag_out_heavy_02.ogg +0 -0
- package/assets/sfx/armas/mag_out_light_01.ogg +0 -0
- package/assets/sfx/armas/mag_out_light_02.ogg +0 -0
- package/assets/sfx/armas/mag_out_light_03.ogg +0 -0
- package/assets/sfx/armas/mag_out_light_04.ogg +0 -0
- package/assets/sfx/armas/mag_out_medium_01.ogg +0 -0
- package/assets/sfx/armas/mag_out_medium_02.ogg +0 -0
- package/assets/sfx/armas/mag_out_medium_03.ogg +0 -0
- package/assets/sfx/armas/mag_seat_heavy_01.ogg +0 -0
- package/assets/sfx/armas/mag_seat_heavy_02.ogg +0 -0
- package/assets/sfx/armas/mag_seat_light_01.ogg +0 -0
- package/assets/sfx/armas/mag_seat_light_02.ogg +0 -0
- package/assets/sfx/armas/mag_seat_light_03.ogg +0 -0
- package/assets/sfx/armas/mag_seat_light_04.ogg +0 -0
- package/assets/sfx/armas/mag_seat_light_05.ogg +0 -0
- package/assets/sfx/armas/mag_seat_light_06.ogg +0 -0
- package/assets/sfx/armas/mag_seat_medium_01.ogg +0 -0
- package/assets/sfx/armas/mag_seat_medium_02.ogg +0 -0
- package/assets/sfx/armas/mag_seat_medium_03.ogg +0 -0
- package/assets/sfx/armas/pistol_22lr_close_01.ogg +0 -0
- package/assets/sfx/armas/pistol_22lr_close_02.ogg +0 -0
- package/assets/sfx/armas/pistol_22lr_far_01.ogg +0 -0
- package/assets/sfx/armas/pistol_22lr_far_02.ogg +0 -0
- package/assets/sfx/armas/pistol_22lr_far_03.ogg +0 -0
- package/assets/sfx/armas/pistol_22lr_far_04.ogg +0 -0
- package/assets/sfx/armas/pistol_45_close_01.ogg +0 -0
- package/assets/sfx/armas/pistol_45_close_02.ogg +0 -0
- package/assets/sfx/armas/pistol_45_close_03.ogg +0 -0
- package/assets/sfx/armas/pistol_45_close_04.ogg +0 -0
- package/assets/sfx/armas/pistol_45_close_05.ogg +0 -0
- package/assets/sfx/armas/pistol_45_far_01.ogg +0 -0
- package/assets/sfx/armas/pistol_45_far_02.ogg +0 -0
- package/assets/sfx/armas/pistol_45_far_03.ogg +0 -0
- package/assets/sfx/armas/pistol_45_far_04.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_close_01.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_close_02.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_close_03.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_close_04.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_close_05.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_close_06.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_far_01.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_far_02.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_far_03.ogg +0 -0
- package/assets/sfx/armas/pistol_9mm_far_04.ogg +0 -0
- package/assets/sfx/armas/pump_back_heavy_01.ogg +0 -0
- package/assets/sfx/armas/pump_back_heavy_02.ogg +0 -0
- package/assets/sfx/armas/pump_back_heavy_03.ogg +0 -0
- package/assets/sfx/armas/pump_back_heavy_04.ogg +0 -0
- package/assets/sfx/armas/pump_back_heavy_05.ogg +0 -0
- package/assets/sfx/armas/pump_forward_heavy_01.ogg +0 -0
- package/assets/sfx/armas/pump_forward_heavy_02.ogg +0 -0
- package/assets/sfx/armas/pump_forward_heavy_03.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_close_01.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_close_02.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_close_03.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_close_04.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_far_01.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_far_02.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_far_03.ogg +0 -0
- package/assets/sfx/armas/revolver_38_357_far_04.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_close_01.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_close_02.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_close_03.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_close_04.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_close_05.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_close_06.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_far_01.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_far_02.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_far_03.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_far_04.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_far_05.ogg +0 -0
- package/assets/sfx/armas/rifle_308_3006_far_06.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_close_01.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_close_02.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_close_03.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_close_04.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_close_05.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_far_01.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_far_02.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_far_03.ogg +0 -0
- package/assets/sfx/armas/rifle_5_56_far_04.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_01.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_02.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_03.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_04.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_05.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_06.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_07.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_08.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_09.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_10.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_11.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_close_12.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_far_01.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_far_02.ogg +0 -0
- package/assets/sfx/armas/rifle_7_62x39_far_03.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_01.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_02.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_03.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_04.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_05.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_06.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_07.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_08.ogg +0 -0
- package/assets/sfx/armas/shell_insert_heavy_09.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_close_01.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_close_02.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_close_03.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_close_04.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_close_05.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_close_06.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_far_01.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_far_02.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_far_03.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_far_04.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_far_05.ogg +0 -0
- package/assets/sfx/armas/shotgun_12_far_06.ogg +0 -0
- package/assets/sfx/armas/slide_release_light_01.ogg +0 -0
- package/assets/sfx/armas/slide_release_light_02.ogg +0 -0
- package/assets/sfx/armas/slide_release_light_03.ogg +0 -0
- package/assets/sfx/armas/slide_release_light_04.ogg +0 -0
- package/assets/sfx/armas/slide_release_light_05.ogg +0 -0
- package/assets/sfx/armas/slide_release_light_06.ogg +0 -0
- package/assets/sfx/armas/slide_release_medium_01.ogg +0 -0
- package/assets/sfx/armas/slide_release_medium_02.ogg +0 -0
- package/assets/sfx/armas/slide_release_medium_03.ogg +0 -0
- package/assets/sfx/armas/slide_release_medium_04.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_01.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_02.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_03.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_04.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_05.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_06.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_close_07.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_far_01.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_far_02.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_far_03.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_far_04.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_far_05.ogg +0 -0
- package/assets/sfx/armas/sniper_338_300wm_far_06.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_01.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_02.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_03.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_04.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_05.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_06.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_07.ogg +0 -0
- package/assets/sfx/armas/speedloader_light_08.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_close_01.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_close_02.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_close_03.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_close_04.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_close_05.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_far_01.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_far_02.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_far_03.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_far_04.ogg +0 -0
- package/assets/sfx/armas/suppressed_pistol_far_05.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_close_01.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_close_02.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_close_03.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_close_04.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_far_01.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_far_02.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_far_03.ogg +0 -0
- package/assets/sfx/armas/suppressed_rifle_far_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_05.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_06.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_mixed_07.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_05.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_06.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_07.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_08.ogg +0 -0
- package/assets/sfx/explosoes-fogo/debris_rain_stone_09.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_big_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_big_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_big_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_big_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_big_05.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_car_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_car_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_car_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_car_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_far_close_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_far_close_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_far_close_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_far_close_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_flashbang_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_flashbang_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_grenade_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_grenade_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_grenade_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_grenade_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_grenade_05.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_grenade_06.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_05.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_06.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_07.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_08.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_09.ogg +0 -0
- package/assets/sfx/explosoes-fogo/explosion_small_bang_10.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_crackle_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_crackle_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_crackle_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_crackle_05.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_crackle_07.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_extinguish_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_extinguish_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_ignite_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_ignite_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_ignite_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_ignite_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_loop_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_loop_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_loop_04.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_loop_small_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_pop_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_pop_02.ogg +0 -0
- package/assets/sfx/explosoes-fogo/fire_pop_03.ogg +0 -0
- package/assets/sfx/explosoes-fogo/flamethrower_loop_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/gas_leak_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/molotov_break_ignite_01.ogg +0 -0
- package/assets/sfx/explosoes-fogo/molotov_break_ignite_02.ogg +0 -0
- package/assets/sfx/impactos/ceramic_hit_close_01.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_01.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_02.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_03.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_04.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_05.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_06.ogg +0 -0
- package/assets/sfx/impactos/concrete_block_drag_close_07.ogg +0 -0
- package/assets/sfx/impactos/crack_close_01.ogg +0 -0
- package/assets/sfx/impactos/crack_close_02.ogg +0 -0
- package/assets/sfx/impactos/crack_close_03.ogg +0 -0
- package/assets/sfx/impactos/crack_close_04.ogg +0 -0
- package/assets/sfx/impactos/crack_close_05.ogg +0 -0
- package/assets/sfx/impactos/crack_close_06.ogg +0 -0
- package/assets/sfx/impactos/crack_close_07.ogg +0 -0
- package/assets/sfx/impactos/crack_close_08.ogg +0 -0
- package/assets/sfx/impactos/crack_close_09.ogg +0 -0
- package/assets/sfx/impactos/crack_close_10.ogg +0 -0
- package/assets/sfx/impactos/crumble_close_01.ogg +0 -0
- package/assets/sfx/impactos/crumble_close_02.ogg +0 -0
- package/assets/sfx/impactos/crumble_close_03.ogg +0 -0
- package/assets/sfx/impactos/crumble_close_04.ogg +0 -0
- package/assets/sfx/impactos/crumble_close_05.ogg +0 -0
- package/assets/sfx/impactos/flesh_fruit_splat_close_01.ogg +0 -0
- package/assets/sfx/impactos/flesh_fruit_splat_close_02.ogg +0 -0
- package/assets/sfx/impactos/flesh_fruit_splat_close_03.ogg +0 -0
- package/assets/sfx/impactos/furniture_push_wood_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_heavy_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_heavy_close_02.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_heavy_close_03.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_heavy_close_04.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_heavy_close_05.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_light_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_light_close_02.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_light_close_03.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_light_close_04.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_light_close_05.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_medium_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_medium_close_02.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_medium_close_03.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_medium_close_04.ogg +0 -0
- package/assets/sfx/impactos/glass_blunt_medium_close_05.ogg +0 -0
- package/assets/sfx/impactos/glass_bottle_break_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_debris_fall_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_debris_fall_close_02.ogg +0 -0
- package/assets/sfx/impactos/glass_debris_fall_close_03.ogg +0 -0
- package/assets/sfx/impactos/glass_debris_fall_close_04.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_01.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_02.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_03.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_04.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_05.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_06.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_07.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_08.ogg +0 -0
- package/assets/sfx/impactos/glass_shatter_close_09.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_21.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_22.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_23.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_24.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_25.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_26.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_27.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_28.ogg +0 -0
- package/assets/sfx/impactos/gravel_hit_close_29.ogg +0 -0
- package/assets/sfx/impactos/impact_generic_light_close_01.ogg +0 -0
- package/assets/sfx/impactos/impact_generic_light_close_02.ogg +0 -0
- package/assets/sfx/impactos/impact_generic_light_close_03.ogg +0 -0
- package/assets/sfx/impactos/impact_generic_light_close_04.ogg +0 -0
- package/assets/sfx/impactos/impact_generic_light_close_05.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_01.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_02.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_03.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_04.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_05.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_06.ogg +0 -0
- package/assets/sfx/impactos/masonry_blunt_close_07.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_01.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_02.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_03.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_04.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_05.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_21.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_22.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_23.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_24.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_25.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_26.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_27.ogg +0 -0
- package/assets/sfx/impactos/masonry_bullet_close_28.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_heavy_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_heavy_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_heavy_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_heavy_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_heavy_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_light_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_light_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_light_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_light_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_light_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_medium_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_medium_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_medium_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_medium_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_blunt_medium_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_06.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_21.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_22.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_23.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_24.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_25.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_26.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_27.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_28.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_29.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_30.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_31.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_32.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_33.ogg +0 -0
- package/assets/sfx/impactos/metal_bullet_close_34.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_06.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_07.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_08.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_09.ogg +0 -0
- package/assets/sfx/impactos/metal_fall_close_10.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_01.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_02.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_03.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_04.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_05.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_06.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_07.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_08.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_09.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_10.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_11.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_12.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_13.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_14.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_15.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_16.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_17.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_18.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_19.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_20.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_21.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_22.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_23.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_24.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_25.ogg +0 -0
- package/assets/sfx/impactos/metal_thin_close_26.ogg +0 -0
- package/assets/sfx/impactos/paper_tear_close_01.ogg +0 -0
- package/assets/sfx/impactos/paper_tear_close_02.ogg +0 -0
- package/assets/sfx/impactos/plastic_hit_close_01.ogg +0 -0
- package/assets/sfx/impactos/plastic_hit_close_02.ogg +0 -0
- package/assets/sfx/impactos/plastic_hit_close_03.ogg +0 -0
- package/assets/sfx/impactos/plastic_hit_close_04.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_21.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_22.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_23.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_24.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_25.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_26.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_27.ogg +0 -0
- package/assets/sfx/impactos/ricochet_metal_close_28.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_01.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_02.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_03.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_04.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_05.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_06.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_07.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_08.ogg +0 -0
- package/assets/sfx/impactos/rubble_falling_close_09.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_01.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_02.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_03.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_04.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_05.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_06.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_07.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_08.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_09.ogg +0 -0
- package/assets/sfx/impactos/soft_bullet_close_10.ogg +0 -0
- package/assets/sfx/impactos/soil_bullet_close_21.ogg +0 -0
- package/assets/sfx/impactos/soil_bullet_close_22.ogg +0 -0
- package/assets/sfx/impactos/soil_bullet_close_23.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_heavy_close_01.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_heavy_close_02.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_heavy_close_03.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_heavy_close_04.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_heavy_close_05.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_light_close_01.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_light_close_02.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_light_close_03.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_light_close_04.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_light_close_05.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_medium_close_01.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_medium_close_02.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_medium_close_03.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_medium_close_04.ogg +0 -0
- package/assets/sfx/impactos/wood_blunt_medium_close_05.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_01.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_02.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_03.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_04.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_05.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_06.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_07.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_08.ogg +0 -0
- package/assets/sfx/impactos/wood_fall_close_09.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_01.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_02.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_03.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_04.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_05.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_06.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_07.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_08.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_09.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_10.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_11.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_12.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_13.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_14.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_21.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_22.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_23.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_24.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_25.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_26.ogg +0 -0
- package/assets/sfx/impactos/wood_hit_close_27.ogg +0 -0
- package/assets/sfx/itens-portas/backpack_open_shut_01.ogg +0 -0
- package/assets/sfx/itens-portas/backpack_open_shut_02.ogg +0 -0
- package/assets/sfx/itens-portas/backpack_open_shut_03.ogg +0 -0
- package/assets/sfx/itens-portas/backpack_open_shut_04.ogg +0 -0
- package/assets/sfx/itens-portas/backpack_open_shut_05.ogg +0 -0
- package/assets/sfx/itens-portas/backpack_open_shut_06.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_01.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_02.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_03.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_04.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_05.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_06.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_07.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_08.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_09.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_10.ogg +0 -0
- package/assets/sfx/itens-portas/book_open_shut_11.ogg +0 -0
- package/assets/sfx/itens-portas/door_creak_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_creak_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_creak_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_creak_06.ogg +0 -0
- package/assets/sfx/itens-portas/door_creak_07.ogg +0 -0
- package/assets/sfx/itens-portas/door_glass_sliding_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_glass_sliding_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_glass_sliding_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_glass_sliding_04.ogg +0 -0
- package/assets/sfx/itens-portas/door_knock_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_04.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_05.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_06.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_07.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_08.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_09.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_10.ogg +0 -0
- package/assets/sfx/itens-portas/door_lock_unlock_11.ogg +0 -0
- package/assets/sfx/itens-portas/door_locked_rattle_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_locked_rattle_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_locked_rattle_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_04.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_05.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_06.ogg +0 -0
- package/assets/sfx/itens-portas/door_metal_open_shut_07.ogg +0 -0
- package/assets/sfx/itens-portas/door_slam_wood_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_slam_wood_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_slam_wood_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_slam_wood_04.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_open_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_open_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_open_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_open_04.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_01.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_02.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_03.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_04.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_05.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_06.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_07.ogg +0 -0
- package/assets/sfx/itens-portas/door_wood_shut_08.ogg +0 -0
- package/assets/sfx/itens-portas/drawer_open_01.ogg +0 -0
- package/assets/sfx/itens-portas/drawer_open_02.ogg +0 -0
- package/assets/sfx/itens-portas/drawer_shut_01.ogg +0 -0
- package/assets/sfx/itens-portas/drawer_shut_02.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_bag_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_bag_02.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_glass_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_metal_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_metal_02.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_metal_03.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_metal_04.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_metal_05.ogg +0 -0
- package/assets/sfx/itens-portas/item_drop_paper_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_coins_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_coins_02.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_generic_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_generic_02.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_generic_03.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_generic_04.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_leather_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_leather_02.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_leather_03.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_leather_04.ogg +0 -0
- package/assets/sfx/itens-portas/item_pickup_leather_05.ogg +0 -0
- package/assets/sfx/itens-portas/item_setdown_01.ogg +0 -0
- package/assets/sfx/itens-portas/item_setdown_02.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_01.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_02.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_03.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_04.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_05.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_06.ogg +0 -0
- package/assets/sfx/itens-portas/keys_jingle_07.ogg +0 -0
- package/assets/sfx/itens-portas/lever_pull_01.ogg +0 -0
- package/assets/sfx/itens-portas/lever_pull_02.ogg +0 -0
- package/assets/sfx/itens-portas/lever_pull_03.ogg +0 -0
- package/assets/sfx/itens-portas/lever_pull_04.ogg +0 -0
- package/assets/sfx/itens-portas/lever_pull_05.ogg +0 -0
- package/assets/sfx/itens-portas/lever_pull_06.ogg +0 -0
- package/assets/sfx/itens-portas/metal_latch_01.ogg +0 -0
- package/assets/sfx/itens-portas/metal_latch_02.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_01.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_02.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_03.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_04.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_05.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_06.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_07.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_08.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_09.ogg +0 -0
- package/assets/sfx/itens-portas/plates_hit_10.ogg +0 -0
- package/assets/sfx/itens-portas/plates_slide_01.ogg +0 -0
- package/assets/sfx/itens-portas/plates_slide_02.ogg +0 -0
- package/assets/sfx/itens-portas/plates_slide_03.ogg +0 -0
- package/assets/sfx/itens-portas/plates_slide_04.ogg +0 -0
- package/assets/sfx/itens-portas/saw_wood_01.ogg +0 -0
- package/assets/sfx/itens-portas/switch_click_01.ogg +0 -0
- package/assets/sfx/itens-portas/switch_click_02.ogg +0 -0
- package/assets/sfx/itens-portas/switch_click_03.ogg +0 -0
- package/assets/sfx/itens-portas/switch_click_04.ogg +0 -0
- package/assets/sfx/itens-portas/toilet_flush_01.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_01.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_02.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_03.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_04.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_05.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_06.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_07.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_08.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_09.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_10.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_11.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_12.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_13.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_14.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_15.ogg +0 -0
- package/assets/sfx/itens-portas/tools_handling_16.ogg +0 -0
- package/assets/sfx/itens-portas/water_drip_01.ogg +0 -0
- package/assets/sfx/itens-portas/water_drip_02.ogg +0 -0
- package/assets/sfx/itens-portas/water_drip_03.ogg +0 -0
- package/assets/sfx/itens-portas/water_drip_04.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_01.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_02.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_03.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_04.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_05.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_06.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_07.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_08.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_09.ogg +0 -0
- package/assets/sfx/itens-portas/water_faucet_10.ogg +0 -0
- package/assets/sfx/manifest.json +11959 -0
- package/assets/sfx/personagem/axe_chop_01.ogg +0 -0
- package/assets/sfx/personagem/axe_chop_02.ogg +0 -0
- package/assets/sfx/personagem/blunt_hit_metal_01.ogg +0 -0
- package/assets/sfx/personagem/blunt_hit_metal_02.ogg +0 -0
- package/assets/sfx/personagem/blunt_hit_metal_03.ogg +0 -0
- package/assets/sfx/personagem/blunt_hit_metal_04.ogg +0 -0
- package/assets/sfx/personagem/blunt_hit_metal_05.ogg +0 -0
- package/assets/sfx/personagem/body_fall_01.ogg +0 -0
- package/assets/sfx/personagem/body_fall_02.ogg +0 -0
- package/assets/sfx/personagem/body_fall_03.ogg +0 -0
- package/assets/sfx/personagem/body_fall_04.ogg +0 -0
- package/assets/sfx/personagem/body_fall_05.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_01.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_02.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_03.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_04.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_05.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_06.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_07.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_08.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_09.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_10.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_11.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_12.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_13.ogg +0 -0
- package/assets/sfx/personagem/cloth_rustle_14.ogg +0 -0
- package/assets/sfx/personagem/drink_gulp_01.ogg +0 -0
- package/assets/sfx/personagem/drink_gulp_02.ogg +0 -0
- package/assets/sfx/personagem/drink_gulp_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_carpet_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_carpet_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_carpet_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_carpet_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_carpet_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_run_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_run_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_run_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_run_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_run_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_walk_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_walk_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_walk_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_walk_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_concrete_walk_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_run_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_run_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_run_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_run_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_run_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_walk_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_walk_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_walk_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_walk_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_dirt_walk_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_06.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_07.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_08.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_09.ogg +0 -0
- package/assets/sfx/personagem/footstep_generic_alt_10.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt2_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt2_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt2_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt2_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_run_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_run_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_run_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_run_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_run_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_walk_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_walk_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_walk_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_walk_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_grass_walk_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_06.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_07.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_08.ogg +0 -0
- package/assets/sfx/personagem/footstep_hard_alt_09.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_run_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_run_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_run_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_run_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_run_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_walk_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_walk_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_walk_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_walk_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_metal_walk_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_run_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_run_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_run_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_run_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_run_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_walk_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_walk_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_walk_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_walk_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_snow_walk_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_alt_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_alt_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_alt_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_alt_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_alt_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_run_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_run_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_run_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_run_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_run_05.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_walk_01.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_walk_02.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_walk_03.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_walk_04.ogg +0 -0
- package/assets/sfx/personagem/footstep_wood_walk_05.ogg +0 -0
- package/assets/sfx/personagem/frying_pan_hit_01.ogg +0 -0
- package/assets/sfx/personagem/frying_pan_hit_02.ogg +0 -0
- package/assets/sfx/personagem/frying_pan_hit_03.ogg +0 -0
- package/assets/sfx/personagem/grab_01.ogg +0 -0
- package/assets/sfx/personagem/kick_hit_01.ogg +0 -0
- package/assets/sfx/personagem/kick_hit_02.ogg +0 -0
- package/assets/sfx/personagem/kick_hit_03.ogg +0 -0
- package/assets/sfx/personagem/kick_hit_04.ogg +0 -0
- package/assets/sfx/personagem/kick_hit_05.ogg +0 -0
- package/assets/sfx/personagem/knife_draw_01.ogg +0 -0
- package/assets/sfx/personagem/knife_draw_02.ogg +0 -0
- package/assets/sfx/personagem/knife_draw_03.ogg +0 -0
- package/assets/sfx/personagem/knife_scrape_01.ogg +0 -0
- package/assets/sfx/personagem/knife_slash_01.ogg +0 -0
- package/assets/sfx/personagem/knife_slash_02.ogg +0 -0
- package/assets/sfx/personagem/land_concrete_01.ogg +0 -0
- package/assets/sfx/personagem/land_concrete_02.ogg +0 -0
- package/assets/sfx/personagem/land_dirt_01.ogg +0 -0
- package/assets/sfx/personagem/land_dirt_02.ogg +0 -0
- package/assets/sfx/personagem/land_grass_01.ogg +0 -0
- package/assets/sfx/personagem/land_grass_02.ogg +0 -0
- package/assets/sfx/personagem/land_metal_01.ogg +0 -0
- package/assets/sfx/personagem/land_metal_02.ogg +0 -0
- package/assets/sfx/personagem/land_snow_01.ogg +0 -0
- package/assets/sfx/personagem/land_snow_02.ogg +0 -0
- package/assets/sfx/personagem/land_wood_01.ogg +0 -0
- package/assets/sfx/personagem/land_wood_02.ogg +0 -0
- package/assets/sfx/personagem/player_breath_run_01.ogg +0 -0
- package/assets/sfx/personagem/player_breath_run_02.ogg +0 -0
- package/assets/sfx/personagem/player_breath_run_03.ogg +0 -0
- package/assets/sfx/personagem/player_breath_run_04.ogg +0 -0
- package/assets/sfx/personagem/player_breath_run_05.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_01.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_02.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_03.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_04.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_05.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_06.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_07.ogg +0 -0
- package/assets/sfx/personagem/player_death_female_08.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_01.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_02.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_03.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_04.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_05.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_06.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_07.ogg +0 -0
- package/assets/sfx/personagem/player_death_male_08.ogg +0 -0
- package/assets/sfx/personagem/player_effort_01.ogg +0 -0
- package/assets/sfx/personagem/player_effort_02.ogg +0 -0
- package/assets/sfx/personagem/player_effort_03.ogg +0 -0
- package/assets/sfx/personagem/player_effort_04.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_female_01.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_female_02.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_female_03.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_female_04.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_female_05.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_female_06.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_male_01.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_male_02.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_male_03.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_male_04.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_male_05.ogg +0 -0
- package/assets/sfx/personagem/player_hurt_male_06.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_01.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_02.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_03.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_04.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_05.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_06.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_07.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_08.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_09.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_alt_10.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_body_01.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_body_02.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_body_03.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_body_04.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_body_05.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_body_06.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_face_01.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_face_02.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_face_03.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_face_04.ogg +0 -0
- package/assets/sfx/personagem/punch_hit_face_05.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_01.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_02.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_03.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_04.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_05.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_06.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_07.ogg +0 -0
- package/assets/sfx/personagem/punch_swing_08.ogg +0 -0
- package/assets/sfx/personagem/scream_01.ogg +0 -0
- package/assets/sfx/personagem/scream_02.ogg +0 -0
- package/assets/sfx/personagem/scream_03.ogg +0 -0
- package/assets/sfx/personagem/scream_04.ogg +0 -0
- package/assets/sfx/personagem/slap_01.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_01.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_02.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_03.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_04.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_05.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_06.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_07.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_08.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_09.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_10.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_11.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_12.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_13.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_14.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_15.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_16.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_17.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_18.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_19.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_20.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_21.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_22.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_23.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_24.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_25.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_26.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_27.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_28.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_29.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_30.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_31.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_32.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_33.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_34.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_35.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_36.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_37.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_38.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_39.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_40.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_41.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_42.ogg +0 -0
- package/assets/sfx/personagem/swing_whoosh_alt_43.ogg +0 -0
- package/assets/sfx/personagem/zombie_creature_01.ogg +0 -0
- package/assets/sfx/personagem/zombie_creature_02.ogg +0 -0
- package/assets/sfx/personagem/zombie_creature_03.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_01.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_02.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_03.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_04.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_05.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_06.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_07.ogg +0 -0
- package/assets/sfx/personagem/zombie_death_08.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_01.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_02.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_03.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_04.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_05.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_06.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_07.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_08.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_09.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_10.ogg +0 -0
- package/assets/sfx/personagem/zombie_groan_11.ogg +0 -0
- package/assets/sfx/veiculos/car_door_open_01.ogg +0 -0
- package/assets/sfx/veiculos/car_door_shut_01.ogg +0 -0
- package/assets/sfx/veiculos/car_gear_shift_01.ogg +0 -0
- package/assets/sfx/veiculos/car_trunk_shut_01.ogg +0 -0
- package/assets/sfx/veiculos/car_window_01.ogg +0 -0
- package/assets/sfx/veiculos/car_window_02.ogg +0 -0
- package/assets/sfx/veiculos/engine_loop_car_high_01.ogg +0 -0
- package/assets/sfx/veiculos/engine_loop_car_idle_01.ogg +0 -0
- package/assets/sfx/veiculos/engine_start_run_stop_01.ogg +0 -0
- package/assets/sfx/veiculos/engine_start_run_stop_02.ogg +0 -0
- package/dist/chunk-7TLFY7VO.js +4170 -0
- package/dist/chunk-7TLFY7VO.js.map +1 -0
- package/dist/index.d.ts +228 -603
- package/dist/index.global.js +2958 -463
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1088 -2044
- package/dist/index.js.map +1 -1
- package/dist/locale-BugSe8dA.d.ts +1071 -0
- package/dist/testing.d.ts +82 -0
- package/dist/testing.js +19 -0
- package/dist/testing.js.map +1 -0
- package/package.json +13 -6
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/rng.ts","../src/recipe.ts","../src/falloff.ts","../src/listener.ts","../src/data/voice-groups.json","../src/voices.ts","../src/plan.ts","../src/loops.ts","../src/data/mix-profiles.json","../src/mix.ts","../src/bank.ts","../src/data/game-sfx.json","../src/recipes/noise-class.ts","../src/recipes/scene.ts","../src/library/crowd_rumble.json","../src/library/engine_saw.json","../src/library/horn.json","../src/library/radio_static.json","../src/library/rotor_blades.json","../src/library/siren.json","../src/library/index.ts","../src/webaudio/noise.ts","../src/webaudio/chain.ts","../src/webaudio/context.ts","../src/webaudio/nodes.ts","../src/webaudio/realize-loop.ts","../src/webaudio/engine-loop.ts","../src/webaudio/engine-noise.ts","../src/webaudio/engine-queue.ts","../src/webaudio/realize-game.ts","../src/webaudio/realize-layered.ts","../src/webaudio/realize-weapon.ts","../src/webaudio/realize.ts","../src/webaudio/engine.ts","../src/webaudio/sink.ts","../src/bench/locale.ts","../src/bench/module.ts"],"sourcesContent":["const FNV_OFFSET = 0x811c9dc5\nconst FNV_PRIME = 0x01000193\nconst MIX = 0x9e3779b1\n\n/** Deterministic mulberry32 generator; floats in [0, 1). The same generator the golden tool seeds `Math.random` with, so a team routine and its recipe draw the same numbers. */\nexport function createRng(seed: number): () => number {\n let state = seed >>> 0\n return () => {\n state = (state + 0x6d2b79f5) >>> 0\n let mixed = Math.imul(state ^ (state >>> 15), state | 1)\n mixed ^= mixed + Math.imul(mixed ^ (mixed >>> 7), mixed | 61)\n return ((mixed ^ (mixed >>> 14)) >>> 0) / 4294967296\n }\n}\n\n/** The seed of the stream called `name` (or numbered `name`): one seed gives each channel its own sequence, so one subject's sounds never shift another's. */\nexport function streamSeed(seed: number, name: string | number): number {\n const label = String(name)\n let hash = FNV_OFFSET\n for (let index = 0; index < label.length; index++) hash = Math.imul(hash ^ label.charCodeAt(index), FNV_PRIME) >>> 0\n return Math.imul((seed >>> 0) ^ hash, MIX) >>> 0\n}\n\nexport function streamFor(seed: number, name: string | number): () => number {\n return createRng(streamSeed(seed, name))\n}\n\n/** `min + random × (max − min)`: the form every team routine uses (`95 + Math.random() * 40`). */\nexport function drawBetween(random: () => number, min: number, max: number): number {\n return min + random() * (max - min)\n}\n","/**\n * Sound recipes are data. A recipe says which nodes a sound has and which numbers drive them; ranges are drawn when the sound is planned, in\n * the order the fields are written (see `planSound`), so a recipe ported from a team routine draws its random numbers in the routine's order.\n */\n\nexport const BUS_IDS = ['weapons', 'voices', 'world', 'ambience', 'weather', 'ui'] as const\nexport type BusId = (typeof BUS_IDS)[number]\n\n/** A named number: from `PlayOptions.params` or the recipe's `vars`, times `scale`, plus `add`. */\nexport type ParamRef = { readonly param: string; readonly scale?: number; readonly add?: number }\n\n/** A number, a `[min, max]` drawn uniformly (`min + random × (max − min)`), or a named number. */\nexport type Range = number | readonly [min: number, max: number] | ParamRef\n\n/** Seconds from the layer start: a range, the layer `'duration'`, or `'0.6d'` (0.6 × the layer duration). */\nexport type Time = Range | 'duration' | `${number}d`\n\nexport type Curve = 'linear' | 'exp'\n\n/**\n * How an AudioParam moves:\n * - `{ set }` assigns `.value`;\n * - `{ set, to, curve, over }` assigns `.value`, then ramps to `to` at `over`;\n * - `{ from }` calls `setValueAtTime(from)` at the start; with `to`, `curve` and `over` it then ramps to `to` (`'from'` is the value drawn for `from`: the art scene ramps a tone back to its own start when it gives no end).\n */\nexport type Automation =\n | { readonly set: Range; readonly to?: Range | 'from'; readonly curve?: Curve; readonly over?: Time }\n | { readonly from: Range; readonly to?: Range | 'from'; readonly curve?: Curve; readonly over?: Time }\n\n/**\n * One gain point: time (seconds, or `'0.6d'`), value and how it is reached (`set` = `setValueAtTime`, or a ramp). The value is multiplied by the\n * layer level (volume, distance and layer gain) except when the fourth item is `'fixed'` (the floor a ramp falls to, such as 0.001).\n */\nexport type EnvelopePoint =\n | readonly [time: number | `${number}d`, value: number, curve: 'set' | Curve]\n | readonly [time: number | `${number}d`, value: number, curve: 'set' | Curve, fixed: 'fixed']\nexport type Envelope = readonly EnvelopePoint[]\n\nexport type FilterSpec = {\n readonly type: BiquadFilterType\n readonly frequency: Automation\n readonly q?: Range\n /** The BiquadFilter gain (shelf and peaking types). */\n readonly gain?: Range\n /** A gain node after the filter, for a parallel bank where each band has its own level (the game's scream formants). */\n readonly level?: Range\n}\n\nexport type FilterBank = { readonly mode: 'serial' | 'parallel'; readonly bank: readonly FilterSpec[] }\n\n/** An LFO. `depth` is absolute, or a factor of the source start frequency. With `base`, gain modulation goes through its own gain stage (the game rotor). */\nexport type Modulator = {\n readonly target: 'gain' | 'frequency'\n /** Left out, the oscillator keeps its default (sine) and no type is set. */\n readonly wave?: OscillatorType\n readonly rate: Range\n readonly depth: Range | { readonly scaleOf: 'frequency'; readonly factor: number }\n readonly base?: number\n}\n\n/**\n * Noise from the engine's seeded buffer. `offset` is where playback starts in it: `'random'` (random × `offsetScale`, default 1), `'fit'`\n * (random × (buffer length − duration)) or seconds. `loop` sets the source to loop (the art scene sets it on every noise source).\n */\nexport type NoiseSource = {\n readonly kind: 'noise'\n readonly offset?: 'random' | 'fit' | number\n readonly offsetScale?: number\n readonly loop?: boolean\n}\n\nexport type OscSource = { readonly kind: 'osc'; readonly wave: OscillatorType; readonly frequency: Automation }\n\n/** The art scene's `voice`: an oscillator with vibrato through formant bands, plus a band of breath noise, summed and boosted. */\nexport type FormantVoiceSource = {\n readonly kind: 'formant_voice'\n readonly wave: OscillatorType\n readonly frequency: Automation\n /** Vibrato rate, and depth as a factor of the start frequency. */\n readonly vibrato: { readonly rate: Range; readonly depth: number }\n readonly formants: readonly { readonly frequency: Range; readonly q: number }[]\n readonly breath: { readonly frequency: Range; readonly q: number; readonly gain: Range }\n readonly mix: number\n}\n\nexport type LayerSource = NoiseSource | OscSource | FormantVoiceSource\n\nexport type Layer = {\n /** Start, seconds after the sound starts. */\n readonly at?: Range\n /** Overrides the recipe duration for this layer. */\n readonly duration?: Range\n /** Seconds the source keeps running after the duration (the `+ 0.05` of the team routines). Default: the recipe's, else 0.05. */\n readonly tail?: number\n /** The layer played `count` times, `spacing` seconds apart (the game's animal calls). */\n readonly repeat?: { readonly count: number; readonly spacing: number }\n /** Layer level before distance. Default 1. */\n readonly gain?: Range\n /** Send to the reverb, 0..1 or more (the art scene uses up to 1.2). */\n readonly wet?: number\n readonly source: LayerSource\n readonly filters?: FilterBank\n readonly modulators?: readonly Modulator[]\n readonly envelope: Envelope\n}\n\n/**\n * Distance falloff of a sound's level:\n * - `inverse_square`: `volume / (1 + d² × k)`; `cutoffK` also divides every lowpass cutoff by `1 + d × cutoffK` (the game's muffling);\n * - `linear`: `max(0, 1 − d / range)`, silent at or below `minGain`;\n * - `none`: no distance.\n * `scale` multiplies the level (the game's boom is 1.4 at the source), and below `minGain` the sound is not played.\n */\nexport type Falloff =\n | { readonly model: 'inverse_square'; readonly k: number; readonly minGain?: number; readonly cutoffK?: number; readonly scale?: number }\n | { readonly model: 'linear'; readonly range: number; readonly minGain?: number; readonly scale?: number }\n | { readonly model: 'none' }\n\n/**\n * The order the realizer creates and wires the nodes in. Each one is the order of the team routine it reproduces, so the trace of the SDK\n * matches the trace of the team code node for node:\n * - `layered` (default): the art scene's `sNoise`, `sTone` and `voice`; every layer has its own output stage (distance gain, pan, reverb send);\n * - `burst`: the game's `sfx` (jogo L62089);\n * - `scream`: the game's `grito` (L62128);\n * - `groan`: the game's `voz` (L62143);\n * - `boom`: the game's `boom` (L68278);\n * - `static`: the game's `chiado` (L69998);\n * - `chord`: the game's `buzina` (L70272);\n * - `calls`: the game's `bichoSom` (L66625);\n * - `siren`: the art scene's `siren` (L1369);\n * - `weapon`: the weapon audio of the kit (`weapons-three`): per layer a filtered noise burst or an oscillator, then its own gain, chained to the bus.\n * Every order but `layered` puts the level into the envelope and connects straight to the bus.\n */\nexport const BUILD_ORDERS = ['layered', 'burst', 'scream', 'groan', 'boom', 'static', 'chord', 'calls', 'siren', 'weapon'] as const\nexport type BuildOrder = (typeof BUILD_ORDERS)[number]\n\nexport type SoundRecipe = {\n readonly id: string\n readonly bus: BusId\n readonly order?: BuildOrder\n /** Named numbers drawn first, in the order written; layers read them with `{ param }`. */\n readonly vars?: Readonly<Record<string, Range>>\n readonly duration?: Range\n readonly tail?: number\n readonly layers: readonly Layer[]\n readonly falloff?: Falloff\n /** Stereo pan from the listener (the art scene's `panFor`). Only the `layered` order has an output stage to pan. */\n readonly pan?: boolean\n /** Voice group for the limiter (`undead_voice`...). */\n readonly group?: string\n /** Limiter priority; default from the bus (weapons > voices > world > ambience). */\n readonly priority?: number\n /**\n * The team routine creates nodes before it checks the level (the game's `bichoSom` creates its gain and filter first): a silent sound is kept as\n * a plan with `silent: true` so the realizer repeats those nodes. Off by default.\n */\n readonly keepSilent?: boolean\n /** Where the numbers come from: `\"jogo:L62128\"`, `\"cena:L1342\"`, or `\"sdk\"` for values the kit chose. */\n readonly sources: readonly string[]\n}\n\n/**\n * The order the loop realizer creates the nodes in:\n * - `game_loop`: the game's `loopSet` (L62109): gain and filter first, nodes created the first time the volume passes `startAbove`, gain from 0;\n * - `chain_loop`: the art scene's loops in `initAudio` (L1314–1316): source, filters, gain at its starting volume, created when the loop opens.\n */\nexport type LoopOrder = 'game_loop' | 'chain_loop'\n\nexport type LoopRecipe = {\n readonly id: string\n readonly bus: BusId\n readonly order?: LoopOrder\n /** An oscillator loop may leave the frequency out: it starts at the default and `set({ frequency })` glides it (the game's motor). */\n readonly source: (NoiseSource & { readonly loop: true }) | { readonly kind: 'osc'; readonly wave: OscillatorType; readonly frequency?: Automation; readonly loop: true }\n readonly filters?: FilterBank\n readonly modulators?: readonly Modulator[]\n /** `setTargetAtTime` time constants (jogo L62125–62126: 0.15 for the volume, 0.08 for the frequency). */\n readonly smoothing?: { readonly volume: number; readonly frequency: number }\n /** Nodes are created the first time the volume reaches this (jogo L62112: 0.002). */\n readonly startAbove?: number\n /** Volume the gain starts at when the loop opens (`chain_loop`). */\n readonly volume?: number\n readonly sources: readonly string[]\n}\n\nexport type SoundBank = {\n readonly id: string\n readonly sounds?: readonly SoundRecipe[]\n readonly loops?: readonly LoopRecipe[]\n}\n","import type { Falloff } from './recipe'\n\n/** The distance curves of the team routines, by name. Each recipe carries its own; these are the values to copy. */\nexport const DISTANCE_CURVES = {\n /** The game's `sfx`: `vol / (1 + d² × 0.004)`, cutoff `/ (1 + d × 0.01)`, silent below 0.01 (jogo L62091–62092, L62101). */\n game_sfx: { model: 'inverse_square', k: 0.004, cutoffK: 0.01, minGain: 0.01 },\n /** The game's `grito`: `1 / (1 + d² × 0.006)`, silent below 0.02 (jogo L62129–62130). */\n game_scream: { model: 'inverse_square', k: 0.006, minGain: 0.02 },\n /** The game's `voz`: `1 / (1 + d² × 0.01)`, silent below 0.02 (jogo L62146–62147). */\n game_voice: { model: 'inverse_square', k: 0.01, minGain: 0.02 },\n /** The game's `boom`: `1.4 / (1 + d² × 0.002)`, never silent (jogo L68280). */\n game_boom: { model: 'inverse_square', k: 0.002, scale: 1.4 },\n /** The art scene's `outAt`: `vol / (1 + d² × 0.008)` (cena L1320). */\n art_scene: { model: 'inverse_square', k: 0.008 },\n /** The game's animal calls: `max(0, 1 − d / 70) × 0.25`, silent at or below 0.005 (jogo L66627–66628). */\n animals: { model: 'linear', range: 70, scale: 0.25, minGain: 0.005 },\n} as const satisfies Readonly<Record<string, Falloff>>\n\nexport type DistanceCurveName = keyof typeof DISTANCE_CURVES\n\n/** The level at `distance` for a sound at `volume`, before the recipe's envelope. */\nexport function falloffGain(falloff: Falloff | undefined, volume: number, distance: number): number {\n if (!falloff || falloff.model === 'none') return volume\n if (falloff.model === 'linear') {\n const level = Math.max(0, 1 - distance / falloff.range) * volume\n return falloff.scale === undefined ? level : level * falloff.scale\n }\n const level = volume / (1 + distance * distance * falloff.k)\n return falloff.scale === undefined ? level : falloff.scale * level\n}\n\n/** Whether a level is too quiet to play: below `minGain` (the game's `att < 0.01`), or at or below it for `linear` (the animal calls' `v <= 0.005`). */\nexport function isSilent(falloff: Falloff | undefined, gain: number): boolean {\n if (!falloff || falloff.model === 'none' || falloff.minGain === undefined) return false\n return falloff.model === 'linear' ? gain <= falloff.minGain : gain < falloff.minGain\n}\n\n/** What every lowpass cutoff is divided by at `distance` (1 when the curve has no muffling). */\nexport function cutoffDivisor(falloff: Falloff | undefined, distance: number): number {\n if (!falloff || falloff.model !== 'inverse_square' || falloff.cutoffK === undefined) return 1\n return 1 + distance * falloff.cutoffK\n}\n","import type { Vec3 } from '@adatechnology/game-contracts'\n\n/** Where the ears are. `yaw` turns around y like a three.js camera: the right ear points at `(cos yaw, 0, −sin yaw)`. */\nexport type Listener = { readonly position: Vec3; readonly yaw: number }\n\nexport type DistanceMode = 'xz' | '3d'\n\nexport const DEFAULT_LISTENER: Listener = { position: [0, 0, 0], yaw: 0 }\n\n/** The art scene clamps the pan to ±0.85 and never divides by less than 2 m (cena L1319). */\nexport const PAN_LIMIT = 0.85\nexport const PAN_MIN_DISTANCE = 2\n\n/** Distance from the listener: on the ground (`xz`, the teams' choice) or in 3D. */\nexport function listenerDistance(listener: Listener, position: Vec3, mode: DistanceMode = 'xz'): number {\n const dx = position[0] - listener.position[0]\n const dz = position[2] - listener.position[2]\n if (mode === 'xz') return Math.hypot(dx, dz)\n return Math.hypot(dx, position[1] - listener.position[1], dz)\n}\n\n/** The art scene's `panFor`: the side the sound is on, −0.85 (left) to 0.85 (right). No HRTF, for cost. */\nexport function panFor(listener: Listener, position: Vec3): number {\n const rightX = Math.cos(listener.yaw)\n const rightZ = -Math.sin(listener.yaw)\n const dx = position[0] - listener.position[0]\n const dz = position[2] - listener.position[2]\n const distance = Math.hypot(dx, dz) || 1\n const pan = (dx * rightX + dz * rightZ) / Math.max(distance, PAN_MIN_DISTANCE)\n return pan < -PAN_LIMIT ? -PAN_LIMIT : pan > PAN_LIMIT ? PAN_LIMIT : pan\n}\n","{\n \"undead_voice\": {\n \"maxConcurrent\": 5,\n \"cooldown\": 0.25,\n \"maxDistance\": 40,\n \"sources\": [\n \"cena:L1342 `AU.groans > 4` refuses, so five play at once\",\n \"jogo:L66986 one groan every 0.25 s (`groanBudget`), only nearer than 40 m\",\n \"jogo:L70472 the budget counts down by the frame time\"\n ]\n }\n}\n","import voiceGroupsJson from './data/voice-groups.json'\nimport type { BusId } from './recipe'\n\n/**\n * Rules for a group of voices (`undead_voice`...). A request passes when every rule passes:\n * - `maxConcurrent`: at most this many of the group play at once (`steal` replaces the group's oldest instead of refusing);\n * - `cooldown`: seconds after an accepted voice before the next one (the game's `groanBudget`, jogo L66986 and L70472);\n * - `maxDistance`: only voices nearer than this (the game's `d < 40`).\n */\nexport type VoiceGroup = {\n readonly maxConcurrent?: number\n readonly cooldown?: number\n readonly maxDistance?: number\n readonly steal?: boolean\n readonly sources?: readonly string[]\n}\n\n/** `undead_voice`: the art scene's five at once with the game's 0.25 s cooldown and 40 m. */\nexport const VOICE_GROUPS: Readonly<Record<string, VoiceGroup>> = voiceGroupsJson\n\n/** Q7: weapons > voices > world > ambience; the interface above all, weather with the ambience. */\nexport const BUS_PRIORITY: Readonly<Record<BusId, number>> = { ui: 5, weapons: 4, voices: 3, world: 2, weather: 1, ambience: 1 }\nexport const DEFAULT_MAX_VOICES = 32\n\nexport function busPriority(bus: BusId): number {\n return BUS_PRIORITY[bus]\n}\n\nexport type VoiceRequest = {\n readonly group?: string\n readonly priority: number\n /** Planned level; the global cap drops the lowest `priority × gain`. */\n readonly gain: number\n readonly distance?: number\n /** Seconds the voice lasts. */\n readonly length: number\n}\n\nexport type VoiceRefusal = 'cooldown' | 'distance' | 'group_full' | 'global_full'\n\nexport type VoiceDecision =\n | { readonly accepted: true; readonly id: number; readonly evicted: readonly number[] }\n | { readonly accepted: false; readonly reason: VoiceRefusal }\n\nexport type VoiceStats = { readonly active: number; readonly peak: number; readonly dropped: number; readonly maxVoices: number }\n\nexport type VoiceManager = {\n request(request: VoiceRequest): VoiceDecision\n /** Ends a voice early (stopped by the host). */\n release(id: number): void\n /** Sets how long an accepted voice lasts (the engine admits a voice before its random length is drawn). */\n setLength(id: number, seconds: number): void\n /** Moves time on: cooldowns count down and finished voices leave. Returns the ids that ended. */\n advance(dt: number): number[]\n setGroup(id: string, group: VoiceGroup | undefined): void\n stats(): VoiceStats\n}\n\nexport type VoiceManagerOptions = {\n /** Default `VOICE_GROUPS`. */\n readonly groups?: Readonly<Record<string, VoiceGroup>>\n readonly maxVoices?: number\n}\n\ntype ActiveVoice = { readonly id: number; readonly group?: string; readonly score: number; remaining: number }\n\n/** The voice limiter: per-group rules, a global cap and priority dropping. Pure and time-driven (`advance`), so goldens script it frame by frame. */\nexport function createVoiceManager(options: VoiceManagerOptions = {}): VoiceManager {\n const groups = new Map(Object.entries(options.groups ?? VOICE_GROUPS))\n const maxVoices = options.maxVoices ?? DEFAULT_MAX_VOICES\n const budgets = new Map<string, number>()\n let voices: ActiveVoice[] = []\n let nextId = 1\n let peak = 0\n let dropped = 0\n\n const refuse = (reason: VoiceRefusal): VoiceDecision => {\n dropped += 1\n return { accepted: false, reason }\n }\n\n const groupCheck = (request: VoiceRequest, evicted: number[]): VoiceRefusal | undefined => {\n const group = request.group === undefined ? undefined : groups.get(request.group)\n if (!group) return undefined\n if (group.maxDistance !== undefined && !((request.distance ?? 0) < group.maxDistance)) return 'distance'\n if (group.cooldown !== undefined && (budgets.get(request.group as string) ?? 0) > 0) return 'cooldown'\n const members = voices.filter((voice) => voice.group === request.group)\n if (group.maxConcurrent === undefined || members.length < group.maxConcurrent) return undefined\n if (!group.steal) return 'group_full'\n evicted.push((members[0] as ActiveVoice).id)\n return undefined\n }\n\n return {\n request(request) {\n const evicted: number[] = []\n const refusal = groupCheck(request, evicted)\n if (refusal) return refuse(refusal)\n const score = request.priority * request.gain\n const remaining = voices.filter((voice) => !evicted.includes(voice.id))\n if (remaining.length >= maxVoices) {\n const lowest = remaining.reduce((low, voice) => (voice.score < low.score ? voice : low))\n if (score <= lowest.score) return refuse('global_full')\n evicted.push(lowest.id)\n dropped += 1\n }\n const group = request.group === undefined ? undefined : groups.get(request.group)\n if (group?.cooldown !== undefined) budgets.set(request.group as string, group.cooldown)\n const id = nextId++\n voices = [...voices.filter((voice) => !evicted.includes(voice.id)), { id, ...(request.group === undefined ? {} : { group: request.group }), score, remaining: request.length }]\n peak = Math.max(peak, voices.length)\n return { accepted: true, id, evicted }\n },\n release(id) {\n voices = voices.filter((voice) => voice.id !== id)\n },\n setLength(id, seconds) {\n const voice = voices.find((entry) => entry.id === id)\n if (voice) voice.remaining = seconds\n },\n advance(dt) {\n for (const [group, budget] of budgets) budgets.set(group, budget - dt)\n const ended: number[] = []\n for (const voice of voices) {\n voice.remaining -= dt\n if (voice.remaining <= 0) ended.push(voice.id)\n }\n if (ended.length > 0) voices = voices.filter((voice) => voice.remaining > 0)\n return ended\n },\n setGroup(id, group) {\n if (group) groups.set(id, group)\n else groups.delete(id)\n },\n stats: () => ({ active: voices.length, peak, dropped, maxVoices }),\n }\n}\n","import type { Vec3 } from '@adatechnology/game-contracts'\n\nimport { cutoffDivisor, falloffGain, isSilent } from './falloff'\nimport { DEFAULT_LISTENER, listenerDistance, panFor } from './listener'\nimport type { DistanceMode, Listener } from './listener'\nimport type { Automation, BuildOrder, BusId, Curve, Envelope, FilterSpec, Layer, LayerSource, Modulator, Range, SoundRecipe, Time } from './recipe'\nimport { createRng } from './rng'\nimport { busPriority } from './voices'\n\n/** How an AudioParam moves, with every number resolved and every time in seconds from the layer start. */\nexport type PlannedAutomation = {\n /** Assigned to `.value`. */\n readonly value?: number\n /** `setValueAtTime(from)` at the layer start. */\n readonly from?: number\n /** Ramp target, reached `at` seconds after the layer start. */\n readonly to?: number\n readonly curve?: Curve\n readonly at?: number\n}\n\nexport type PlannedFilter = {\n readonly type: BiquadFilterType\n readonly frequency: PlannedAutomation\n readonly q?: number\n readonly gain?: number\n readonly level?: number\n}\n\nexport type PlannedModulator = {\n readonly target: 'gain' | 'frequency'\n readonly wave?: OscillatorType\n readonly rate: number\n readonly depth: number\n readonly base?: number\n}\n\nexport type PlannedSource =\n | { readonly kind: 'noise'; readonly offset: number; readonly loop: boolean }\n | { readonly kind: 'osc'; readonly wave: OscillatorType; readonly frequency: PlannedAutomation }\n | {\n readonly kind: 'formant_voice'\n readonly wave: OscillatorType\n readonly frequency: PlannedAutomation\n readonly vibrato: { readonly rate: number; readonly depth: number }\n readonly formants: readonly { readonly frequency: number; readonly q: number }[]\n readonly breath: { readonly frequency: number; readonly q: number; readonly gain: number; readonly offset: number }\n readonly mix: number\n }\n\nexport type PlannedEnvelopePoint = { readonly time: number; readonly value: number; readonly curve: 'set' | Curve }\n\nexport type PlannedLayer = {\n readonly at: number\n readonly duration: number\n readonly tail: number\n /** Layer gain × the sound's level: in the envelope for every order but `layered`, in the output stage for `layered`. */\n readonly level: number\n readonly wet?: number\n readonly source: PlannedSource\n readonly filters?: { readonly mode: 'serial' | 'parallel'; readonly bank: readonly PlannedFilter[] }\n readonly modulators: readonly PlannedModulator[]\n readonly envelope: readonly PlannedEnvelopePoint[]\n}\n\n/** A sound with every number decided: what the realizer builds, what goldens compare and what the bench sheet prints. */\nexport type SoundPlan = {\n readonly id: string\n readonly bus: BusId\n readonly order: BuildOrder\n readonly group?: string\n readonly priority: number\n /** The level from volume and distance, before layer gains. */\n readonly level: number\n readonly distance: number\n readonly pan?: number\n /** Too quiet to hear, kept only for a recipe with `keepSilent`. */\n readonly silent: boolean\n /** Seconds until the last source stops. */\n readonly length: number\n readonly layers: readonly PlannedLayer[]\n}\n\nexport type PlanInput = {\n /** Where the numbers are drawn from. Default: a fresh stream with seed 1. */\n readonly random?: () => number\n readonly volume?: number\n /** Distance in meters; overrides `position`. */\n readonly distance?: number\n readonly position?: Vec3\n readonly listener?: Listener\n readonly distanceMode?: DistanceMode\n readonly params?: Readonly<Record<string, number>>\n /** 0..1 from the host's occlusion callback: gain × (1 − 0.5 × o), lowpass cutoffs × (1 − 0.6 × o). */\n readonly occlusion?: number\n /** Length of the noise buffer, for `offset: 'fit'`. Default 1.5. */\n readonly noiseSeconds?: number\n}\n\nconst DEFAULT_TAIL = 0.05\nconst DEFAULT_NOISE_SECONDS = 1.5\nconst OCCLUSION_GAIN = 0.5\nconst OCCLUSION_CUTOFF = 0.6\n\ntype Scope = { readonly random: () => number; readonly params: Record<string, number> }\n\nfunction isParamRef(range: Range): range is Extract<Range, { readonly param: string }> {\n return typeof range === 'object' && !Array.isArray(range)\n}\n\nfunction draw(range: Range, scope: Scope): number {\n if (typeof range === 'number') return range\n if (isParamRef(range)) {\n const value = scope.params[range.param]\n if (value === undefined) throw new Error(`game-audio: the recipe reads the param \"${range.param}\", which was not given`)\n return value * (range.scale ?? 1) + (range.add ?? 0)\n }\n const [min, max] = range as readonly [number, number]\n return min + scope.random() * (max - min)\n}\n\n// a time is drawn now when it is a range; 'duration' and '0.6d' wait for the layer duration\ntype PendingTime = number | 'duration' | `${number}d`\n\nfunction drawTime(time: Time, scope: Scope): PendingTime {\n if (time === 'duration' || (typeof time === 'string' && time.endsWith('d'))) return time as PendingTime\n return draw(time as Range, scope)\n}\n\nfunction timeOf(time: PendingTime, duration: number): number {\n if (typeof time === 'number') return time\n if (time === 'duration') return duration\n return Number(time.slice(0, -1)) * duration\n}\n\ntype PendingAutomation = { value?: number; from?: number; to?: number; curve?: Curve; over?: PendingTime }\n\nfunction drawAutomation(automation: Automation, scope: Scope): PendingAutomation {\n const pending: PendingAutomation = {}\n for (const key of Object.keys(automation)) {\n if (key === 'set' && 'set' in automation) pending.value = draw(automation.set, scope)\n else if (key === 'from' && 'from' in automation) pending.from = draw(automation.from, scope)\n else if (key === 'to' && automation.to !== undefined) pending.to = automation.to === 'from' ? (pending.from ?? pending.value ?? 0) : draw(automation.to, scope)\n else if (key === 'curve') pending.curve = automation.curve\n else if (key === 'over' && automation.over !== undefined) pending.over = drawTime(automation.over, scope)\n }\n return pending\n}\n\nfunction finishAutomation(pending: PendingAutomation, duration: number): PlannedAutomation {\n if (pending.from !== undefined && pending.to === undefined) return { from: pending.from }\n if (pending.from !== undefined) return { from: pending.from, to: pending.to, curve: pending.curve ?? 'linear', at: timeOf(pending.over ?? 'duration', duration) }\n if (pending.to === undefined || pending.over === undefined) return { value: pending.value }\n return { value: pending.value, to: pending.to, curve: pending.curve ?? 'linear', at: timeOf(pending.over, duration) }\n}\n\nconst startFrequency = (automation: PendingAutomation): number => automation.from ?? automation.value ?? 0\n\ntype PendingFilter = { spec: FilterSpec; frequency: PendingAutomation; q?: number; gain?: number; level?: number }\n\nfunction drawFilter(spec: FilterSpec, scope: Scope): PendingFilter {\n const pending: PendingFilter = { spec, frequency: {} }\n for (const key of Object.keys(spec)) {\n if (key === 'frequency') pending.frequency = drawAutomation(spec.frequency, scope)\n else if (key === 'q' && spec.q !== undefined) pending.q = draw(spec.q, scope)\n else if (key === 'gain' && spec.gain !== undefined) pending.gain = draw(spec.gain, scope)\n else if (key === 'level' && spec.level !== undefined) pending.level = draw(spec.level, scope)\n }\n return pending\n}\n\ntype PendingModulator = { modulator: Modulator; rate: number; depth?: number }\n\nfunction drawModulator(modulator: Modulator, scope: Scope): PendingModulator {\n const pending: PendingModulator = { modulator, rate: 0 }\n for (const key of Object.keys(modulator)) {\n if (key === 'rate') pending.rate = draw(modulator.rate, scope)\n else if (key === 'depth' && !(typeof modulator.depth === 'object' && 'scaleOf' in modulator.depth)) pending.depth = draw(modulator.depth as Range, scope)\n }\n return pending\n}\n\ntype PendingVoice = { frequency: PendingAutomation; vibratoRate: number; formants: { frequency: number; q: number }[]; breath: { frequency: number; q: number; gain: number } }\n\nfunction drawVoice(source: Extract<LayerSource, { kind: 'formant_voice' }>, scope: Scope): PendingVoice {\n const pending: PendingVoice = { frequency: {}, vibratoRate: 0, formants: [], breath: { frequency: 0, q: source.breath.q, gain: 0 } }\n for (const key of Object.keys(source)) {\n if (key === 'frequency') pending.frequency = drawAutomation(source.frequency, scope)\n else if (key === 'vibrato') pending.vibratoRate = draw(source.vibrato.rate, scope)\n else if (key === 'formants') pending.formants = source.formants.map((formant) => ({ frequency: draw(formant.frequency, scope), q: formant.q }))\n else if (key === 'breath') pending.breath = { frequency: draw(source.breath.frequency, scope), q: source.breath.q, gain: draw(source.breath.gain, scope) }\n }\n return pending\n}\n\ntype LayerDefaults = { readonly duration?: number; readonly tail?: number; readonly noiseSeconds: number }\n\ntype PendingLayer = {\n at: number\n duration?: number\n gain: number\n automation?: PendingAutomation\n voice?: PendingVoice\n filters: PendingFilter[]\n modulators: PendingModulator[]\n}\n\nfunction drawLayer(layer: Layer, scope: Scope): PendingLayer {\n const pending: PendingLayer = { at: 0, gain: 1, filters: [], modulators: [] }\n for (const key of Object.keys(layer)) {\n if (key === 'at' && layer.at !== undefined) pending.at = draw(layer.at, scope)\n else if (key === 'duration' && layer.duration !== undefined) pending.duration = draw(layer.duration, scope)\n else if (key === 'gain' && layer.gain !== undefined) pending.gain = draw(layer.gain, scope)\n else if (key === 'source' && layer.source.kind === 'osc') pending.automation = drawAutomation(layer.source.frequency, scope)\n else if (key === 'source' && layer.source.kind === 'formant_voice') pending.voice = drawVoice(layer.source, scope)\n else if (key === 'filters' && layer.filters) pending.filters = layer.filters.bank.map((spec) => drawFilter(spec, scope))\n else if (key === 'modulators' && layer.modulators) pending.modulators = layer.modulators.map((modulator) => drawModulator(modulator, scope))\n }\n return pending\n}\n\n// the team code draws the noise start point when the source starts, after every other number of the layer\nfunction drawOffset(source: LayerSource, duration: number, scope: Scope, noiseSeconds: number): number {\n if (source.kind === 'formant_voice') return scope.random()\n if (source.kind !== 'noise' || source.offset === undefined) return 0\n if (typeof source.offset === 'number') return source.offset\n if (source.offset === 'fit') return scope.random() * Math.max(0, noiseSeconds - duration)\n return scope.random() * (source.offsetScale ?? 1)\n}\n\nfunction finishSource(layer: Layer, pending: PendingLayer, duration: number, offset: number): PlannedSource {\n const source = layer.source\n if (source.kind === 'noise') return { kind: 'noise', offset, loop: source.loop === true }\n if (source.kind === 'osc') return { kind: 'osc', wave: source.wave, frequency: finishAutomation(pending.automation ?? {}, duration) }\n const voice = pending.voice as PendingVoice\n return {\n kind: 'formant_voice',\n wave: source.wave,\n frequency: finishAutomation(voice.frequency, duration),\n vibrato: { rate: voice.vibratoRate, depth: startFrequency(voice.frequency) * source.vibrato.depth },\n formants: voice.formants,\n breath: { ...voice.breath, offset },\n mix: source.mix,\n }\n}\n\nfunction finishModulator(pending: PendingModulator, sourceFrequency: number): PlannedModulator {\n const { modulator } = pending\n const depth = typeof modulator.depth === 'object' && 'scaleOf' in modulator.depth ? sourceFrequency * modulator.depth.factor : (pending.depth ?? 0)\n return { target: modulator.target, ...(modulator.wave ? { wave: modulator.wave } : {}), rate: pending.rate, depth, ...(modulator.base === undefined ? {} : { base: modulator.base }) }\n}\n\nfunction finishEnvelope(envelope: Envelope, duration: number, level: number): PlannedEnvelopePoint[] {\n return envelope.map(([time, value, curve, fixed]) => ({ time: timeOf(time, duration), value: fixed === 'fixed' ? value : value * level, curve }))\n}\n\nfunction planLayer(layer: Layer, scope: Scope, defaults: LayerDefaults, levelInEnvelope: boolean, soundLevel: number): PlannedLayer[] {\n const pending = drawLayer(layer, scope)\n const duration = pending.duration ?? defaults.duration\n if (duration === undefined) throw new Error('game-audio: a layer needs a duration (its own or the recipe’s)')\n const offset = drawOffset(layer.source, duration, scope, defaults.noiseSeconds)\n const level = pending.gain * soundLevel\n const sourceFrequency = layer.source.kind === 'noise' ? 0 : startFrequency(pending.automation ?? pending.voice?.frequency ?? {})\n const planned: PlannedLayer = {\n at: pending.at,\n duration,\n tail: layer.tail ?? defaults.tail ?? DEFAULT_TAIL,\n level,\n ...(layer.wet === undefined ? {} : { wet: layer.wet }),\n source: finishSource(layer, pending, duration, offset),\n ...(layer.filters\n ? {\n filters: {\n mode: layer.filters.mode,\n bank: pending.filters.map(({ spec, frequency, q, gain, level: filterLevel }) => ({\n type: spec.type,\n frequency: finishAutomation(frequency, duration),\n ...(q === undefined ? {} : { q }),\n ...(gain === undefined ? {} : { gain }),\n ...(filterLevel === undefined ? {} : { level: filterLevel }),\n })),\n },\n }\n : {}),\n modulators: pending.modulators.map((modulator) => finishModulator(modulator, sourceFrequency)),\n envelope: finishEnvelope(layer.envelope, duration, levelInEnvelope ? level : 1),\n }\n if (!layer.repeat) return [planned]\n return Array.from({ length: layer.repeat.count }, (_, index) => ({ ...planned, at: planned.at + index * (layer.repeat?.spacing ?? 0) }))\n}\n\nfunction scaleAutomation(automation: PlannedAutomation, divisor: number): PlannedAutomation {\n const scale = (value: number | undefined): number | undefined => (value === undefined ? undefined : value / divisor)\n const scaled: Record<string, unknown> = { ...automation }\n for (const key of ['value', 'from', 'to'] as const) if (automation[key] !== undefined) scaled[key] = scale(automation[key])\n return scaled as PlannedAutomation\n}\n\n// distance muffling and occlusion lower every lowpass cutoff of the sound\nfunction muffle(layer: PlannedLayer, divisor: number): PlannedLayer {\n if (divisor === 1 || !layer.filters) return layer\n const bank = layer.filters.bank.map((filter) => (filter.type === 'lowpass' ? { ...filter, frequency: scaleAutomation(filter.frequency, divisor) } : filter))\n return { ...layer, filters: { ...layer.filters, bank } }\n}\n\nconst layerEnd = (layer: PlannedLayer): number => layer.at + layer.duration + layer.tail\n\n/**\n * Turns a recipe into a plan: pure, Node-safe, the same plan for the same `random`. Numbers are drawn in this order: `vars` (in the order written),\n * `duration`, then each layer in the order its fields are written, the noise start point last in its layer. A sound below its falloff's `minGain`\n * gives `null` (or a silent plan with `keepSilent`) before any number is drawn.\n */\nexport function planSound(recipe: SoundRecipe, input: PlanInput = {}): SoundPlan | null {\n const listener = input.listener ?? DEFAULT_LISTENER\n const distance = input.distance ?? (input.position ? listenerDistance(listener, input.position, input.distanceMode) : 0)\n const occlusion = Math.min(1, Math.max(0, input.occlusion ?? 0))\n const order = recipe.order ?? 'layered'\n const falloffLevel = falloffGain(recipe.falloff, input.volume ?? 1, distance)\n const level = occlusion > 0 ? falloffLevel * (1 - OCCLUSION_GAIN * occlusion) : falloffLevel\n const silent = isSilent(recipe.falloff, falloffLevel)\n const base = {\n id: recipe.id,\n bus: recipe.bus,\n order,\n ...(recipe.group === undefined ? {} : { group: recipe.group }),\n priority: recipe.priority ?? busPriority(recipe.bus),\n level,\n distance,\n ...(recipe.pan ? { pan: input.position ? panFor(listener, input.position) : 0 } : {}),\n }\n if (silent) return recipe.keepSilent ? { ...base, silent: true, length: 0, layers: [] } : null\n\n const scope: Scope = { random: input.random ?? createRng(1), params: { ...input.params } }\n for (const [name, range] of Object.entries(recipe.vars ?? {})) if (scope.params[name] === undefined) scope.params[name] = draw(range, scope)\n const defaults: LayerDefaults = {\n ...(recipe.duration === undefined ? {} : { duration: draw(recipe.duration, scope) }),\n ...(recipe.tail === undefined ? {} : { tail: recipe.tail }),\n noiseSeconds: input.noiseSeconds ?? DEFAULT_NOISE_SECONDS,\n }\n const divisor = cutoffDivisor(recipe.falloff, distance) / (1 - OCCLUSION_CUTOFF * occlusion)\n const layers = recipe.layers.flatMap((layer) => planLayer(layer, scope, defaults, order !== 'layered', level)).map((layer) => muffle(layer, divisor))\n return { ...base, silent: false, length: Math.max(0, ...layers.map(layerEnd)), layers }\n}\n","import type { LoopRecipe } from './recipe'\n\n/** jogo L62112: a loop's nodes exist only once its volume reaches 0.002. */\nexport const LOOP_START_ABOVE = 0.002\n/** jogo L62125–62126: `setTargetAtTime` time constants. */\nexport const LOOP_SMOOTHING = { volume: 0.15, frequency: 0.08 } as const\n\n/** What the realizer does for one `set`: create the nodes first (once), then glide the volume and, for an oscillator, the frequency. */\nexport type LoopAction = { readonly create: boolean; readonly volume: number; readonly frequency?: number }\n\nexport type LoopState = {\n /** `null` while the loop has no nodes and the volume is still below the start threshold. */\n set(state: { readonly volume?: number; readonly frequency?: number }): LoopAction | null\n /** Whether the nodes exist. */\n readonly created: boolean\n /** The nodes were torn down (`stop`): the next audible `set` creates them again. */\n reset(): void\n}\n\n/**\n * The game's `loopSet` as state: nodes on the first volume at or above `startAbove`, then every `set` glides. The volume set last is kept, so a\n * `set` of only the frequency keeps the level. `chain_loop` recipes open with their nodes already made (`open` is true).\n */\nexport function createLoopState(recipe: LoopRecipe, open = false): LoopState {\n const startAbove = recipe.startAbove ?? LOOP_START_ABOVE\n let created = open\n let volume = recipe.volume ?? 0\n return {\n set(state) {\n volume = state.volume ?? volume\n const create = !created\n if (create && !(volume >= startAbove)) return null\n created = true\n const frequency = recipe.source.kind === 'osc' && state.frequency ? state.frequency : undefined\n return { create, volume, ...(frequency === undefined ? {} : { frequency }) }\n },\n get created() {\n return created\n },\n reset() {\n created = false\n },\n }\n}\n","[\n {\n \"id\": \"game\",\n \"master\": 0.5,\n \"noise\": { \"seconds\": 1.5, \"create\": \"lazy\" },\n \"sources\": [\"jogo:L62077-62081 master 0.5 to the output\", \"jogo:L62082-62088 noise 1.5 s made by the first sound that needs it\"]\n },\n {\n \"id\": \"art_scene\",\n \"master\": 0.85,\n \"compressor\": { \"threshold\": -12, \"ratio\": 5 },\n \"reverb\": { \"seconds\": 2.2, \"decay\": 3.4, \"wet\": 0.4 },\n \"noise\": { \"seconds\": 2, \"create\": \"eager\" },\n \"sources\": [\n \"cena:L1308 compressor -12 dB, ratio 5\",\n \"cena:L1309 master 0.85\",\n \"cena:L1310 convolver, impulse 2.2 s of (1 - i/len)^3.4\",\n \"cena:L1311 wet 0.4\",\n \"cena:L1312 noise 2 s made with the chain\"\n ]\n }\n]\n","import mixProfilesJson from './data/mix-profiles.json'\nimport type { BusId } from './recipe'\n\nexport type BusSetting = { readonly gain?: number; readonly muted?: boolean }\n\n/**\n * A mixing chain. `master` → (compressor) → output; with `reverb`, a wet bus → convolver (an impulse from the engine's seed) → master. `noise` is\n * the shared noise buffer: its length, and whether it is made with the chain (`eager`, the art scene) or by the first sound that needs it (`lazy`,\n * the game). Buses sit under the master and have no node until one is changed.\n */\nexport type MixProfile = {\n readonly id: string\n readonly master: number\n readonly compressor?: { readonly threshold: number; readonly ratio: number; readonly knee?: number; readonly attack?: number; readonly release?: number }\n readonly reverb?: { readonly seconds: number; readonly decay: number; readonly wet: number }\n readonly noise: { readonly seconds: number; readonly create: 'lazy' | 'eager' }\n readonly buses?: Readonly<Partial<Record<BusId, BusSetting>>>\n readonly sources: readonly string[]\n}\n\n/** The two team chains: `game` (master 0.5, jogo L62080) and `art_scene` (compressor and reverb, cena L1305–1313). */\nexport const MIX_PROFILES: Readonly<Record<string, MixProfile>> = Object.fromEntries(\n (mixProfilesJson as unknown as readonly MixProfile[]).map((profile) => [profile.id, profile]),\n)\n/** Q1: the kit plays through the art scene chain (compressor and reverb); `mix: 'game'` reverts. */\nexport const DEFAULT_MIX = 'art_scene'\n\n/** A profile by id from `profiles`, or the profile itself. */\nexport function resolveMix(mix: string | MixProfile, profiles: Readonly<Record<string, MixProfile>> = MIX_PROFILES): MixProfile {\n if (typeof mix !== 'string') return mix\n const profile = profiles[mix]\n if (!profile) throw new Error(`game-audio: unknown mix profile \"${mix}\" (known: ${Object.keys(profiles).join(', ')})`)\n return profile\n}\n\n/** The gain a bus plays at: 0 when muted, its gain (default 1) otherwise. */\nexport function busGain(setting: BusSetting | undefined): number {\n if (!setting) return 1\n return setting.muted ? 0 : (setting.gain ?? 1)\n}\n","import type { LoopRecipe, SoundBank, SoundRecipe } from './recipe'\n\nexport type DeepPartial<TValue> = TValue extends readonly unknown[] ? TValue : TValue extends object ? { readonly [Key in keyof TValue]?: DeepPartial<TValue[Key]> } : TValue\n\n/** Every sound and loop the engine knows, by id. Banks register in order; a later bank replaces an earlier recipe with the same id. */\nexport type SoundRegistry = {\n register(bank: SoundBank): void\n /** Merged into the recipe by id (objects merge, arrays such as `layers` are replaced); an unknown id is ignored. */\n patch(id: string, patch: DeepPartial<SoundRecipe> | DeepPartial<LoopRecipe>): void\n remove(id: string): void\n sound(id: string): SoundRecipe | undefined\n loop(id: string): LoopRecipe | undefined\n soundIds(): string[]\n loopIds(): string[]\n /** Which bank each id came from. */\n bankOf(id: string): string | undefined\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\n// keys keep their place, so a patched range is still drawn where it was\nfunction mergeRecords(base: Record<string, unknown>, patch: Record<string, unknown>): Record<string, unknown> {\n const merged: Record<string, unknown> = { ...base }\n for (const [key, value] of Object.entries(patch)) {\n if (value === undefined) continue\n const current = merged[key]\n merged[key] = isPlainObject(current) && isPlainObject(value) ? mergeRecords(current, value) : value\n }\n return merged\n}\n\nexport function createSoundRegistry(banks: readonly SoundBank[] = []): SoundRegistry {\n const sounds = new Map<string, SoundRecipe>()\n const loops = new Map<string, LoopRecipe>()\n const owners = new Map<string, string>()\n const registry: SoundRegistry = {\n register(bank) {\n for (const sound of bank.sounds ?? []) {\n sounds.set(sound.id, sound)\n owners.set(sound.id, bank.id)\n }\n for (const loop of bank.loops ?? []) {\n loops.set(loop.id, loop)\n owners.set(loop.id, bank.id)\n }\n },\n patch(id, patch) {\n const sound = sounds.get(id)\n if (sound) sounds.set(id, mergeRecords(sound, patch as Record<string, unknown>) as SoundRecipe)\n const loop = loops.get(id)\n if (loop) loops.set(id, mergeRecords(loop, patch as Record<string, unknown>) as LoopRecipe)\n },\n remove(id) {\n sounds.delete(id)\n loops.delete(id)\n owners.delete(id)\n },\n sound: (id) => sounds.get(id),\n loop: (id) => loops.get(id),\n soundIds: () => [...sounds.keys()],\n loopIds: () => [...loops.keys()],\n bankOf: (id) => owners.get(id),\n }\n for (const bank of banks) registry.register(bank)\n return registry\n}\n","{\n \"sources\": [\"jogo:L62089-62107\"],\n \"note\": \"The game's sfx table P: [lowpass cutoff Hz, peak gain, seconds]. Played as a noise burst with the game's distance curve (falloff game_sfx) and a 0.05 s tail. Team names in `team`.\",\n \"classes\": [\n { \"id\": \"pistol\", \"team\": \"pistola\", \"bus\": \"weapons\", \"cutoff\": 1800, \"gain\": 0.9, \"seconds\": 0.18 },\n { \"id\": \"shotgun\", \"team\": \"escopeta\", \"bus\": \"weapons\", \"cutoff\": 900, \"gain\": 1.2, \"seconds\": 0.35 },\n { \"id\": \"rifle\", \"team\": \"fuzil\", \"bus\": \"weapons\", \"cutoff\": 1400, \"gain\": 1.1, \"seconds\": 0.28 },\n { \"id\": \"long_rifle\", \"team\": \"rifle\", \"bus\": \"weapons\", \"cutoff\": 1100, \"gain\": 1.3, \"seconds\": 0.45 },\n { \"id\": \"impact\", \"team\": \"impacto\", \"bus\": \"world\", \"cutoff\": 2500, \"gain\": 0.25, \"seconds\": 0.05 },\n { \"id\": \"flesh\", \"team\": \"carne\", \"bus\": \"world\", \"cutoff\": 600, \"gain\": 0.35, \"seconds\": 0.08 },\n { \"id\": \"step\", \"team\": \"passo\", \"bus\": \"world\", \"cutoff\": 400, \"gain\": 0.08, \"seconds\": 0.05 },\n { \"id\": \"glass\", \"team\": \"vidro\", \"bus\": \"world\", \"cutoff\": 5000, \"gain\": 0.5, \"seconds\": 0.3 },\n { \"id\": \"wood\", \"team\": \"madeira\", \"bus\": \"world\", \"cutoff\": 700, \"gain\": 0.5, \"seconds\": 0.2 },\n { \"id\": \"reload\", \"team\": \"recarga\", \"bus\": \"weapons\", \"cutoff\": 3000, \"gain\": 0.15, \"seconds\": 0.06 },\n { \"id\": \"empty\", \"team\": \"vazio\", \"bus\": \"weapons\", \"cutoff\": 4000, \"gain\": 0.12, \"seconds\": 0.03 },\n { \"id\": \"explosion\", \"team\": \"explosao\", \"bus\": \"world\", \"cutoff\": 200, \"gain\": 1.6, \"seconds\": 1.4 }\n ],\n \"fallback\": { \"id\": \"unknown\", \"team\": \"(any other name)\", \"bus\": \"world\", \"cutoff\": 1000, \"gain\": 0.5, \"seconds\": 0.1 }\n}\n","import { DISTANCE_CURVES } from '../falloff'\nimport type { BusId, SoundBank, SoundRecipe } from '../recipe'\nimport gameSfxJson from '../data/game-sfx.json'\n\n/** One row of the game's `sfx` table (jogo L62096–62100): lowpass cutoff, peak gain and seconds of a noise burst. */\nexport type NoiseClass = {\n readonly id: string\n /** The name in the team code (`pistola`, `vidro`...). */\n readonly team: string\n readonly bus: BusId\n readonly cutoff: number\n readonly gain: number\n readonly seconds: number\n}\n\ntype GameSfxTable = { readonly sources: readonly string[]; readonly classes: readonly NoiseClass[]; readonly fallback: NoiseClass }\n\nconst GAME_SFX = gameSfxJson as unknown as GameSfxTable\n\n/** The 12 game classes, in the table's order. */\nexport const GAME_SFX_CLASSES: readonly NoiseClass[] = GAME_SFX.classes\n/** What the game plays for a name it does not know: `[1000, 0.5, 0.1]`. */\nexport const GAME_SFX_FALLBACK: NoiseClass = GAME_SFX.fallback\n\n/**\n * A class as a recipe: noise from a random point, the class lowpass (muffled by distance), the peak set at once and an exponential fall to 0.001 over\n * the class seconds, stopped 0.05 s later; the game's distance curve, silent below 0.01. Built in the game's `sfx` order (`burst`).\n */\nexport function noiseClassRecipe(row: NoiseClass, id = `sfx_${row.id}`): SoundRecipe {\n return {\n id,\n bus: row.bus,\n order: 'burst',\n duration: row.seconds,\n tail: 0.05,\n layers: [\n {\n source: { kind: 'noise', offset: 'random' },\n filters: { mode: 'serial', bank: [{ type: 'lowpass', frequency: { set: row.cutoff } }] },\n envelope: [\n [0, row.gain, 'set'],\n ['1d', 0.001, 'exp', 'fixed'],\n ],\n },\n ],\n falloff: DISTANCE_CURVES.game_sfx,\n sources: [...GAME_SFX.sources.map((source) => `${source} ${row.team}`)],\n }\n}\n\n/** The game's classes as a bank (`sfx_pistol`... and `sfx_unknown`). Subject banks pick their own classes from `GAME_SFX_CLASSES`. */\nexport const GAME_SFX_BANK: SoundBank = { id: 'game_sfx', sounds: [...GAME_SFX_CLASSES, GAME_SFX_FALLBACK].map((row) => noiseClassRecipe(row)) }\n","// The art scene's synthesis primitives (cena L1322-L1328) as recipe layers, shared by every subject bank that ports a `sfx.*` of the page: the\n// materials in `destruction-three`, the voices and wounds in `characters-three`. Each helper writes the layer the team routine builds, with its\n// fields in the order the routine draws its random numbers, so a recipe built from them leaves the trace of the team code.\nimport { DISTANCE_CURVES } from '../falloff'\nimport type { BusId, Envelope, Layer, ParamRef, Range, SoundRecipe } from '../recipe'\n\nconst ATTACK = 0.002\n\n/** A length in seconds: a number, a `[min, max]` range or a named number. */\nexport type SceneLength = number | readonly [number, number] | ParamRef\n\n// the layer is `attack + d` long (the art scene's gain rises over `a` and falls over `d`)\nfunction lengthOf(d: SceneLength, attack: number): Range {\n if (typeof d === 'number') return attack + d\n if (Array.isArray(d)) return [attack + d[0], attack + d[1]] as const\n return { ...(d as ParamRef), add: ((d as ParamRef).add ?? 0) + attack }\n}\n\nconst envelope = (attack: number): Envelope => [\n [0, 0.0001, 'set', 'fixed'],\n [attack, 1, 'exp'],\n ['1d', 0.0001, 'exp', 'fixed'],\n]\n\nexport type SceneNoise = {\n readonly type?: BiquadFilterType\n readonly f: Range\n /** The filter slides here over `d` (needs a fixed `d`). */\n readonly f2?: number\n readonly q?: number\n readonly a?: number\n readonly d: SceneLength\n readonly vol: Range\n readonly wet?: number\n readonly delay?: Range\n}\n\n/** `sNoise` (cena L1323): noise from a random point, a filter (default lowpass, Q 0.7), the gain rising over `a` and falling over `d`. */\nexport function sceneNoise(o: SceneNoise): Layer {\n const a = o.a ?? ATTACK\n const over = typeof o.d === 'number' ? o.d : 0\n return {\n filters: {\n mode: 'serial',\n bank: [{ type: o.type ?? 'lowpass', frequency: o.f2 === undefined ? { set: o.f } : { set: o.f, to: o.f2, curve: 'exp', over }, q: o.q ?? 0.7 }],\n },\n duration: lengthOf(o.d, a),\n gain: o.vol,\n ...(o.delay === undefined ? {} : { at: o.delay }),\n ...(o.wet === undefined ? {} : { wet: o.wet }),\n source: { kind: 'noise', offset: 'random', offsetScale: 1.5, loop: true },\n envelope: envelope(a),\n }\n}\n\nexport type SceneTone = { readonly wave?: OscillatorType; readonly f: Range; readonly f2?: number; readonly d: SceneLength; readonly vol: Range; readonly wet?: number; readonly delay?: Range }\n\n/** `sTone` (cena L1324): an oscillator sliding from `f` to `f2` (back to `f` when none), the gain rising over 0.002 s and falling over `d`. */\nexport function sceneTone(o: SceneTone): Layer {\n return {\n source: { kind: 'osc', wave: o.wave ?? 'sine', frequency: { from: o.f, to: o.f2 ?? 'from', curve: 'exp', over: 'duration' } },\n duration: lengthOf(o.d, ATTACK),\n gain: o.vol,\n ...(o.delay === undefined ? {} : { at: o.delay }),\n ...(o.wet === undefined ? {} : { wet: o.wet }),\n envelope: envelope(ATTACK),\n }\n}\n\nexport type SceneVoice = {\n /** Start and end frequency of the sweep (the page ramps linearly from `f0` to `f1` over the length). */\n readonly f0: Range\n readonly f1: Range\n /** Length in seconds. */\n readonly d: SceneLength\n /** Centre of the first and second formant (Q 4 and 6) and of the breath band (Q 1.1). */\n readonly fA: Range\n readonly fB: Range\n /** Level of the breath noise. */\n readonly noise: Range\n readonly vol: Range\n readonly wave?: OscillatorType\n}\n\n/**\n * `voice` (cena L1325): an oscillator swept from `f0` to `f1` with a vibrato of 4 to 10 Hz (depth 0.08 of `f0`) through two formant bands plus a band of\n * breath noise, summed and boosted 3.2 times, the gain rising over 0.1 s, held to 0.6 of the length and falling; reverb send 0.45. It is the one\n * layer the page builds with `voice(...)`, so a scream is two of them.\n */\nexport function sceneVoice(o: SceneVoice): Layer {\n return {\n duration: lengthOf(o.d, 0),\n gain: o.vol,\n wet: 0.45,\n source: {\n kind: 'formant_voice',\n wave: o.wave ?? 'sawtooth',\n frequency: { from: o.f0, to: o.f1, curve: 'linear', over: 'duration' },\n vibrato: { rate: [4, 10], depth: 0.08 },\n formants: [\n { frequency: o.fA, q: 4 },\n { frequency: o.fB, q: 6 },\n ],\n breath: { frequency: o.fB, q: 1.1, gain: o.noise },\n mix: 3.2,\n },\n envelope: [\n [0, 0.0001, 'set', 'fixed'],\n [0.1, 1, 'exp'],\n ['0.6d', 1, 'set'],\n ['1d', 0.0001, 'exp', 'fixed'],\n ],\n }\n}\n\n/** The layer played `count` times (a team `for` loop whose body draws numbers): each pass is its own layer, so the draws stay in the loop's order. */\nexport const sceneMany = (count: number, make: () => Layer): Layer[] => Array.from({ length: count }, make)\n\nexport type SceneRecipeOptions = {\n /** Named numbers drawn first (`PlayOptions.params` can override them). */\n readonly vars?: SoundRecipe['vars']\n readonly bus?: BusId\n readonly group?: string\n}\n\n/** A recipe in the art scene's mix: positional with the art scene's curve (`vol / (1 + d² × 0.008)`) and pan; `line` is the team code it comes from (`cena:<line>`). */\nexport function sceneRecipe(id: string, layers: readonly Layer[], line: string, options: SceneRecipeOptions = {}): SoundRecipe {\n return {\n id,\n bus: options.bus ?? 'world',\n pan: true,\n layers,\n falloff: DISTANCE_CURVES.art_scene,\n ...(options.vars ? { vars: options.vars } : {}),\n ...(options.group ? { group: options.group } : {}),\n sources: [`cena:${line}`],\n }\n}\n","{\n \"id\": \"crowd_rumble\",\n \"bus\": \"ambience\",\n \"order\": \"game_loop\",\n \"source\": { \"kind\": \"noise\", \"loop\": true },\n \"filters\": { \"mode\": \"serial\", \"bank\": [{ \"type\": \"lowpass\", \"frequency\": { \"set\": 160 } }] },\n \"smoothing\": { \"volume\": 0.15, \"frequency\": 0.08 },\n \"startAbove\": 0.002,\n \"sources\": [\"jogo:L62116 horda: noise through a 160 Hz lowpass\", \"jogo:L70424 level min(0.16, near × 0.0016)\", \"temporary home until the crowd package (Q12)\"]\n}\n","{\n \"id\": \"engine_saw\",\n \"bus\": \"world\",\n \"order\": \"game_loop\",\n \"source\": { \"kind\": \"osc\", \"wave\": \"sawtooth\", \"loop\": true },\n \"filters\": { \"mode\": \"serial\", \"bank\": [{ \"type\": \"lowpass\", \"frequency\": { \"set\": 400 } }] },\n \"smoothing\": { \"volume\": 0.15, \"frequency\": 0.08 },\n \"startAbove\": 0.002,\n \"sources\": [\n \"jogo:L62115 motor: sawtooth through a 400 Hz lowpass\",\n \"jogo:L70421 level 0.035 + speed × 0.003, frequency 38 + speed × 7 (the host drives `set`)\",\n \"temporary home until the vehicles package (Q12)\"\n ]\n}\n","{\n \"id\": \"horn\",\n \"bus\": \"world\",\n \"order\": \"chord\",\n \"duration\": 0.6,\n \"tail\": 0.02,\n \"layers\": [\n { \"source\": { \"kind\": \"osc\", \"wave\": \"square\", \"frequency\": { \"set\": 415 } }, \"envelope\": [[0, 0.08, \"set\"], [0.6, 0.0001, \"set\", \"fixed\"]] },\n { \"source\": { \"kind\": \"osc\", \"wave\": \"square\", \"frequency\": { \"set\": 523 } }, \"envelope\": [[0, 0.08, \"set\"], [0.6, 0.0001, \"set\", \"fixed\"]] }\n ],\n \"falloff\": { \"model\": \"none\" },\n \"sources\": [\"jogo:L70272-70276 buzina: squares at 415 and 523 Hz, 0.08 for 0.6 s\", \"temporary home until the vehicles package (Q12)\"]\n}\n","{\n \"id\": \"radio_static\",\n \"bus\": \"world\",\n \"order\": \"static\",\n \"duration\": 0.6,\n \"layers\": [\n {\n \"source\": { \"kind\": \"noise\", \"offset\": \"random\" },\n \"filters\": { \"mode\": \"serial\", \"bank\": [{ \"type\": \"bandpass\", \"frequency\": { \"set\": 1800 }, \"q\": 0.8 }] },\n \"envelope\": [[0, 0.06, \"set\"], [\"1d\", 0.001, \"exp\", \"fixed\"]]\n }\n ],\n \"falloff\": { \"model\": \"none\" },\n \"sources\": [\"jogo:L69998-70004 chiado: noise through a 1800 Hz bandpass (Q 0.8), 0.06 falling over 0.6 s\", \"temporary home until the props or radio package (Q12)\"]\n}\n","{\n \"id\": \"rotor_blades\",\n \"bus\": \"world\",\n \"order\": \"game_loop\",\n \"source\": { \"kind\": \"noise\", \"loop\": true },\n \"filters\": { \"mode\": \"serial\", \"bank\": [{ \"type\": \"lowpass\", \"frequency\": { \"set\": 300 } }] },\n \"modulators\": [{ \"target\": \"gain\", \"rate\": 11, \"depth\": 0.5, \"base\": 0.5 }],\n \"smoothing\": { \"volume\": 0.15, \"frequency\": 0.08 },\n \"startAbove\": 0.002,\n \"sources\": [\n \"jogo:L62116-62120 rotor: noise through a 300 Hz lowpass, blade beat as an 11 Hz LFO of 0.5 on a 0.5 gain stage\",\n \"jogo:L70426 level min(0.5, 30 / (distance + 10))\",\n \"temporary home until the vehicles package (Q12)\"\n ]\n}\n","{\n \"id\": \"siren\",\n \"bus\": \"world\",\n \"order\": \"siren\",\n \"duration\": 9,\n \"tail\": 0.2,\n \"layers\": [\n {\n \"wet\": 1.5,\n \"source\": { \"kind\": \"osc\", \"wave\": \"sine\", \"frequency\": { \"set\": 850 } },\n \"modulators\": [{ \"target\": \"frequency\", \"rate\": 0.18, \"depth\": 280 }],\n \"filters\": { \"mode\": \"serial\", \"bank\": [{ \"type\": \"lowpass\", \"frequency\": { \"set\": 1400 } }] },\n \"envelope\": [[0, 0.0001, \"set\", \"fixed\"], [2, 0.035, \"exp\"], [6, 0.035, \"set\"], [9, 0.0001, \"exp\", \"fixed\"]]\n }\n ],\n \"falloff\": { \"model\": \"none\" },\n \"sources\": [\"cena:L1369 siren: 850 Hz sine swept ±280 Hz at 0.18 Hz, 1400 Hz lowpass, 0.035 for 9 s, reverb send 1.5\", \"temporary home until the vehicles package (Q12)\"]\n}\n","// Sounds whose subject has no package yet (Q12): they move to vehicles, crowd and props in Phases 7 and 8 and stay here as re-exports.\nimport type { LoopRecipe, SoundBank, SoundRecipe } from '../recipe'\nimport crowdRumble from './crowd_rumble.json'\nimport engineSaw from './engine_saw.json'\nimport horn from './horn.json'\nimport radioStatic from './radio_static.json'\nimport rotorBlades from './rotor_blades.json'\nimport siren from './siren.json'\n\nexport const LIBRARY_SOUNDS: readonly SoundRecipe[] = [horn, radioStatic, siren] as unknown as readonly SoundRecipe[]\nexport const LIBRARY_LOOPS: readonly LoopRecipe[] = [engineSaw, rotorBlades, crowdRumble] as unknown as readonly LoopRecipe[]\nexport const LIBRARY_BANK: SoundBank = { id: 'library', sounds: LIBRARY_SOUNDS, loops: LIBRARY_LOOPS }\n","/** `length` samples of white noise, `random × 2 − 1`, drawn in order (jogo L62086, cena L1312). */\nexport function fillNoise(random: () => number, length: number): Float32Array {\n const samples = new Float32Array(length)\n for (let index = 0; index < length; index++) samples[index] = random() * 2 - 1\n return samples\n}\n\n/**\n * A reverb impulse: per channel, noise times `(1 − i / length)^decay` (cena L1310). `length` is `sampleRate × seconds` as the art scene computes it,\n * which is not always whole (48000 × 2.2 = 105600.00000000001): the loop runs while `i < length`, so one more number is drawn than the buffer holds,\n * exactly like the team code. The power is `exp(decay × log(base))`, which every engine computes the same.\n */\nexport function fillImpulse(random: () => number, options: { readonly channels: number; readonly length: number; readonly decay: number }): Float32Array[] {\n const size = Math.floor(options.length)\n return Array.from({ length: options.channels }, () => {\n const samples = new Float32Array(size)\n for (let index = 0; index < options.length; index++) {\n const value = (random() * 2 - 1) * Math.exp(options.decay * Math.log(1 - index / options.length))\n if (index < size) samples[index] = value\n }\n return samples\n })\n}\n\n/** An AudioBuffer holding the samples (one channel per array). */\nexport function bufferOf(context: AudioContext, channels: readonly Float32Array[], requestedLength: number): AudioBuffer {\n const buffer = context.createBuffer(channels.length, requestedLength, context.sampleRate)\n channels.forEach((samples, channel) => buffer.getChannelData(channel).set(samples))\n return buffer\n}\n","import type { MixProfile } from '../mix'\nimport { bufferOf, fillImpulse } from './noise'\n\nexport type MixChain = { readonly master: GainNode; readonly wet?: GainNode; disconnect(): void }\n\n/**\n * The mixing chain in the team order (cena L1308–1311; jogo L62080): compressor to the output, master into it (or straight to the output), then the\n * convolver with an impulse drawn from `random` and the wet bus into it, back into the master.\n */\nexport function buildChain(context: AudioContext, profile: MixProfile, random: () => number): MixChain {\n let compressor: DynamicsCompressorNode | undefined\n if (profile.compressor) {\n compressor = context.createDynamicsCompressor()\n compressor.threshold.value = profile.compressor.threshold\n compressor.ratio.value = profile.compressor.ratio\n if (profile.compressor.knee !== undefined) compressor.knee.value = profile.compressor.knee\n if (profile.compressor.attack !== undefined) compressor.attack.value = profile.compressor.attack\n if (profile.compressor.release !== undefined) compressor.release.value = profile.compressor.release\n compressor.connect(context.destination)\n }\n const master = context.createGain()\n master.gain.value = profile.master\n master.connect(compressor ?? context.destination)\n if (!profile.reverb) {\n return {\n master,\n disconnect: () => {\n master.disconnect()\n compressor?.disconnect()\n },\n }\n }\n const convolver = context.createConvolver()\n const length = context.sampleRate * profile.reverb.seconds\n convolver.buffer = bufferOf(context, fillImpulse(random, { channels: 2, length, decay: profile.reverb.decay }), length)\n const wet = context.createGain()\n wet.gain.value = profile.reverb.wet\n wet.connect(convolver)\n convolver.connect(master)\n return {\n master,\n wet,\n disconnect: () => {\n wet.disconnect()\n convolver.disconnect()\n master.disconnect()\n compressor?.disconnect()\n },\n }\n}\n","type AudioContextConstructor = new () => AudioContext\n\n/** A new context from the page (`AudioContext` or the old `webkitAudioContext`), or `null` in Node and workers. */\nexport function globalContext(): AudioContext | null {\n const scope = globalThis as { AudioContext?: AudioContextConstructor; webkitAudioContext?: AudioContextConstructor }\n const Constructor = scope.AudioContext ?? scope.webkitAudioContext\n return Constructor ? new Constructor() : null\n}\n\n/** Browsers start a context suspended until a click or key; call from one. */\nexport function unlockContext(context: AudioContext): void {\n if (context.state === 'suspended') void context.resume()\n}\n","import type { PlannedAutomation, PlannedEnvelopePoint, PlannedFilter } from '../plan'\n\n/** Where a plan is built: the context, the bus it plays into, the reverb send (if the mix has one), the shared noise and the start time. */\nexport type RealizeTarget = {\n readonly context: AudioContext\n readonly output: AudioNode\n readonly wet?: AudioNode\n /** The noise buffer; made on the first call when the mix makes it on demand. */\n readonly noise: () => AudioBuffer\n readonly time: number\n}\n\n/** What `realize` built: every scheduled source (so the voice can be cut short) and `stop`. */\nexport type RealizedVoice = { readonly sources: readonly AudioScheduledSourceNode[]; stop(): void }\n\n/** `.value = value`, or `setValueAtTime(from)` at `time`. */\nexport function assign(param: AudioParam, automation: PlannedAutomation, time: number): void {\n if (automation.value !== undefined) param.value = automation.value\n if (automation.from !== undefined) param.setValueAtTime(automation.from, time)\n}\n\nexport function ramp(param: AudioParam, curve: 'set' | 'linear' | 'exp', value: number, at: number): void {\n if (curve === 'set') param.setValueAtTime(value, at)\n else if (curve === 'exp') param.exponentialRampToValueAtTime(value, at)\n else param.linearRampToValueAtTime(value, at)\n}\n\n/** The ramp of an automation, if it has one. */\nexport function rampTo(param: AudioParam, automation: PlannedAutomation, time: number): void {\n if (automation.to !== undefined && automation.at !== undefined) ramp(param, automation.curve ?? 'linear', automation.to, time + automation.at)\n}\n\nexport function applyEnvelope(param: AudioParam, points: readonly PlannedEnvelopePoint[], time: number): void {\n for (const point of points) ramp(param, point.curve, point.value, time + point.time)\n}\n\n/** A noise source on the shared buffer (`loop` set only when asked, as the art scene's `nsrc` does). */\nexport function noiseSource(target: RealizeTarget, loop: boolean): AudioBufferSourceNode {\n const source = target.context.createBufferSource()\n source.buffer = target.noise()\n if (loop) source.loop = true\n return source\n}\n\n/** The art scene's `bq`: type, frequency, then Q and gain when given. The frequency ramp is left to the caller. */\nexport function filterNode(context: AudioContext, filter: PlannedFilter, time: number): BiquadFilterNode {\n const node = context.createBiquadFilter()\n node.type = filter.type\n assign(node.frequency, filter.frequency, time)\n if (filter.q !== undefined) node.Q.value = filter.q\n if (filter.gain !== undefined) node.gain.value = filter.gain\n return node\n}\n\nexport function gainNode(context: AudioContext, value: number): GainNode {\n const node = context.createGain()\n node.gain.value = value\n return node\n}\n\nexport function voiceOf(sources: readonly AudioScheduledSourceNode[]): RealizedVoice {\n return {\n sources,\n stop() {\n for (const source of sources) {\n try {\n source.stop()\n } catch {\n // already stopped\n }\n }\n },\n }\n}\n","// Loop nodes in the two team orders: the game's `loopSet` (jogo L62109–62127) and the art scene's loops in `initAudio` (cena L1314–1316).\nimport type { Automation, LoopRecipe, Range } from '../recipe'\nimport { filterNode, gainNode, noiseSource } from './nodes'\nimport type { RealizeTarget } from './nodes'\n\nexport type RealizedLoop = {\n readonly gain: GainNode\n readonly source: AudioScheduledSourceNode\n readonly frequency?: AudioParam\n stop(): void\n}\n\n// loops take fixed numbers: a range or a param in a loop recipe reads as 0\nconst fixed = (range: Range | undefined): number => (typeof range === 'number' ? range : 0)\nconst fixedFrequency = (automation: Automation): number => fixed('set' in automation ? automation.set : automation.from)\n\nfunction sourceOf(recipe: LoopRecipe, target: RealizeTarget): { source: AudioScheduledSourceNode; frequency?: AudioParam } {\n if (recipe.source.kind === 'noise') return { source: noiseSource(target, true) }\n const oscillator = target.context.createOscillator()\n oscillator.type = recipe.source.wave\n if (recipe.source.frequency) oscillator.frequency.value = fixedFrequency(recipe.source.frequency)\n return { source: oscillator, frequency: oscillator.frequency }\n}\n\nfunction stopAll(sources: readonly AudioScheduledSourceNode[]): () => void {\n return () => {\n for (const source of sources) {\n try {\n source.stop()\n } catch {\n // already stopped\n }\n }\n }\n}\n\n/** `loopSet` on first use: gain from 0 and filter wired first, the source and filter set, an optional blade-beat stage, then the source starts. */\nexport function realizeGameLoop(recipe: LoopRecipe, target: RealizeTarget): RealizedLoop {\n const { context } = target\n const gain = context.createGain()\n const filters = (recipe.filters?.bank ?? []).map(() => context.createBiquadFilter())\n gain.gain.value = 0\n const last = filters.reduce<AudioNode | undefined>((previous, filter) => (previous ? previous.connect(filter) : filter), undefined)\n last?.connect(gain)\n gain.connect(target.output)\n const { source, frequency } = sourceOf(recipe, target)\n recipe.filters?.bank.forEach((spec, index) => {\n const filter = filters[index] as BiquadFilterNode\n filter.type = spec.type\n filter.frequency.value = fixedFrequency(spec.frequency)\n if (spec.q !== undefined) filter.Q.value = fixed(spec.q)\n })\n const sources: AudioScheduledSourceNode[] = [source]\n for (const modulator of recipe.modulators ?? []) {\n const lfo = context.createOscillator()\n const depth = context.createGain()\n const stage = context.createGain()\n if (modulator.wave) lfo.type = modulator.wave\n lfo.frequency.value = fixed(modulator.rate)\n depth.gain.value = fixed(modulator.depth as Range)\n stage.gain.value = modulator.base ?? 0\n lfo.connect(depth)\n depth.connect(stage.gain)\n last?.disconnect()\n last?.connect(stage)\n stage.connect(gain)\n lfo.start()\n sources.push(lfo)\n }\n source.connect(filters[0] ?? gain)\n source.start()\n return { gain, source, ...(frequency ? { frequency } : {}), stop: stopAll(sources) }\n}\n\n/** The art scene's loops: source, filters, gain at its starting volume, a gain LFO, wired, started. */\nexport function realizeChainLoop(recipe: LoopRecipe, target: RealizeTarget, volume: number): RealizedLoop {\n const { context } = target\n const { source, frequency } = sourceOf(recipe, target)\n const filters = (recipe.filters?.bank ?? []).map((spec) =>\n filterNode(context, { type: spec.type, frequency: { value: fixedFrequency(spec.frequency) }, ...(spec.q === undefined ? {} : { q: fixed(spec.q) }) }, target.time),\n )\n const gain = gainNode(context, volume)\n const lfos = (recipe.modulators ?? []).map((modulator) => {\n const lfo = context.createOscillator()\n if (modulator.wave) lfo.type = modulator.wave\n lfo.frequency.value = fixed(modulator.rate)\n const depth = gainNode(context, fixed(modulator.depth as Range))\n lfo.connect(depth)\n depth.connect(gain.gain)\n return lfo\n })\n let tail: AudioNode = source\n for (const filter of filters) tail = tail.connect(filter)\n tail.connect(gain)\n gain.connect(target.output)\n source.start()\n for (const lfo of lfos) lfo.start()\n return { gain, source, ...(frequency ? { frequency } : {}), stop: stopAll([source, ...lfos]) }\n}\n","import { LOOP_SMOOTHING, createLoopState } from '../loops'\nimport type { BusId, LoopRecipe } from '../recipe'\nimport type { RealizeTarget } from './nodes'\nimport { realizeChainLoop, realizeGameLoop } from './realize-loop'\nimport type { RealizedLoop } from './realize-loop'\n\n/** A continuous sound: `set` glides the volume and, for an oscillator, the frequency; `stop` tears the nodes down. */\nexport type AudioLoopHandle = {\n set(state: { readonly volume?: number; readonly frequency?: number }): void\n stop(): void\n}\n\nexport type LoopEntry = { rewire(): void; stop(): void; readonly created: boolean }\n\n/** What a loop needs from its engine. */\nexport type LoopHost = {\n ready(): AudioContext | null\n output(bus: BusId): AudioNode\n prepareNoise(): unknown\n noise(): AudioBuffer\n register(loop: LoopEntry): void\n unregister(loop: LoopEntry): void\n}\n\nconst INERT: AudioLoopHandle = { set() {}, stop() {} }\n\n/** A `game_loop` makes its nodes on the first audible `set`; a `chain_loop` makes them when it opens, at `volume` (default the recipe's). */\nexport function createLoopHandle(recipe: LoopRecipe | undefined, host: LoopHost, volume?: number): AudioLoopHandle {\n if (!recipe) return INERT\n const loopRecipe = recipe\n const isChain = loopRecipe.order === 'chain_loop'\n const opening = volume ?? loopRecipe.volume ?? 0\n const smoothing = loopRecipe.smoothing ?? LOOP_SMOOTHING\n let state = createLoopState(loopRecipe)\n let nodes: RealizedLoop | undefined\n\n const entry: LoopEntry = {\n get created() {\n return nodes !== undefined\n },\n rewire() {\n nodes?.gain.disconnect()\n nodes?.gain.connect(host.output(loopRecipe.bus))\n },\n stop() {\n nodes?.stop()\n nodes?.gain.disconnect()\n nodes = undefined\n state = createLoopState(loopRecipe)\n host.unregister(entry)\n },\n }\n\n const create = (context: AudioContext, startVolume: number): RealizedLoop => {\n if (loopRecipe.source.kind === 'noise') host.prepareNoise()\n const target: RealizeTarget = { context, output: host.output(loopRecipe.bus), noise: host.noise, time: context.currentTime }\n const made = isChain ? realizeChainLoop(loopRecipe, target, startVolume) : realizeGameLoop(loopRecipe, target)\n host.register(entry)\n return made\n }\n\n const open = (): void => {\n const context = host.ready()\n if (!context) return\n nodes = create(context, opening)\n state = createLoopState({ ...loopRecipe, volume: opening }, true)\n }\n if (isChain) open()\n\n return {\n set(next) {\n if (isChain && !nodes) open()\n const context = host.ready()\n if (!context) return\n const action = state.set(next)\n if (!action) return\n nodes ??= create(context, 0)\n nodes.gain.gain.setTargetAtTime(action.volume, context.currentTime, smoothing.volume)\n if (action.frequency !== undefined && nodes.frequency) nodes.frequency.setTargetAtTime(action.frequency, context.currentTime, smoothing.frequency)\n },\n stop: entry.stop,\n }\n}\n","import { bufferOf, fillNoise } from './noise'\n\n/** One noise buffer and the stream it is filled from. The samples are drawn before the sound that first needs them draws its own numbers. */\nexport type NoiseStore = { readonly random: () => number; samples?: Float32Array; buffer?: AudioBuffer; reset(): void }\n\nexport function createNoiseStore(random: () => number): NoiseStore {\n const store: NoiseStore = {\n random,\n reset() {\n store.samples = undefined\n store.buffer = undefined\n },\n }\n return store\n}\n\n/** Draws the samples (once): `sampleRate × seconds` of them, as the team code sizes its buffer. */\nexport function prepareNoise(store: NoiseStore, context: AudioContext, seconds: number): Float32Array {\n store.samples ??= fillNoise(store.random, Math.floor(context.sampleRate * seconds))\n return store.samples\n}\n\n/** The AudioBuffer (made on the first call, which is where the team code calls its `noise()`). */\nexport function noiseBuffer(store: NoiseStore, context: AudioContext, seconds: number): AudioBuffer {\n const samples = prepareNoise(store, context, seconds)\n store.buffer ??= bufferOf(context, [samples], context.sampleRate * seconds)\n return store.buffer\n}\n","/** A sound waiting to be built: `run` builds it, `drop` gives its voice back when it waited too long to still make sense. */\nexport type StartJob = { readonly queuedAt: number; run(): void; drop(): void }\n\nexport type StartQueueOptions = {\n /** Most milliseconds of main-thread work one task spends building voices (at least one voice is always built). Default 2. */\n readonly budgetMs?: number\n /** A voice still waiting after this many milliseconds is dropped instead of starting late. Default 250. */\n readonly maxLatencyMs?: number\n}\n\nexport type StartQueue = { push(job: Omit<StartJob, 'queuedAt'>): void; clear(): void; readonly size: number }\n\nconst nowMs = (): number => (typeof performance === 'undefined' ? Date.now() : performance.now())\n\nfunction scheduleTask(task: () => void): void {\n if (typeof MessageChannel === 'undefined') {\n setTimeout(task, 0)\n return\n }\n const channel = new MessageChannel()\n channel.port1.onmessage = () => {\n channel.port1.close()\n task()\n }\n channel.port2.postMessage(0)\n}\n\n/** Builds voices in small timed slices between frames, so a burst (an explosion's debris, glass and metal) never lands inside one frame. */\nexport function createStartQueue(options: StartQueueOptions = {}): StartQueue {\n const budgetMs = options.budgetMs ?? 2\n const maxLatencyMs = options.maxLatencyMs ?? 250\n let jobs: StartJob[] = []\n let scheduled = false\n\n const drain = (): void => {\n scheduled = false\n const began = nowMs()\n while (jobs.length > 0) {\n const job = jobs.shift() as StartJob\n if (nowMs() - job.queuedAt > maxLatencyMs) job.drop()\n else job.run()\n if (nowMs() - began >= budgetMs) break\n }\n if (jobs.length > 0) schedule()\n }\n\n const schedule = (): void => {\n if (scheduled) return\n scheduled = true\n scheduleTask(drain)\n }\n\n return {\n push(job) {\n jobs.push({ ...job, queuedAt: nowMs() })\n schedule()\n },\n clear() {\n for (const job of jobs) job.drop()\n jobs = []\n },\n get size() {\n return jobs.length\n },\n }\n}\n","// The game's routines (jogo.js), one builder each: the nodes are created, set and wired in the routine's own order, so the trace of a plan\n// matches the trace of the team function. The level is already in the envelope; every builder connects straight to the bus.\nimport type { PlannedFilter, PlannedLayer, SoundPlan } from '../plan'\nimport { applyEnvelope, assign, noiseSource, rampTo, voiceOf } from './nodes'\nimport type { RealizedVoice, RealizeTarget } from './nodes'\n\nconst end = (layer: PlannedLayer, start: number): number => start + layer.duration + layer.tail\nconst firstFilter = (layer: PlannedLayer): PlannedFilter | undefined => layer.filters?.bank[0]\nconst offsetOf = (layer: PlannedLayer): number => (layer.source.kind === 'noise' ? layer.source.offset : 0)\n\nfunction setFilter(node: BiquadFilterNode, filter: PlannedFilter | undefined, time: number): void {\n if (!filter) return\n node.type = filter.type\n assign(node.frequency, filter.frequency, time)\n if (filter.q !== undefined) node.Q.value = filter.q\n}\n\n/** `sfx` (L62089): gain to the bus first, then the noise, its lowpass, the envelope, and a random start in the noise. */\nexport function realizeBurst(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layer = plan.layers[0] as PlannedLayer\n const time = target.time + layer.at\n const gain = context.createGain()\n gain.connect(target.output)\n const source = noiseSource(target, layer.source.kind === 'noise' && layer.source.loop)\n const filter = context.createBiquadFilter()\n source.connect(filter)\n filter.connect(gain)\n setFilter(filter, firstFilter(layer), time)\n applyEnvelope(gain.gain, layer.envelope, time)\n source.start(time, offsetOf(layer))\n source.stop(end(layer, time))\n return voiceOf([source])\n}\n\n/** `grito` (L62128): noise through a parallel formant bank (each band with its own level), a gain LFO for roughness. */\nexport function realizeScream(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layer = plan.layers[0] as PlannedLayer\n const time = target.time + layer.at\n const source = noiseSource(target, layer.source.kind === 'noise' && layer.source.loop)\n const gain = context.createGain()\n gain.connect(target.output)\n for (const band of layer.filters?.bank ?? []) {\n const filter = context.createBiquadFilter()\n filter.type = band.type\n if (band.q !== undefined) filter.Q.value = band.q\n assign(filter.frequency, band.frequency, time)\n rampTo(filter.frequency, band.frequency, time)\n const level = context.createGain()\n level.gain.value = band.level ?? 1\n source.connect(filter)\n filter.connect(level)\n level.connect(gain)\n }\n const sources: AudioScheduledSourceNode[] = [source]\n const lfos = layer.modulators.map((modulator) => {\n const lfo = context.createOscillator()\n const depth = context.createGain()\n if (modulator.wave) lfo.type = modulator.wave\n lfo.frequency.value = modulator.rate\n depth.gain.value = modulator.depth\n lfo.connect(depth)\n depth.connect(gain.gain)\n return lfo\n })\n applyEnvelope(gain.gain, layer.envelope, time)\n source.start(time, offsetOf(layer))\n source.stop(end(layer, time))\n for (const lfo of lfos) {\n lfo.start(time)\n lfo.stop(end(layer, time))\n sources.push(lfo)\n }\n return voiceOf(sources)\n}\n\n/** `voz` (L62143): oscillator → bandpass → gain; the filter frequency is set after the pitch sweep. */\nexport function realizeGroan(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layer = plan.layers[0] as PlannedLayer\n const time = target.time + layer.at\n const oscillator = context.createOscillator()\n const gain = context.createGain()\n const filter = context.createBiquadFilter()\n const band = firstFilter(layer)\n if (layer.source.kind === 'osc') oscillator.type = layer.source.wave\n if (band) {\n filter.type = band.type\n if (band.q !== undefined) filter.Q.value = band.q\n }\n if (layer.source.kind === 'osc') {\n assign(oscillator.frequency, layer.source.frequency, time)\n rampTo(oscillator.frequency, layer.source.frequency, time)\n }\n if (band) assign(filter.frequency, band.frequency, time)\n applyEnvelope(gain.gain, layer.envelope, time)\n oscillator.connect(filter)\n filter.connect(gain)\n gain.connect(target.output)\n oscillator.start(time)\n oscillator.stop(end(layer, time))\n return voiceOf([oscillator])\n}\n\n/** `boom` (L68278): one oscillator sweeping down into a gain. */\nexport function realizeBoom(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layer = plan.layers[0] as PlannedLayer\n const time = target.time + layer.at\n const oscillator = context.createOscillator()\n const gain = context.createGain()\n if (layer.source.kind === 'osc') {\n oscillator.type = layer.source.wave\n assign(oscillator.frequency, layer.source.frequency, time)\n rampTo(oscillator.frequency, layer.source.frequency, time)\n }\n applyEnvelope(gain.gain, layer.envelope, time)\n oscillator.connect(gain)\n gain.connect(target.output)\n oscillator.start(time)\n oscillator.stop(end(layer, time))\n return voiceOf([oscillator])\n}\n\n/** `chiado` (L69998): gain, noise and bandpass created first, then set, then wired. */\nexport function realizeStatic(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layer = plan.layers[0] as PlannedLayer\n const time = target.time + layer.at\n const gain = context.createGain()\n const source = context.createBufferSource()\n const filter = context.createBiquadFilter()\n source.buffer = target.noise()\n setFilter(filter, firstFilter(layer), time)\n applyEnvelope(gain.gain, layer.envelope, time)\n source.connect(filter)\n filter.connect(gain)\n gain.connect(target.output)\n source.start(time, offsetOf(layer))\n source.stop(end(layer, time))\n return voiceOf([source])\n}\n\n/** `buzina` (L70272): one oscillator per layer into one gain with the first layer's envelope. */\nexport function realizeChord(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layers = plan.layers\n const oscillators = layers.map(() => context.createOscillator())\n const gain = context.createGain()\n // the team writes `o.type = o2.type = 'square'`, which assigns right to left\n for (let index = layers.length - 1; index >= 0; index--) {\n const source = (layers[index] as PlannedLayer).source\n if (source.kind === 'osc') (oscillators[index] as OscillatorNode).type = source.wave\n }\n layers.forEach((layer, index) => {\n if (layer.source.kind === 'osc') assign((oscillators[index] as OscillatorNode).frequency, layer.source.frequency, target.time + layer.at)\n })\n applyEnvelope(gain.gain, (layers[0] as PlannedLayer).envelope, target.time + (layers[0] as PlannedLayer).at)\n for (const oscillator of oscillators) oscillator.connect(gain)\n gain.connect(target.output)\n layers.forEach((layer, index) => (oscillators[index] as OscillatorNode).start(target.time + layer.at))\n layers.forEach((layer, index) => (oscillators[index] as OscillatorNode).stop(end(layer, target.time + layer.at)))\n return voiceOf(oscillators)\n}\n\n/**\n * `bichoSom` (L66625): gain and filter are created before the level is checked (a silent plan stops there), then each repeat is an oscillator\n * with its own envelope into the shared filter, whose frequency and Q are set again on every repeat.\n */\nexport function realizeCalls(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const gain = context.createGain()\n const filter = context.createBiquadFilter()\n if (plan.silent) return voiceOf([])\n const band = firstFilter(plan.layers[0] as PlannedLayer)\n if (band) filter.type = band.type\n filter.connect(gain)\n gain.connect(target.output)\n const oscillators = plan.layers.map((layer) => {\n const time = target.time + layer.at\n const oscillator = context.createOscillator()\n if (layer.source.kind === 'osc') {\n oscillator.type = layer.source.wave\n assign(oscillator.frequency, layer.source.frequency, time)\n rampTo(oscillator.frequency, layer.source.frequency, time)\n }\n if (band) {\n assign(filter.frequency, band.frequency, time)\n if (band.q !== undefined) filter.Q.value = band.q\n }\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n oscillator.connect(envelope)\n envelope.connect(filter)\n oscillator.start(time)\n oscillator.stop(end(layer, time))\n return oscillator\n })\n return voiceOf(oscillators)\n}\n","// The art scene's primitives (cena L1319–1328, L1369): `sNoise`, `sTone` and `voice`, each layer with its own output stage (`outAt`: distance\n// gain, pan, reverb send), and the siren straight to the bus. Built in the team's order so the traces match node for node.\nimport type { PlannedLayer, SoundPlan } from '../plan'\nimport { applyEnvelope, assign, filterNode, gainNode, noiseSource, rampTo, voiceOf } from './nodes'\nimport type { RealizedVoice, RealizeTarget } from './nodes'\n\nconst end = (layer: PlannedLayer, start: number): number => start + layer.duration + layer.tail\n\n/** `outAt`: the layer level, the stereo panner when the plan pans and the context has one, the bus, then the reverb send. */\nfunction outputStage(plan: SoundPlan, layer: PlannedLayer, target: RealizeTarget): GainNode {\n const { context } = target\n const level = gainNode(context, layer.level)\n let node: AudioNode = level\n if (plan.pan !== undefined && typeof context.createStereoPanner === 'function') {\n const panner = context.createStereoPanner()\n panner.pan.value = plan.pan\n level.connect(panner)\n node = panner\n }\n node.connect(target.output)\n if (layer.wet && target.wet) {\n const send = gainNode(context, layer.wet)\n node.connect(send)\n send.connect(target.wet)\n }\n return level\n}\n\nfunction realizeNoiseLayer(plan: SoundPlan, layer: PlannedLayer, target: RealizeTarget): AudioScheduledSourceNode[] {\n const { context } = target\n const time = target.time + layer.at\n const source = noiseSource(target, layer.source.kind === 'noise' && layer.source.loop)\n const filters = (layer.filters?.bank ?? []).map((filter) => {\n const node = filterNode(context, filter, time)\n rampTo(node.frequency, filter.frequency, time)\n return node\n })\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n let tail: AudioNode = source\n for (const filter of filters) tail = tail.connect(filter)\n tail.connect(envelope)\n envelope.connect(outputStage(plan, layer, target))\n source.start(time, layer.source.kind === 'noise' ? layer.source.offset : 0)\n source.stop(end(layer, time))\n return [source]\n}\n\nfunction realizeToneLayer(plan: SoundPlan, layer: PlannedLayer, target: RealizeTarget): AudioScheduledSourceNode[] {\n const { context } = target\n const time = target.time + layer.at\n const oscillator = context.createOscillator()\n if (layer.source.kind === 'osc') {\n oscillator.type = layer.source.wave\n assign(oscillator.frequency, layer.source.frequency, time)\n rampTo(oscillator.frequency, layer.source.frequency, time)\n }\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n oscillator.connect(envelope)\n envelope.connect(outputStage(plan, layer, target))\n oscillator.start(time)\n oscillator.stop(end(layer, time))\n return [oscillator]\n}\n\nfunction realizeVoiceLayer(plan: SoundPlan, layer: PlannedLayer, target: RealizeTarget): AudioScheduledSourceNode[] {\n const source = layer.source\n if (source.kind !== 'formant_voice') return []\n const { context } = target\n const time = target.time + layer.at\n const oscillator = context.createOscillator()\n oscillator.type = source.wave\n assign(oscillator.frequency, source.frequency, time)\n rampTo(oscillator.frequency, source.frequency, time)\n const vibrato = context.createOscillator()\n vibrato.frequency.value = source.vibrato.rate\n const vibratoDepth = gainNode(context, source.vibrato.depth)\n vibrato.connect(vibratoDepth)\n vibratoDepth.connect(oscillator.frequency)\n const formants = source.formants.map((formant) => filterNode(context, { type: 'bandpass', frequency: { value: formant.frequency }, q: formant.q }, time))\n const breath = noiseSource(target, true)\n const breathBand = filterNode(context, { type: 'bandpass', frequency: { value: source.breath.frequency }, q: source.breath.q }, time)\n const breathLevel = gainNode(context, source.breath.gain)\n const mix = gainNode(context, source.mix)\n for (const formant of formants) oscillator.connect(formant)\n breath.connect(breathBand)\n breathBand.connect(breathLevel)\n for (const formant of formants) formant.connect(mix)\n breathLevel.connect(mix)\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n mix.connect(envelope)\n envelope.connect(outputStage(plan, layer, target))\n const stop = end(layer, time)\n oscillator.start(time)\n vibrato.start(time)\n breath.start(time, source.breath.offset)\n oscillator.stop(stop)\n vibrato.stop(stop)\n breath.stop(stop)\n return [oscillator, vibrato, breath]\n}\n\n/** Every layer in order, each with its own output stage. */\nexport function realizeLayered(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const sources = plan.layers.flatMap((layer) => {\n if (layer.source.kind === 'noise') return realizeNoiseLayer(plan, layer, target)\n if (layer.source.kind === 'osc') return realizeToneLayer(plan, layer, target)\n return realizeVoiceLayer(plan, layer, target)\n })\n return voiceOf(sources)\n}\n\n/** The siren: oscillator with a frequency LFO, envelope, lowpass, straight to the bus with a reverb send. */\nexport function realizeSiren(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const { context } = target\n const layer = plan.layers[0] as PlannedLayer\n const time = target.time + layer.at\n const oscillator = context.createOscillator()\n if (layer.source.kind === 'osc') {\n oscillator.type = layer.source.wave\n assign(oscillator.frequency, layer.source.frequency, time)\n rampTo(oscillator.frequency, layer.source.frequency, time)\n }\n const depths = layer.modulators.map((modulator) => {\n const lfo = context.createOscillator()\n if (modulator.wave) lfo.type = modulator.wave\n lfo.frequency.value = modulator.rate\n const depth = gainNode(context, modulator.depth)\n lfo.connect(depth)\n if (modulator.target === 'frequency') depth.connect(oscillator.frequency)\n return { lfo, depth, target: modulator.target }\n })\n const lfos = depths.map(({ lfo }) => lfo)\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n for (const { depth, target: modulated } of depths) if (modulated === 'gain') depth.connect(envelope.gain)\n const filters = (layer.filters?.bank ?? []).map((filter) => filterNode(context, filter, time))\n let tail: AudioNode = oscillator\n for (const filter of filters) tail = tail.connect(filter)\n tail.connect(envelope)\n envelope.connect(target.output)\n if (layer.wet && target.wet) {\n const send = gainNode(context, layer.wet)\n envelope.connect(send)\n send.connect(target.wet)\n }\n const stop = end(layer, time)\n oscillator.start(time)\n for (const lfo of lfos) lfo.start(time)\n oscillator.stop(stop)\n for (const lfo of lfos) lfo.stop(stop)\n return voiceOf([oscillator, ...lfos])\n}\n","// The weapon audio of the kit (`weapons-three`, first written against raw WebAudio): per layer, either a noise burst (source, filter, envelope gain)\n// or an oscillator (oscillator, envelope gain), created in that order and chained straight to the bus. The level is already in the envelope.\nimport type { PlannedLayer, SoundPlan } from '../plan'\nimport { applyEnvelope, assign, filterNode, noiseSource, rampTo, voiceOf } from './nodes'\nimport type { RealizedVoice, RealizeTarget } from './nodes'\n\nfunction noiseLayer(layer: PlannedLayer, target: RealizeTarget, time: number): AudioScheduledSourceNode {\n const { context } = target\n const source = noiseSource(target, layer.source.kind === 'noise' && layer.source.loop)\n const filters = (layer.filters?.bank ?? []).map((filter) => filterNode(context, filter, time))\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n let tail: AudioNode = source\n for (const filter of filters) tail = tail.connect(filter)\n tail.connect(envelope).connect(target.output)\n source.start(time, layer.source.kind === 'noise' ? layer.source.offset : 0)\n source.stop(time + layer.duration + layer.tail)\n return source\n}\n\nfunction toneLayer(layer: PlannedLayer, target: RealizeTarget, time: number): AudioScheduledSourceNode {\n const { context } = target\n const oscillator = context.createOscillator()\n if (layer.source.kind === 'osc') {\n oscillator.type = layer.source.wave\n assign(oscillator.frequency, layer.source.frequency, time)\n rampTo(oscillator.frequency, layer.source.frequency, time)\n }\n const envelope = context.createGain()\n applyEnvelope(envelope.gain, layer.envelope, time)\n oscillator.connect(envelope).connect(target.output)\n oscillator.start(time)\n oscillator.stop(time + layer.duration + layer.tail)\n return oscillator\n}\n\n/** One noise burst or one tone per layer, in the order written. */\nexport function realizeWeapon(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n const sources = plan.layers.map((layer) => {\n const time = target.time + layer.at\n return layer.source.kind === 'noise' ? noiseLayer(layer, target, time) : toneLayer(layer, target, time)\n })\n return voiceOf(sources)\n}\n","import type { SoundPlan } from '../plan'\nimport type { BuildOrder } from '../recipe'\nimport type { RealizedVoice, RealizeTarget } from './nodes'\nimport { realizeBoom, realizeBurst, realizeCalls, realizeChord, realizeGroan, realizeScream, realizeStatic } from './realize-game'\nimport { realizeLayered, realizeSiren } from './realize-layered'\nimport { realizeWeapon } from './realize-weapon'\n\nconst BUILDERS: Readonly<Record<BuildOrder, (plan: SoundPlan, target: RealizeTarget) => RealizedVoice>> = {\n layered: realizeLayered,\n burst: realizeBurst,\n scream: realizeScream,\n groan: realizeGroan,\n boom: realizeBoom,\n static: realizeStatic,\n chord: realizeChord,\n calls: realizeCalls,\n siren: realizeSiren,\n weapon: realizeWeapon,\n}\n\n/** Builds a plan's nodes on `target`, in the node order of the team routine its `order` names. */\nexport function realize(plan: SoundPlan, target: RealizeTarget): RealizedVoice {\n return BUILDERS[plan.order](plan, target)\n}\n","import type { Vec3 } from '@adatechnology/game-contracts'\n\nimport { createSoundRegistry } from '../bank'\nimport type { SoundRegistry } from '../bank'\nimport { falloffGain, isSilent } from '../falloff'\nimport { DEFAULT_LISTENER, listenerDistance } from '../listener'\nimport type { DistanceMode, Listener } from '../listener'\nimport { DEFAULT_MIX, busGain, resolveMix } from '../mix'\nimport type { BusSetting, MixProfile } from '../mix'\nimport { planSound } from '../plan'\nimport type { PlanInput, SoundPlan } from '../plan'\nimport type { BusId, SoundBank, SoundRecipe } from '../recipe'\nimport { createRng, streamFor } from '../rng'\nimport { busPriority, createVoiceManager } from '../voices'\nimport type { VoiceGroup } from '../voices'\nimport { buildChain } from './chain'\nimport type { MixChain } from './chain'\nimport { globalContext, unlockContext } from './context'\nimport { createLoopHandle } from './engine-loop'\nimport type { AudioLoopHandle, LoopHost } from './engine-loop'\nimport { createNoiseStore, noiseBuffer, prepareNoise } from './engine-noise'\nimport type { NoiseStore } from './engine-noise'\nimport type { RealizedVoice } from './nodes'\nimport { createStartQueue } from './engine-queue'\nimport type { StartQueueOptions } from './engine-queue'\nimport { realize } from './realize'\n\nexport type PlayOptions = {\n readonly position?: Vec3\n /** Meters; overrides `position` for the distance (not for the pan). */\n readonly distance?: number\n readonly volume?: number\n readonly params?: Readonly<Record<string, number>>\n /** This sound's own stream: same seed, same sound. */\n readonly seed?: number\n /** Seconds from now. */\n readonly delay?: number\n /** A named stream of the engine (`streamFor(seed, name)`), so one subject never shifts another's sounds. */\n readonly channel?: string\n}\n\nexport type VoiceHandle = { readonly id: number; readonly plan: SoundPlan; stop(): void }\n\n/** A subject's own random stream; `ownNoise` also gives it its own noise buffer, filled from that stream (the order `createWeaponAudio` uses). */\nexport type AudioChannel = {\n readonly random: () => number\n play(id: string, options?: PlayOptions): VoiceHandle | null\n plan(id: string, options?: PlayOptions): SoundPlan | null\n}\n\nexport type AudioStats = {\n readonly context: 'none' | AudioContextState\n readonly voices: number\n readonly peak: number\n readonly dropped: number\n readonly maxVoices: number\n readonly loops: number\n}\n\nexport type AudioEngineOptions = {\n /** Seeds the engine stream: the noise, the reverb impulse and every sound played without its own seed or channel. Default 1. */\n readonly seed?: number\n /** Default `art_scene` (Q1). */\n readonly mix?: string | MixProfile\n readonly profiles?: Readonly<Record<string, MixProfile>>\n readonly banks?: readonly SoundBank[]\n readonly maxVoices?: number\n readonly groups?: Readonly<Record<string, VoiceGroup>>\n readonly distance?: DistanceMode\n /** 0 (clear) to 1 (behind a wall) for a sound at a point; without it there is no occlusion (Q8). */\n readonly occlusion?: (point: Vec3) => number\n readonly createContext?: () => AudioContext | null\n /** Build voices in timed slices between frames instead of inside `play` (a sound starts a few ms late; a burst never costs a frame). Off by default. */\n readonly deferredStart?: StartQueueOptions\n}\n\nexport type AudioEngine = {\n readonly registry: SoundRegistry\n register(bank: SoundBank): void\n /** Pure: the plan a sound would play with, from `options.seed` or the engine seed; draws nothing from the live streams. */\n plan(id: string, options?: PlayOptions): SoundPlan | null\n play(id: string, options?: PlayOptions): VoiceHandle | null\n playPlan(plan: SoundPlan, options?: { readonly delay?: number }): VoiceHandle | null\n loop(id: string, options?: { readonly volume?: number }): AudioLoopHandle\n channel(options: { readonly seed?: number; readonly random?: () => number; readonly ownNoise?: boolean }): AudioChannel\n setListener(listener: Listener): void\n setBus(id: BusId, setting: BusSetting): void\n setMix(mix: string | MixProfile): void\n /** The master volume of the current chain and of any later one (0 to 1). */\n setMaster(gain: number): void\n /** Creates the context and the mixing chain if needed and resumes it; call from a click or a key. */\n unlock(): void\n /** Creates the context, the mixing chain (reverb impulse included) and the shared noise buffer now, so the first sound does not pay for them inside a frame. Returns false without a context. */\n warmUp(): boolean\n stats(): AudioStats\n /** RMS (0 to 1) of what a bus carries now, read from an analyser the first time you ask; sounds started before that do not reach it. 0 without a context. */\n level(bus: BusId): number\n dispose(): void\n}\n\nconst usesNoise = (recipe: SoundRecipe): boolean => recipe.layers.some((layer) => layer.source.kind !== 'osc')\nconst planUsesNoise = (plan: SoundPlan): boolean => plan.layers.some((layer) => layer.source.kind !== 'osc')\n\n/**\n * The sound engine: plans recipes and builds them on a lazily created AudioContext through one of the team mixing chains. Without an AudioContext\n * (Node, workers) every call except `plan` does nothing.\n */\nexport function createAudioEngine(options: AudioEngineOptions = {}): AudioEngine {\n const seed = options.seed ?? 1\n const registry = createSoundRegistry(options.banks)\n const voices = createVoiceManager({ ...(options.groups ? { groups: options.groups } : {}), ...(options.maxVoices === undefined ? {} : { maxVoices: options.maxVoices }) })\n const engineRandom = createRng(seed)\n const shared = createNoiseStore(engineRandom)\n const busSettings = new Map<BusId, BusSetting>()\n const busNodes = new Map<BusId, GainNode>()\n const meters = new Map<BusId, { readonly analyser: AnalyserNode; readonly data: Float32Array<ArrayBuffer> }>()\n const active = new Map<number, RealizedVoice>()\n const loops = new Set<{ rewire(): void; stop(): void; readonly created: boolean }>()\n const named = new Map<string, () => number>()\n let mix = resolveMix(options.mix ?? DEFAULT_MIX, options.profiles)\n let context: AudioContext | null = null\n let chain: MixChain | null = null\n let listener: Listener = DEFAULT_LISTENER\n let lastTime = 0\n\n const outputFor = (bus: BusId): AudioNode => (busNodes.get(bus) ?? chain?.master) as AudioNode\n\n // a bus somebody asked the level of gets an analyser as soon as it has a node, so sounds started before the first reading are metered too\n const watched = new Set<BusId>()\n const meterOf = (bus: BusId): { readonly analyser: AnalyserNode; readonly data: Float32Array<ArrayBuffer> } | undefined => {\n const existing = meters.get(bus)\n if (existing) return existing\n const node = busNodes.get(bus)\n if (!context || !node || typeof context.createAnalyser !== 'function') return undefined\n const analyser = context.createAnalyser()\n analyser.fftSize = 1024\n node.connect(analyser)\n const made = { analyser, data: new Float32Array(analyser.fftSize) }\n meters.set(bus, made)\n return made\n }\n\n const ensureBus = (bus: BusId): void => {\n if (!context || !chain || busNodes.has(bus)) return\n const node = context.createGain()\n node.connect(chain.master)\n busNodes.set(bus, node)\n if (watched.has(bus)) meterOf(bus)\n }\n\n const ready = (): AudioContext | null => {\n if (context) return context\n const created = (options.createContext ?? globalContext)()\n if (!created) return null\n context = created\n chain = buildChain(created, mix, engineRandom)\n if (mix.noise.create === 'eager') noiseBuffer(shared, created, mix.noise.seconds)\n for (const [bus, setting] of Object.entries(mix.buses ?? {}) as [BusId, BusSetting][]) {\n busSettings.set(bus, { ...setting, ...busSettings.get(bus) })\n }\n for (const [bus, setting] of busSettings) {\n ensureBus(bus)\n ;(busNodes.get(bus) as GainNode).gain.value = busGain(setting)\n }\n lastTime = created.currentTime\n return created\n }\n\n const advance = (): void => {\n if (!context) return\n const elapsed = context.currentTime - lastTime\n lastTime = context.currentTime\n if (elapsed > 0) for (const id of voices.advance(elapsed)) active.delete(id)\n }\n\n const inputFor = (recipe: SoundRecipe, playOptions: PlayOptions, random: () => number): PlanInput => ({\n random,\n listener,\n noiseSeconds: mix.noise.seconds,\n ...(options.distance ? { distanceMode: options.distance } : {}),\n ...(playOptions.volume === undefined ? {} : { volume: playOptions.volume }),\n ...(playOptions.distance === undefined ? {} : { distance: playOptions.distance }),\n ...(playOptions.position ? { position: playOptions.position } : {}),\n ...(playOptions.params ? { params: playOptions.params } : {}),\n ...(options.occlusion && playOptions.position && recipe.falloff?.model !== 'none' ? { occlusion: options.occlusion(playOptions.position) } : {}),\n })\n\n const startQueue = options.deferredStart ? createStartQueue(options.deferredStart) : null\n\n const build = (plan: SoundPlan, store: NoiseStore, delay: number): RealizedVoice => {\n const audio = context as AudioContext\n return realize(plan, {\n context: audio,\n output: outputFor(plan.bus),\n ...(chain?.wet ? { wet: chain.wet } : {}),\n noise: () => noiseBuffer(store, audio, mix.noise.seconds),\n time: audio.currentTime + delay,\n })\n }\n\n // the voice a deferred sound is tracked by until it is built: `stop` cancels it or stops what was built\n const deferVoice = (plan: SoundPlan, store: NoiseStore, voiceId: number | undefined, delay: number): RealizedVoice => {\n let built: RealizedVoice | null = null\n let cancelled = false\n const pending: RealizedVoice = {\n get sources() {\n return built?.sources ?? []\n },\n stop() {\n cancelled = true\n built?.stop()\n },\n }\n ;(startQueue as ReturnType<typeof createStartQueue>).push({\n run() {\n if (!cancelled && context) built = build(plan, store, delay)\n },\n drop() {\n if (voiceId === undefined) return\n voices.release(voiceId)\n active.delete(voiceId)\n },\n })\n return pending\n }\n\n const start = (plan: SoundPlan, store: NoiseStore, voiceId: number | undefined, delay = 0): VoiceHandle | null => {\n const realized = startQueue ? deferVoice(plan, store, voiceId, delay) : build(plan, store, delay)\n if (voiceId === undefined) return null\n voices.setLength(voiceId, plan.length + delay)\n active.set(voiceId, realized)\n return {\n id: voiceId,\n plan,\n stop() {\n realized.stop()\n voices.release(voiceId)\n active.delete(voiceId)\n },\n }\n }\n\n const admit = (recipe: SoundRecipe, gain: number, distance: number): number | null => {\n const decision = voices.request({ ...(recipe.group ? { group: recipe.group } : {}), priority: recipe.priority ?? busPriority(recipe.bus), gain, distance, length: 0 })\n if (!decision.accepted) return null\n for (const id of decision.evicted) {\n active.get(id)?.stop()\n active.delete(id)\n }\n return decision.id\n }\n\n const playWith = (id: string, playOptions: PlayOptions, random: () => number, store: NoiseStore): VoiceHandle | null => {\n const recipe = registry.sound(id)\n if (!recipe || busSettings.get(recipe.bus)?.muted) return null\n const distance = playOptions.distance ?? (playOptions.position ? listenerDistance(listener, playOptions.position, options.distance) : 0)\n const level = falloffGain(recipe.falloff, playOptions.volume ?? 1, distance)\n const silent = isSilent(recipe.falloff, level)\n // a sound too quiet to play does not even start the context (the team routines return before touching it)\n if (silent && !recipe.keepSilent) return null\n const audio = ready()\n if (!audio) return null\n unlockContext(audio)\n advance()\n const voiceId = silent ? undefined : admit(recipe, level, distance)\n if (voiceId === null) return null\n if (!silent && usesNoise(recipe)) prepareNoise(store, audio, mix.noise.seconds)\n const plan = planSound(recipe, inputFor(recipe, playOptions, playOptions.seed === undefined ? random : createRng(playOptions.seed)))\n return plan ? start(plan, store, voiceId, playOptions.delay) : null\n }\n\n const randomFor = (playOptions: PlayOptions): (() => number) => {\n if (playOptions.channel === undefined) return engineRandom\n const existing = named.get(playOptions.channel)\n if (existing) return existing\n const stream = streamFor(seed, playOptions.channel)\n named.set(playOptions.channel, stream)\n return stream\n }\n\n const planWith = (id: string, playOptions: PlayOptions, random: () => number): SoundPlan | null => {\n const recipe = registry.sound(id)\n return recipe ? planSound(recipe, inputFor(recipe, playOptions, random)) : null\n }\n\n const loopHost: LoopHost = {\n ready,\n output: outputFor,\n prepareNoise: () => context && prepareNoise(shared, context, mix.noise.seconds),\n noise: () => noiseBuffer(shared, context as AudioContext, mix.noise.seconds),\n register: (loop) => void loops.add(loop),\n unregister: (loop) => void loops.delete(loop),\n }\n\n return {\n registry,\n register: (bank) => registry.register(bank),\n plan: (id, playOptions = {}) => planWith(id, playOptions, createRng(playOptions.seed ?? seed)),\n play: (id, playOptions = {}) => playWith(id, playOptions, randomFor(playOptions), shared),\n playPlan(plan, playOptions = {}) {\n const audio = ready()\n if (!audio) return null\n advance()\n const recipe = { id: plan.id, bus: plan.bus, layers: [], sources: [], priority: plan.priority, ...(plan.group ? { group: plan.group } : {}) }\n const voiceId = plan.silent ? undefined : admit(recipe, plan.level, plan.distance)\n if (voiceId === null) return null\n if (planUsesNoise(plan)) prepareNoise(shared, audio, mix.noise.seconds)\n return start(plan, shared, voiceId, playOptions.delay)\n },\n loop: (id, loopOptions = {}) => createLoopHandle(registry.loop(id), loopHost, loopOptions.volume),\n channel(channelOptions) {\n const random = channelOptions.random ?? (channelOptions.seed === undefined ? engineRandom : createRng(channelOptions.seed))\n const store = channelOptions.ownNoise ? createNoiseStore(random) : shared\n return {\n random,\n play: (id, playOptions = {}) => playWith(id, playOptions, random, store),\n plan: (id, playOptions = {}) => planWith(id, playOptions, createRng(playOptions.seed ?? seed)),\n }\n },\n setListener(next) {\n listener = next\n },\n setBus(id, setting) {\n busSettings.set(id, { ...busSettings.get(id), ...setting })\n if (!context) return\n ensureBus(id)\n ;(busNodes.get(id) as GainNode).gain.value = busGain(busSettings.get(id))\n },\n setMix(next) {\n const previous = mix\n mix = resolveMix(next, options.profiles)\n if (!context || !chain) return\n const old = chain\n chain = buildChain(context, mix, engineRandom)\n if (mix.noise.seconds !== previous.noise.seconds) shared.reset()\n for (const node of busNodes.values()) {\n node.disconnect()\n node.connect(chain.master)\n }\n for (const loop of loops) loop.rewire()\n old.disconnect()\n },\n setMaster(gain) {\n mix = { ...mix, master: gain }\n if (chain) chain.master.gain.value = gain\n },\n unlock() {\n const audio = ready()\n if (audio) unlockContext(audio)\n },\n warmUp() {\n const audio = ready()\n if (!audio) return false\n noiseBuffer(shared, audio, mix.noise.seconds)\n return true\n },\n level(bus) {\n watched.add(bus)\n ensureBus(bus)\n const meter = meterOf(bus)\n if (!meter) return 0\n meter.analyser.getFloatTimeDomainData(meter.data)\n let sum = 0\n for (const sample of meter.data) sum += sample * sample\n return Math.sqrt(sum / meter.data.length)\n },\n stats() {\n advance()\n const voiceStats = voices.stats()\n return {\n context: context ? context.state : 'none',\n voices: voiceStats.active,\n peak: voiceStats.peak,\n dropped: voiceStats.dropped,\n maxVoices: voiceStats.maxVoices,\n loops: [...loops].filter((loop) => loop.created).length,\n }\n },\n dispose() {\n // closing the context ends every voice; they only leave the limiter\n startQueue?.clear()\n for (const id of active.keys()) voices.release(id)\n for (const loop of [...loops]) loop.stop()\n active.clear()\n void context?.close()\n context = null\n chain = null\n busNodes.clear()\n meters.clear()\n shared.reset()\n },\n }\n}\n","import type { AudioListener, AudioSink, LoopHandle, SoundHandle, SoundRequest } from '@adatechnology/game-contracts'\n\nimport type { SoundBank } from '../recipe'\nimport type { AudioEngine, VoiceHandle } from './engine'\n\n/** An `AudioSink` (what a host lends its modules) that carries the engine behind it, so a module that wants more than `play` can use the engine. */\nexport type EngineSink = AudioSink & { readonly engine: AudioEngine }\n\n/** Lends an engine as the host's `audio`: sounds by key, loops, the listener, and banks registered into the same engine. */\nexport function createAudioSink(engine: AudioEngine): EngineSink {\n const playing = new Map<number, VoiceHandle>()\n return {\n engine,\n play(request: SoundRequest): SoundHandle | null {\n const handle = engine.play(request.sound, {\n ...(request.position ? { position: request.position } : {}),\n ...(request.volume === undefined ? {} : { volume: request.volume }),\n ...(request.params ? { params: request.params } : {}),\n ...(request.seed === undefined ? {} : { seed: request.seed }),\n })\n if (!handle) return null\n playing.set(handle.id, handle)\n return { id: handle.id }\n },\n stop(handle) {\n playing.get(handle.id)?.stop()\n playing.delete(handle.id)\n },\n loop(sound): LoopHandle {\n const loop = engine.loop(sound)\n return { set: (state) => loop.set({ ...(state.volume === undefined ? {} : { volume: state.volume }), ...(state.frequency === undefined ? {} : { frequency: state.frequency }) }), stop: () => loop.stop() }\n },\n setListener(listener: AudioListener) {\n engine.setListener(listener)\n },\n register(bank: unknown) {\n engine.register(bank as SoundBank)\n },\n }\n}\n","export type AudioBenchText = {\n readonly group: string\n readonly name: string\n readonly probe: string\n readonly controls: Readonly<Record<'sound' | 'distance' | 'bearing' | 'volume' | 'mix' | 'seed' | 'play' | 'voice_storm' | 'loop' | 'loop_level' | 'loop_pitch' | 'source', string>>\n readonly hints: Readonly<Record<'distance' | 'bearing' | 'mix' | 'seed' | 'voice_storm' | 'loop_pitch' | 'source', string>>\n readonly options: Readonly<Record<'none' | 'bench' | 'probe', string>>\n readonly layers: Readonly<Record<'reverb' | 'compressor' | 'panning' | 'muffling', string>>\n readonly metrics: Readonly<Record<'voices' | 'peak' | 'dropped' | 'loops' | 'context' | 'plan_length' | 'plan_level' | 'plan_pan' | 'level_weapons' | 'level_voices' | 'level_world' | 'level_ambience' | 'level_weather' | 'level_ui', string>>\n readonly scenarios: Readonly<Record<'panning' | 'distance' | 'determinism' | 'limiter', string>>\n readonly mixes: Readonly<Record<string, string>>\n /** Text of a sound or loop id when the game has one; the bench falls back to the id. */\n readonly sheet: Readonly<Record<'title' | 'level' | 'distance' | 'pan' | 'length' | 'silent' | 'layer' | 'none', string>>\n}\n\nconst EN: AudioBenchText = {\n group: 'Sound',\n name: 'Sound area',\n probe: 'Sound probe',\n controls: {\n sound: 'Sound',\n distance: 'Distance',\n bearing: 'Bearing',\n volume: 'Volume',\n mix: 'Mixing chain',\n seed: 'Seed',\n play: 'Play',\n voice_storm: 'Voice storm',\n loop: 'Loop',\n loop_level: 'Loop level',\n loop_pitch: 'Loop pitch',\n source: 'Source',\n },\n hints: {\n distance: 'Metres from the listener: the level falls and the sound is muffled with it.',\n bearing: 'Degrees from straight ahead, positive to the right: shows the panning.',\n mix: 'The game chain (master only) or the art scene chain (compressor and reverb).',\n seed: 'The same seed gives the same sound.',\n voice_storm: 'Twenty of the chosen sound at once: the voice limiter drops what its group and the global cap refuse.',\n loop_pitch: 'Frequency of an oscillator loop, in hertz (0 leaves it where it is).',\n source: 'Where the sound comes from: the distance and bearing set here, or the probe standing in the area.',\n },\n options: { none: 'None', bench: 'Bench settings', probe: 'The probe' },\n layers: { reverb: 'Reverb', compressor: 'Compressor', panning: 'Panning', muffling: 'Muffling by distance' },\n metrics: {\n voices: 'Voices playing',\n peak: 'Most voices at once',\n dropped: 'Voices dropped',\n loops: 'Loops running',\n context: 'Audio context',\n plan_length: 'Chosen sound: length',\n plan_level: 'Chosen sound: level',\n plan_pan: 'Chosen sound: pan',\n level_weapons: 'Level: weapons',\n level_voices: 'Level: voices',\n level_world: 'Level: world',\n level_ambience: 'Level: ambience',\n level_weather: 'Level: weather',\n level_ui: 'Level: interface',\n },\n scenarios: {\n panning: 'A sound to the right is heard on the right, one to the left on the left, one ahead in the middle',\n distance: 'The farther a sound, the quieter, until it is not played',\n determinism: 'The same seed gives the same sound plan, another seed another one',\n limiter: 'The voice limiter holds a storm of voices to its group rule and its global cap',\n },\n mixes: { game: 'Game', art_scene: 'Art scene' },\n sheet: { title: 'Sound plan', level: 'level', distance: 'distance', pan: 'pan', length: 'seconds', silent: 'too far to be heard', layer: 'layer', none: 'no sound chosen' },\n}\n\nconst PT_BR: AudioBenchText = {\n group: 'Som',\n name: 'Área de som',\n probe: 'Sonda de som',\n controls: {\n sound: 'Som',\n distance: 'Distância',\n bearing: 'Direção',\n volume: 'Volume',\n mix: 'Cadeia de mixagem',\n seed: 'Semente',\n play: 'Tocar',\n voice_storm: 'Tempestade de vozes',\n loop: 'Laço',\n loop_level: 'Nível do laço',\n loop_pitch: 'Altura do laço',\n source: 'Origem',\n },\n hints: {\n distance: 'Metros até o ouvinte: o nível cai e o som abafa junto.',\n bearing: 'Graus a partir da frente, positivo para a direita: mostra o pan.',\n mix: 'A cadeia do jogo (só o master) ou a da Cena de Arte (compressor e reverb).',\n seed: 'A mesma semente dá o mesmo som.',\n voice_storm: 'Vinte do som escolhido de uma vez: o limite de vozes derruba o que a regra do grupo e o teto global recusam.',\n loop_pitch: 'Frequência de um laço de oscilador, em hertz (0 deixa onde está).',\n source: 'De onde vem o som: a distância e a direção daqui, ou a sonda que está na área.',\n },\n options: { none: 'Nenhum', bench: 'Ajustes da bancada', probe: 'A sonda' },\n layers: { reverb: 'Reverb', compressor: 'Compressor', panning: 'Pan', muffling: 'Abafamento pela distância' },\n metrics: {\n voices: 'Vozes tocando',\n peak: 'Mais vozes de uma vez',\n dropped: 'Vozes derrubadas',\n loops: 'Laços ligados',\n context: 'Contexto de áudio',\n plan_length: 'Som escolhido: duração',\n plan_level: 'Som escolhido: nível',\n plan_pan: 'Som escolhido: pan',\n level_weapons: 'Nível: armas',\n level_voices: 'Nível: vozes',\n level_world: 'Nível: mundo',\n level_ambience: 'Nível: ambiente',\n level_weather: 'Nível: clima',\n level_ui: 'Nível: interface',\n },\n scenarios: {\n panning: 'Um som à direita sai à direita, à esquerda sai à esquerda, à frente sai no meio',\n distance: 'Quanto mais longe, mais baixo, até não tocar',\n determinism: 'A mesma semente dá o mesmo plano de som, outra semente dá outro',\n limiter: 'O limite de vozes segura uma tempestade de vozes na regra do grupo e no teto global',\n },\n mixes: { game: 'Jogo', art_scene: 'Cena de Arte' },\n sheet: { title: 'Plano do som', level: 'nível', distance: 'distância', pan: 'pan', length: 'segundos', silent: 'longe demais para ouvir', layer: 'camada', none: 'nenhum som escolhido' },\n}\n\nexport const audioBenchTextOf = (locale: string): AudioBenchText => (locale === 'en' ? EN : PT_BR)\n","import type { AreaPlacement, BenchChange, ChoiceOption, ModuleControl, ModuleHost, ModuleLayer, ModuleMetric, ModuleScenario, TestableItem, TestableModule, Vec3 } from '@adatechnology/game-contracts'\n\nimport { GAME_SFX_BANK } from '../recipes/noise-class'\nimport { LIBRARY_BANK } from '../library'\nimport { DISTANCE_CURVES } from '../falloff'\nimport { MIX_PROFILES } from '../mix'\nimport type { MixProfile } from '../mix'\nimport { BUS_IDS } from '../recipe'\nimport type { BusId, Layer, SoundBank } from '../recipe'\nimport type { SoundPlan } from '../plan'\nimport { createVoiceManager } from '../voices'\nimport { createAudioEngine } from '../webaudio/engine'\nimport type { AudioEngine, VoiceHandle } from '../webaudio/engine'\nimport type { EngineSink } from '../webaudio/sink'\nimport type { AudioLoopHandle } from '../webaudio/engine-loop'\nimport { audioBenchTextOf } from './locale'\nimport type { AudioBenchText } from './locale'\n\n/**\n * Two probe sounds of the bench itself (a ping and a hiss), so panning, distance and the seed can be heard on something that has no subject. They are\n * made by the kit, not delivered by any team (`sdk` in the sources).\n */\nexport const BENCH_BANK: SoundBank = {\n id: 'audio_bench',\n sounds: [\n {\n id: 'bench_ping',\n bus: 'ui',\n pan: true,\n duration: 0.25,\n layers: [\n {\n gain: 0.5,\n wet: 0.3,\n source: { kind: 'osc', wave: 'sine', frequency: { from: 880 } },\n envelope: [\n [0, 0.0001, 'set', 'fixed'],\n [0.002, 1, 'exp'],\n ['1d', 0.0001, 'exp', 'fixed'],\n ],\n } satisfies Layer,\n ],\n falloff: DISTANCE_CURVES.art_scene,\n sources: ['sdk: bench probe, a 880 Hz ping through the art scene output stage'],\n },\n {\n id: 'bench_hiss',\n bus: 'ui',\n pan: true,\n duration: [0.3, 0.9],\n layers: [\n {\n gain: 0.4,\n source: { kind: 'noise', offset: 'random', offsetScale: 1.5, loop: true },\n filters: { mode: 'serial', bank: [{ type: 'highpass', frequency: { set: 3000 }, q: 0.7 }] },\n envelope: [\n [0, 0.0001, 'set', 'fixed'],\n [0.002, 1, 'exp'],\n ['1d', 0.0001, 'exp', 'fixed'],\n ],\n } satisfies Layer,\n ],\n falloff: DISTANCE_CURVES.art_scene,\n sources: ['sdk: bench probe, a highpass hiss of random length'],\n },\n ],\n}\n\nexport type AudioTestModuleOptions = {\n /** The engine to test (default: the one the host lends in `host.audio`, else a new one of the module's own). */\n engine?: AudioEngine\n /** Banks registered in the engine besides the bench's probes (default the game's noise classes and the library). */\n banks?: readonly SoundBank[]\n locale?: string\n /** Text of a sound or loop id (`sound.glass`) in the game's words; without it the bench shows the bank and the id. */\n translate?: (key: string, locale: string) => string | undefined\n seed?: number\n /** First sound chosen (default `bench_ping`). */\n sound?: string\n /**\n * Draws the thing the probe stands for, where the sound comes from with the `probe` source (for example a portable radio of `game-items-three`). The module\n * draws nothing of its own: without it the area has no probe and the sounds come from the bench settings.\n */\n probe?: (THREE: unknown) => unknown\n}\n\n/** What the scenarios use of the context the test room passes. */\nexport interface AudioScenarioLike {\n expect(condition: boolean, label: string, data?: Record<string, unknown>): void\n}\n\nexport type AudioTestModule = TestableModule<AudioScenarioLike> & {\n /** The engine in use: the host's when it lent one, the module's own otherwise. */\n readonly engine: AudioEngine\n /** The resolved plan of the chosen sound as text (the S3 view: every number decided). */\n sheet(): string\n /** Plays the chosen sound as the bench is set. */\n play(): VoiceHandle | null\n}\n\nconst DISTANCES = [0, 10, 40, 60, 120, 160] as const\nconst STORM = 20\nconst PROBE_ID = 'audio_probe'\nconst PROBE_AT: Vec3 = [0, 0, -10]\nconst NONE = 'none'\nconst DEFAULT_SOUND = 'bench_ping'\n\ntype Camera = { readonly position: { readonly x: number; readonly y: number; readonly z: number }; getWorldDirection(target: unknown): { readonly x: number; readonly z: number } }\ntype ThreeLike = { Vector3: new () => unknown }\ntype ProbeObject = { userData?: Record<string, unknown>; getWorldPosition(target: unknown): { readonly x: number; readonly y: number; readonly z: number }; traverse(visit: (object: ProbeObject) => void): void }\n\nconst variantOf = (profile: MixProfile, reverb: boolean, compressor: boolean): MixProfile => {\n const { reverb: wet, compressor: chain, ...rest } = profile\n return { ...rest, id: `${profile.id}${reverb ? '' : '+dry'}${compressor ? '' : '+open'}`, ...(wet && reverb ? { reverb: wet } : {}), ...(chain && compressor ? { compressor: chain } : {}) }\n}\n\n/**\n * The sound area of a test room, written against the generic contracts only: it plays any sound of an engine at a distance and bearing from the listener\n * (or from a probe standing in the area), runs loops, throws a storm of voices at the limiter, switches the mixing chain and its parts, reads the\n * level of each bus and prints the resolved plan. The engine is the host's (`host.audio`) when lent, else the module's own.\n */\nexport function createAudioTestModule(options: AudioTestModuleOptions = {}): AudioTestModule {\n const locale = options.locale ?? 'pt-BR'\n const text: AudioBenchText = audioBenchTextOf(locale)\n const banks = [BENCH_BANK, ...(options.banks ?? [GAME_SFX_BANK, LIBRARY_BANK])]\n let engine: AudioEngine = options.engine ?? createAudioEngine({ seed: options.seed ?? 1, banks })\n for (const bank of banks) engine.register(bank)\n let host: ModuleHost | null = null\n let loop: AudioLoopHandle | undefined\n const state = {\n sound: options.sound ?? DEFAULT_SOUND,\n distance: 10,\n bearing: 0,\n volume: 1,\n mix: 'art_scene',\n seed: options.seed ?? 1,\n source: 'bench',\n loop: NONE,\n loopLevel: 0.1,\n loopPitch: 0,\n reverb: true,\n compressor: true,\n panning: true,\n muffling: true,\n }\n\n const nameOf = (id: string): string => {\n const translated = options.translate?.(`sound.${id}`, locale)\n if (translated) return translated\n const bank = engine.registry.bankOf(id)\n return bank ? `${bank} / ${id}` : id\n }\n const soundOptions = (): ChoiceOption[] => engine.registry.soundIds().map((id) => ({ id, name: nameOf(id) }))\n const loopOptions = (): ChoiceOption[] => [{ id: NONE, name: text.options.none }, ...engine.registry.loopIds().map((id) => ({ id, name: nameOf(id) }))]\n\n // the listener is the host camera; without a host (a test) it stands at the origin looking along -z\n const listener = (): { position: Vec3; yaw: number } => {\n const camera = host?.camera as Camera | undefined\n const three = host?.THREE as ThreeLike | undefined\n if (typeof camera?.getWorldDirection !== 'function' || typeof three?.Vector3 !== 'function' || !camera.position) return { position: [0, 0, 0], yaw: 0 }\n const direction = camera.getWorldDirection(new three.Vector3())\n return { position: [camera.position.x, camera.position.y, camera.position.z], yaw: Math.atan2(-direction.x, -direction.z) }\n }\n\n const probePosition = (): Vec3 | undefined => {\n const scene = host?.scene as ProbeObject | undefined\n const three = host?.THREE as ThreeLike | undefined\n if (typeof scene?.traverse !== 'function' || typeof three?.Vector3 !== 'function') return undefined\n let found: Vec3 | undefined\n scene.traverse((object) => {\n if (found || object.userData?.[PROBE_ID] !== true) return\n const at = object.getWorldPosition(new three.Vector3())\n found = [at.x, at.y, at.z]\n })\n return found\n }\n\n // `bearing` is degrees to the right of straight ahead\n const sourceAt = (ears: { position: Vec3; yaw: number }): Vec3 => {\n const probe = state.source === 'probe' ? probePosition() : undefined\n if (probe) return probe\n const bearing = (state.bearing * Math.PI) / 180\n const forward = [-Math.sin(ears.yaw), -Math.cos(ears.yaw)] as const\n const right = [Math.cos(ears.yaw), -Math.sin(ears.yaw)] as const\n return [ears.position[0] + state.distance * (forward[0] * Math.cos(bearing) + right[0] * Math.sin(bearing)), ears.position[1], ears.position[2] + state.distance * (forward[1] * Math.cos(bearing) + right[1] * Math.sin(bearing))]\n }\n\n const playOptions = (): { position?: Vec3; distance?: number; volume: number; seed: number } => {\n const ears = listener()\n engine.setListener(ears)\n const at = sourceAt(ears)\n const distance = Math.hypot(at[0] - ears.position[0], at[2] - ears.position[2])\n return { ...(state.panning ? { position: at } : { distance }), volume: state.volume, seed: state.seed }\n }\n\n // no muffling: the recipe's cutoff divisor is switched off for the one call\n const withMuffling = <T>(id: string, run: () => T): T => {\n const falloff = engine.registry.sound(id)?.falloff\n if (state.muffling || !falloff || falloff.model !== 'inverse_square' || falloff.cutoffK === undefined) return run()\n engine.registry.patch(id, { falloff: { cutoffK: 0 } })\n try {\n return run()\n } finally {\n engine.registry.patch(id, { falloff: { cutoffK: falloff.cutoffK } })\n }\n }\n\n const play = (): VoiceHandle | null => {\n engine.unlock()\n const chosen = state.sound\n return withMuffling(chosen, () => engine.play(chosen, playOptions()))\n }\n\n const plan = (): SoundPlan | null => {\n const chosen = state.sound\n return withMuffling(chosen, () => engine.plan(chosen, playOptions()))\n }\n\n const sheet = (): string => {\n const planned = plan()\n if (!planned) return `${text.sheet.title}: ${engine.registry.sound(state.sound) ? text.sheet.silent : text.sheet.none}`\n const head = `${text.sheet.title}: ${planned.id} (${planned.bus}) ${text.sheet.level} ${planned.level.toFixed(4)} ${text.sheet.distance} ${planned.distance.toFixed(1)} m` + `${planned.pan === undefined ? '' : ` ${text.sheet.pan} ${planned.pan.toFixed(3)}`} ${planned.length.toFixed(3)} ${text.sheet.length}`\n const layers = planned.layers.map((layer, index) => {\n const source = layer.source.kind === 'noise' ? `noise@${layer.source.offset.toFixed(4)}` : layer.source.kind === 'osc' ? `${layer.source.wave}@${layer.source.frequency.value ?? layer.source.frequency.from}` : layer.source.kind\n const filters = (layer.filters?.bank ?? []).map((filter) => `${filter.type}@${(filter.frequency.value ?? filter.frequency.from ?? 0).toFixed(1)}`).join(' ')\n const envelope = layer.envelope.map((point) => `${point.time.toFixed(3)}:${point.value.toPrecision(3)}`).join(' ')\n return ` ${text.sheet.layer} ${index + 1}: ${source} at ${layer.at.toFixed(3)} for ${layer.duration.toFixed(3)} ${filters} [${envelope}]`\n })\n return [head, ...layers].join('\\n')\n }\n\n const applyMix = (): void => {\n const profile = engine && MIX_PROFILES[state.mix]\n if (profile) engine.setMix(variantOf(profile, state.reverb, state.compressor))\n }\n\n const setLoop = (): void => {\n loop?.stop()\n loop = undefined\n if (state.loop === NONE) return\n engine.unlock()\n loop = engine.loop(state.loop)\n loop.set({ volume: state.loopLevel, ...(state.loopPitch > 0 ? { frequency: state.loopPitch } : {}) })\n }\n\n const storm = (): void => {\n engine.unlock()\n const base = playOptions()\n const chosen = state.sound\n for (let index = 0; index < STORM; index++) {\n const spread = base.position ? { position: [base.position[0] + (index - STORM / 2), base.position[1], base.position[2]] as Vec3 } : {}\n withMuffling(chosen, () => engine.play(chosen, { ...base, ...spread, seed: state.seed + index }))\n }\n }\n\n const onChange = (change: BenchChange): void => {\n if (change.kind === 'layer') {\n if (change.id === 'reverb' || change.id === 'compressor') {\n state[change.id] = change.on\n applyMix()\n } else if (change.id === 'panning' || change.id === 'muffling') state[change.id] = change.on\n return\n }\n if (change.kind === 'action') {\n if (change.id === 'play') play()\n else if (change.id === 'voice_storm') storm()\n return\n }\n const { id, value } = change\n if (id === 'sound' && typeof value === 'string') state.sound = value\n else if (id === 'distance' && typeof value === 'string') state.distance = Number(value)\n else if (id === 'bearing' && typeof value === 'number') state.bearing = value\n else if (id === 'volume' && typeof value === 'number') state.volume = value\n else if (id === 'seed' && typeof value === 'number') state.seed = value\n else if (id === 'source' && typeof value === 'string') state.source = value\n else if (id === 'mix' && typeof value === 'string') {\n state.mix = value\n applyMix()\n } else if (id === 'loop' && typeof value === 'string') {\n state.loop = value\n setLoop()\n } else if (id === 'loop_level' && typeof value === 'number') {\n state.loopLevel = value\n loop?.set({ volume: value })\n } else if (id === 'loop_pitch' && typeof value === 'number') {\n state.loopPitch = value\n if (value > 0) loop?.set({ frequency: value })\n }\n }\n\n const items = (): TestableItem[] => {\n const probe = options.probe\n if (!probe) return []\n return [\n {\n id: PROBE_ID,\n name: text.probe,\n movable: false,\n build: (THREE) => {\n const root = probe(THREE) as { userData?: Record<string, unknown> }\n root.userData = root.userData ?? {}\n root.userData[PROBE_ID] = true\n return root\n },\n },\n ]\n }\n\n const controls = (): ModuleControl[] => [\n { kind: 'choice', id: 'sound', name: text.controls.sound, options: soundOptions(), default: state.sound },\n { kind: 'choice', id: 'source', name: text.controls.source, hint: text.hints.source, options: [{ id: 'bench', name: text.options.bench }, { id: 'probe', name: text.options.probe }], default: state.source },\n { kind: 'choice', id: 'distance', name: text.controls.distance, hint: text.hints.distance, options: DISTANCES.map((meters) => ({ id: String(meters), name: `${meters} m` })), default: String(state.distance) },\n { kind: 'number', id: 'bearing', name: text.controls.bearing, hint: text.hints.bearing, unit: '°', min: -180, max: 180, step: 15, default: state.bearing },\n { kind: 'number', id: 'volume', name: text.controls.volume, min: 0, max: 1, step: 0.05, default: state.volume },\n { kind: 'choice', id: 'mix', name: text.controls.mix, hint: text.hints.mix, options: Object.keys(MIX_PROFILES).map((id) => ({ id, name: text.mixes[id] ?? id })), default: state.mix },\n { kind: 'number', id: 'seed', name: text.controls.seed, hint: text.hints.seed, min: 1, max: 9999, step: 1, default: state.seed },\n { kind: 'action', id: 'play', name: text.controls.play },\n { kind: 'action', id: 'voice_storm', name: text.controls.voice_storm, hint: text.hints.voice_storm },\n { kind: 'choice', id: 'loop', name: text.controls.loop, options: loopOptions(), default: state.loop },\n { kind: 'number', id: 'loop_level', name: text.controls.loop_level, min: 0, max: 0.6, step: 0.01, default: state.loopLevel },\n { kind: 'number', id: 'loop_pitch', name: text.controls.loop_pitch, hint: text.hints.loop_pitch, unit: 'Hz', min: 0, max: 400, step: 5, default: state.loopPitch },\n ]\n\n const layers = (): ModuleLayer[] => (['reverb', 'compressor', 'panning', 'muffling'] as const).map((id) => ({ id, name: text.layers[id] }))\n\n const metrics = (): ModuleMetric[] => [\n { id: 'voices', name: text.metrics.voices, digits: 0, read: () => engine.stats().voices },\n { id: 'peak', name: text.metrics.peak, digits: 0, max: engine.stats().maxVoices > 0 && Number.isFinite(engine.stats().maxVoices) ? engine.stats().maxVoices : undefined, read: () => engine.stats().peak },\n { id: 'dropped', name: text.metrics.dropped, digits: 0, read: () => engine.stats().dropped },\n { id: 'loops', name: text.metrics.loops, digits: 0, read: () => engine.stats().loops },\n { id: 'context', name: text.metrics.context, read: () => engine.stats().context },\n { id: 'plan_length', name: text.metrics.plan_length, unit: 's', digits: 2, read: () => plan()?.length ?? 0 },\n { id: 'plan_level', name: text.metrics.plan_level, digits: 3, read: () => plan()?.level ?? 0 },\n { id: 'plan_pan', name: text.metrics.plan_pan, digits: 2, read: () => plan()?.pan ?? 0 },\n ...BUS_IDS.map((bus) => ({ id: `level_${bus}`, name: text.metrics[`level_${bus}` as keyof AudioBenchText['metrics']], digits: 3, read: () => engine.level(bus as BusId) })),\n ]\n\n const scenarios = (): Array<ModuleScenario<AudioScenarioLike>> => [\n {\n id: 'panning',\n name: text.scenarios.panning,\n run: ({ expect }) => {\n engine.setListener({ position: [0, 0, 0], yaw: 0 })\n const pan = (at: Vec3): number => engine.plan('bench_ping', { position: at })?.pan ?? Number.NaN\n expect(pan([10, 0, 0]) > 0.3, 'a sound to the right pans right', { pan: pan([10, 0, 0]) })\n expect(pan([-10, 0, 0]) < -0.3, 'a sound to the left pans left', { pan: pan([-10, 0, 0]) })\n expect(Math.abs(pan([0, 0, -10])) < 0.05, 'a sound ahead stays in the middle', { pan: pan([0, 0, -10]) })\n engine.setListener({ position: [0, 0, 0], yaw: Math.PI / 2 })\n expect(pan([0, 0, -10]) > 0.3, 'turning the listener left puts what was ahead on the right', { pan: pan([0, 0, -10]) })\n engine.setListener(listener())\n },\n },\n {\n id: 'distance',\n name: text.scenarios.distance,\n run: ({ expect }) => {\n const levels = [0, 10, 40, 100].map((meters) => engine.plan('bench_ping', { distance: meters })?.level ?? Number.NaN)\n expect(levels.every((level, index) => index === 0 || level < (levels[index - 1] as number)), 'the level falls with the distance', { levels })\n const far = engine.registry.sound('sfx_pistol') ? engine.plan('sfx_pistol', { distance: 400 }) : null\n expect(far === null, 'a game noise class is not played too far to be heard')\n },\n },\n {\n id: 'determinism',\n name: text.scenarios.determinism,\n run: ({ expect }) => {\n const a = engine.plan('bench_hiss', { seed: 5 })\n const b = engine.plan('bench_hiss', { seed: 5 })\n const c = engine.plan('bench_hiss', { seed: 6 })\n expect(JSON.stringify(a) === JSON.stringify(b), 'the same seed gives the same plan')\n expect(JSON.stringify(a) !== JSON.stringify(c), 'another seed gives another plan')\n },\n },\n {\n id: 'limiter',\n name: text.scenarios.limiter,\n run: ({ expect }) => {\n const voices = createVoiceManager({ maxVoices: 8 })\n const request = (group?: string) => voices.request({ ...(group ? { group } : {}), priority: 3, gain: 0.5, distance: 5, length: 1 })\n const grouped = Array.from({ length: STORM }, () => request('undead_voice')).filter((decision) => decision.accepted).length\n expect(grouped === 1, 'the group cooldown lets one voice of a storm through', { accepted: grouped })\n const plain = Array.from({ length: STORM }, () => request()).filter((decision) => decision.accepted).length\n expect(plain <= 8, 'the global cap holds the rest', { accepted: plain })\n },\n },\n ]\n\n const area = (): { placements: AreaPlacement[]; view: { eye: Vec3; target: Vec3 } } => ({\n placements: options.probe ? [{ item: PROBE_ID, position: PROBE_AT, asleep: true }] : [],\n view: { eye: [0, 1.7, 3], target: [0, 1.4, -10] },\n })\n\n const module: AudioTestModule = {\n id: 'audio_area',\n name: text.name,\n ground: { surface: 'concrete_slab' },\n group: text.group,\n get engine() {\n return engine\n },\n items: () => items(),\n area: () => area(),\n controls: () => controls(),\n layers: () => layers(),\n metrics: () => metrics(),\n scenarios: () => scenarios(),\n sheet,\n play,\n attach(lent) {\n host = lent\n const shared = (lent.audio as EngineSink | undefined)?.engine\n if (shared && shared !== engine) {\n for (const bank of banks) shared.register(bank)\n engine = shared\n }\n // buses get their nodes now, so the level meters see every sound\n for (const bus of BUS_IDS) {\n engine.setBus(bus, {})\n engine.level(bus)\n }\n lent.bench?.patch('sound', { options: soundOptions() })\n lent.bench?.patch('loop', { options: loopOptions() })\n const off = lent.bench?.onChange(onChange)\n const offFrame = lent.onFrame(() => {\n if (!shared) engine.setListener(listener())\n })\n return () => {\n off?.()\n offFrame()\n loop?.stop()\n loop = undefined\n host = null\n }\n },\n }\n return module\n}\n"],"mappings":";AAAA,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,MAAM;AAGL,SAAS,UAAU,MAA4B;AACpD,MAAI,QAAQ,SAAS;AACrB,SAAO,MAAM;AACX,YAAS,QAAQ,eAAgB;AACjC,QAAI,QAAQ,KAAK,KAAK,QAAS,UAAU,IAAK,QAAQ,CAAC;AACvD,aAAS,QAAQ,KAAK,KAAK,QAAS,UAAU,GAAI,QAAQ,EAAE;AAC5D,aAAS,QAAS,UAAU,QAAS,KAAK;AAAA,EAC5C;AACF;AAGO,SAAS,WAAW,MAAc,MAA+B;AACtE,QAAM,QAAQ,OAAO,IAAI;AACzB,MAAI,OAAO;AACX,WAAS,QAAQ,GAAG,QAAQ,MAAM,QAAQ,QAAS,QAAO,KAAK,KAAK,OAAO,MAAM,WAAW,KAAK,GAAG,SAAS,MAAM;AACnH,SAAO,KAAK,KAAM,SAAS,IAAK,MAAM,GAAG,MAAM;AACjD;AAEO,SAAS,UAAU,MAAc,MAAqC;AAC3E,SAAO,UAAU,WAAW,MAAM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C,GAAG,QAAQ,CAAC,GAAG,KAAK,GAAG,EAAE;AAAA,EAClD;AAEA,QAAM,SAA0B;AAAA,IAC9B,IAAI;AAAA,IACJ,MAAM,KAAK;AAAA,IACX,QAAQ,EAAE,SAAS,gBAAgB;AAAA,IACnC,OAAO,KAAK;AAAA,IACZ,IAAI,SAAS;AACX,aAAO;AAAA,IACT;AAAA,IACA,OAAO,MAAM,MAAM;AAAA,IACnB,MAAM,MAAM,KAAK;AAAA,IACjB,UAAU,MAAM,SAAS;AAAA,IACzB,QAAQ,MAAM,OAAO;AAAA,IACrB,SAAS,MAAM,QAAQ;AAAA,IACvB,WAAW,MAAM,UAAU;AAAA,IAC3B;AAAA,IACA;AAAA,IACA,OAAO,MAAM;AACX,aAAO;AACP,YAAM,SAAU,KAAK,OAAkC;AACvD,UAAI,UAAU,WAAW,QAAQ;AAC/B,mBAAW,QAAQ,MAAO,QAAO,SAAS,IAAI;AAC9C,iBAAS;AAAA,MACX;AAEA,iBAAW,OAAO,SAAS;AACzB,eAAO,OAAO,KAAK,CAAC,CAAC;AACrB,eAAO,MAAM,GAAG;AAAA,MAClB;AACA,WAAK,OAAO,MAAM,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;AACtD,WAAK,OAAO,MAAM,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;AACpD,YAAM,MAAM,KAAK,OAAO,SAAS,QAAQ;AACzC,YAAM,WAAW,KAAK,QAAQ,MAAM;AAClC,YAAI,CAAC,OAAQ,QAAO,YAAY,SAAS,CAAC;AAAA,MAC5C,CAAC;AACD,aAAO,MAAM;AACX,cAAM;AACN,iBAAS;AACT,cAAM,KAAK;AACX,eAAO;AACP,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":["level","envelope","fixed","envelope","end","envelope","envelope","layers","envelope"]}
|
|
1
|
+
{"version":3,"sources":["../src/manifest.ts","../src/kit-samples.ts","../src/recipes/scene.ts","../src/recipes/foley.ts","../src/recipes/body-foley.ts","../src/webaudio/sink.ts"],"sourcesContent":["/**\n * The manifest the converter (`scripts/sfx-convert.mjs`) writes next to the converted files: every sound id with its takes per layer, the file\n * facts the criteria check (rate, channels, peak, length) and where each file came from. `sampleBankFromManifest` turns it into a `SoundBank`\n * of `SampleSound`s, with the bus and the numbers of each sound given by the caller.\n */\nimport type { BusId, Falloff, SoundBank } from './recipe'\nimport type { SampleCrossover, SampleRef, SampleSound } from './sample'\n\n/** Licences the SDK accepts (the files are redistributed on npm): public domain or attribution only. */\nexport const SDK_LICENSES = ['CC0', 'CC-BY'] as const\nexport type SdkLicense = (typeof SDK_LICENSES)[number]\n\nexport type SfxFileEntry = {\n /** Path from the manifest's folder: `armas/pistol_9mm_close_01.ogg`. */\n readonly file: string\n readonly sampleRate: number\n readonly channels: number\n /** dBFS. */\n readonly peak: number\n readonly seconds: number\n readonly source: string\n readonly author: string\n readonly license: SdkLicense\n}\n\n/** The layers a file name can end in: `<id>_<layer>_<nn>` (`pistol_9mm_close_01`); a name without one is a `close` take. */\nexport const SFX_LAYERS = ['close', 'far', 'tail_in', 'tail_out'] as const\nexport type SfxLayer = (typeof SFX_LAYERS)[number]\n\nexport type SfxManifestSound = {\n readonly id: string\n readonly category: string\n readonly layers: Partial<Readonly<Record<SfxLayer, readonly SfxFileEntry[]>>>\n}\n\nexport type SfxManifest = {\n readonly version: 1\n readonly format: { readonly codec: 'vorbis'; readonly sampleRate: number; readonly channels: number; readonly peakDb: number }\n readonly sounds: readonly SfxManifestSound[]\n}\n\n/** The numbers of one sound that the files do not say (bus, curve, pitch...). */\nexport type SampleDefaults = {\n readonly bus: BusId\n readonly gain?: number\n readonly pitch?: number\n readonly crossover?: SampleCrossover\n readonly tailGain?: number\n readonly falloff?: Falloff\n readonly cutoffK?: number\n readonly group?: string\n readonly priority?: number\n readonly fallback?: string\n}\n\nexport type SampleBankOptions = {\n readonly id: string\n /** Prefix of every url (where the manifest's folder is served: `/sfx/`). Default ''. */\n readonly baseUrl?: string\n /** Numbers per sound id, or one function; a sound with neither is left out (it has no bus). */\n readonly sounds?: Readonly<Record<string, SampleDefaults>>\n readonly defaults?: (sound: SfxManifestSound) => SampleDefaults | undefined\n}\n\n/** The strength suffixes of a sound id (`kick_hit_heavy`): takes of the tiers of `kick_hit`, from these intensities. */\nexport const SFX_TIERS: Readonly<Record<string, number>> = { light: 0, medium: 0.34, heavy: 0.67 }\n\n/** Splits a file name (no extension) into its sound id, layer and take number. */\nexport function parseSfxName(name: string): { readonly id: string; readonly layer: SfxLayer; readonly take: number } {\n const match = /^(.*?)(?:_(close|far|tail_in|tail_out))?(?:_(\\d+))?$/.exec(name)\n const id = match?.[1] || name\n const layer = (match?.[2] as SfxLayer | undefined) ?? 'close'\n const take = match?.[3] ? Number(match[3]) : 1\n return { id, layer, take }\n}\n\n/** The base id and tier of a sound id: `kick_hit_heavy` → `kick_hit`, `heavy`. */\nexport function splitTier(id: string): { readonly base: string; readonly tier?: string } {\n const match = /^(.*)_(light|medium|heavy)$/.exec(id)\n return match ? { base: match[1] as string, tier: match[2] as string } : { base: id }\n}\n\nconst refsOf = (entries: readonly SfxFileEntry[] | undefined, baseUrl: string): SampleRef[] => (entries ?? []).map((entry) => ({ url: `${baseUrl}${entry.file}` }))\n\n/** A bank of sample sounds from a manifest. */\nexport function sampleBankFromManifest(manifest: SfxManifest, options: SampleBankOptions): SoundBank {\n const baseUrl = options.baseUrl ?? ''\n const samples: SampleSound[] = []\n // `<id>_light`, `_medium`, `_heavy` are the tiers of `<id>`, gathered under it\n const tiersOf = new Map<string, SfxManifestSound[]>()\n for (const sound of manifest.sounds) {\n const { base, tier } = splitTier(sound.id)\n if (tier) tiersOf.set(base, [...(tiersOf.get(base) ?? []), sound])\n }\n const bases = new Map<string, SfxManifestSound>()\n for (const sound of manifest.sounds) {\n if (!splitTier(sound.id).tier) bases.set(sound.id, sound)\n }\n for (const [base, tiers] of tiersOf) {\n if (!bases.has(base)) bases.set(base, { id: base, category: tiers[0]?.category ?? '', layers: { close: tiers[0]?.layers.close ?? [] } })\n }\n for (const sound of bases.values()) {\n const numbers = options.sounds?.[sound.id] ?? options.defaults?.(sound)\n const close = refsOf(sound.layers.close, baseUrl)\n if (!numbers || close.length === 0) continue\n const tiers = (tiersOf.get(sound.id) ?? [])\n .map((tier) => {\n const name = splitTier(tier.id).tier as string\n const tierFar = refsOf(tier.layers.far, baseUrl)\n return { name, from: SFX_TIERS[name] ?? 0, close: refsOf(tier.layers.close, baseUrl), ...(tierFar.length > 0 ? { far: tierFar } : {}) }\n })\n .sort((a, b) => a.from - b.from)\n const far = refsOf(sound.layers.far, baseUrl)\n const indoor = refsOf(sound.layers.tail_in, baseUrl)\n const outdoor = refsOf(sound.layers.tail_out, baseUrl)\n const files = [sound, ...(tiersOf.get(sound.id) ?? [])].flatMap((entry) => Object.values(entry.layers).flatMap((entries) => entries ?? []))\n samples.push({\n id: sound.id,\n bus: numbers.bus,\n close,\n ...(far.length > 0 ? { far } : {}),\n ...(tiers.length > 0 ? { tiers } : {}),\n ...(numbers.crossover ? { crossover: numbers.crossover } : {}),\n ...(indoor.length > 0 || outdoor.length > 0\n ? { tail: { ...(indoor.length > 0 ? { indoor } : {}), ...(outdoor.length > 0 ? { outdoor } : {}), ...(numbers.tailGain === undefined ? {} : { gain: numbers.tailGain }) } }\n : {}),\n ...(numbers.pitch === undefined ? {} : { pitch: numbers.pitch }),\n ...(numbers.gain === undefined ? {} : { gain: numbers.gain }),\n ...(numbers.falloff ? { falloff: numbers.falloff } : {}),\n ...(numbers.cutoffK === undefined ? {} : { cutoffK: numbers.cutoffK }),\n ...(numbers.group ? { group: numbers.group } : {}),\n ...(numbers.priority === undefined ? {} : { priority: numbers.priority }),\n ...(numbers.fallback ? { fallback: numbers.fallback } : {}),\n sources: files.map((file) => `${file.file}: ${file.source} ${file.author} ${file.license}`),\n })\n }\n return { id: options.id, samples }\n}\n","/**\n * The kit's own recorded sounds: the files in `assets/sfx/` (CC0 / CC-BY, credited in `assets/sfx/CREDITOS.md`) and the numbers each one plays\n * with. `kitSampleBank` turns the converter's manifest into a bank; `KIT_SAMPLE_ALIASES` lets a recipe id the kit already plays (`shut_wood`,\n * `rattle`...) be answered by the takes of a file id (`door_wood_shut`), so a sound that was synthesized becomes the recording with no change where\n * it is played: the recipe of the same id plays while the files load, and wherever they cannot be fetched (`file://`). `loadKitSamples` fetches the\n * manifest from where the folder is served and registers the bank on an engine.\n */\nimport { sampleBankFromManifest } from './manifest'\nimport type { SampleDefaults, SfxManifest, SfxManifestSound } from './manifest'\nimport type { BusId, SoundBank } from './recipe'\n\n/** The bus of a manifest category (the folder the file sits in). */\nexport const KIT_CATEGORY_BUS: Readonly<Record<string, BusId>> = {\n armas: 'weapons',\n impactos: 'world',\n 'explosoes-fogo': 'world',\n personagem: 'world',\n veiculos: 'world',\n 'itens-portas': 'world',\n ambiente: 'ambience',\n}\n\n/** Voice sounds go on the voices bus whatever folder they are in. */\nconst VOICE_IDS = /^(player_(hurt|death|effort|breath)|scream|zombie_)/\n\n/**\n * Recipe id → file id. The recipe keeps playing until the takes of the file id load. Hand-worked leaves (doors, drawers) of `game-destruction-three`\n * and the hand sounds of items.\n */\nexport const KIT_SAMPLE_ALIASES: Readonly<Record<string, string>> = {\n // a house door: the latch giving, the hinge, the leaf meeting the frame, a locked one shaken; a drawer on its runners\n latch: 'metal_latch',\n creak_wood: 'door_creak',\n shut_wood: 'door_wood_shut',\n rattle: 'door_locked_rattle',\n // a drawer stays on its recipe: the recorded runs (1 to 1.9 s) outlast a drawer's pull\n // an item taken in the hand (game-destruction-three grab_* keys)\n grab_hard: 'item_pickup_generic',\n grab_soft: 'item_pickup_leather',\n}\n\n/** The numbers of a sound the files do not say: the bus of its folder, a little pitch spread. */\nexport function kitSampleDefaults(sound: SfxManifestSound): SampleDefaults | undefined {\n const bus = VOICE_IDS.test(sound.id) ? 'voices' : KIT_CATEGORY_BUS[sound.category]\n if (!bus) return undefined\n return { bus, pitch: sound.category === 'ambiente' || /_loop/.test(sound.id) ? 0 : 0.04 }\n}\n\nexport type KitSampleBankOptions = {\n /** Where the `assets/sfx/` folder is served (`./sfx/`). */\n readonly baseUrl?: string\n /** Recipe id → file id (default `KIT_SAMPLE_ALIASES`); `{}` adds none. */\n readonly aliases?: Readonly<Record<string, string>>\n readonly id?: string\n}\n\n/** The manifest with each alias as one more sound, holding the takes of its file id. */\nexport function withAliases(manifest: SfxManifest, aliases: Readonly<Record<string, string>>): SfxManifest {\n const byId = new Map(manifest.sounds.map((sound) => [sound.id, sound]))\n const extra: SfxManifestSound[] = []\n for (const [alias, target] of Object.entries(aliases)) {\n const sound = byId.get(target)\n if (sound && !byId.has(alias)) extra.push({ ...sound, id: alias })\n }\n return { ...manifest, sounds: [...manifest.sounds, ...extra] }\n}\n\n/** The bank of the kit's files. */\nexport function kitSampleBank(manifest: SfxManifest, options: KitSampleBankOptions = {}): SoundBank {\n return sampleBankFromManifest(withAliases(manifest, options.aliases ?? KIT_SAMPLE_ALIASES), {\n id: options.id ?? 'kit_samples',\n baseUrl: options.baseUrl ?? '',\n defaults: kitSampleDefaults,\n })\n}\n\nexport type LoadKitSamplesOptions = KitSampleBankOptions & {\n /** Gets the manifest (default `fetch` of `<baseUrl>manifest.json`). */\n readonly fetchManifest?: (url: string) => Promise<SfxManifest>\n /** Ids to load right away instead of on their first play (the sounds of the first seconds, so they are not the recipe). */\n readonly preload?: readonly string[]\n}\n\ntype Registers = { register(bank: SoundBank): void; loadSamples?(ids?: readonly string[]): Promise<unknown> }\n\n/** True when `url`, read against the page, is a `file://` one: `fetch` refuses that scheme and the browser logs an error for each try. */\nconst isFileUrl = (url: string): boolean => {\n const page = (globalThis as { location?: { href?: string } }).location?.href\n try {\n return new URL(url, page).protocol === 'file:'\n } catch {\n return false\n }\n}\n\nconst fetchJson = async (url: string): Promise<SfxManifest> => {\n // a page opened from disk keeps the recipes without asking: the refused fetch would only put an error in the console\n if (isFileUrl(url)) throw new Error(`${url}: file:// is not fetched`)\n const response = await fetch(url)\n if (!response.ok) throw new Error(`${url}: ${response.status}`)\n return (await response.json()) as SfxManifest\n}\n\n/**\n * Fetches the manifest and registers the bank on the engine. Resolves to the bank, or `null` when the manifest cannot be had (a page opened from\n * `file://`, the folder not served): the recipes keep playing, so that is not an error.\n */\nexport async function loadKitSamples(engine: Registers, options: LoadKitSamplesOptions = {}): Promise<SoundBank | null> {\n const baseUrl = options.baseUrl ?? ''\n let manifest: SfxManifest\n try {\n manifest = await (options.fetchManifest ?? fetchJson)(`${baseUrl}manifest.json`)\n } catch {\n return null\n }\n const bank = kitSampleBank(manifest, options)\n engine.register(bank)\n if (options.preload && engine.loadSamples) void engine.loadSamples(options.preload).catch(() => undefined)\n return bank\n}\n","// The art scene's synthesis primitives (cena L1322-L1328) as recipe layers, shared by every subject bank that ports a `sfx.*` of the page: the\n// materials in `destruction-three`, the voices and wounds in `characters-three`. Each helper writes the layer the team routine builds, with its\n// fields in the order the routine draws its random numbers, so a recipe built from them leaves the trace of the team code.\nimport { DISTANCE_CURVES } from '../falloff'\nimport type { BusId, Envelope, Layer, ParamRef, Range, SoundRecipe } from '../recipe'\n\nconst ATTACK = 0.002\n\n/** A length in seconds: a number, a `[min, max]` range or a named number. */\nexport type SceneLength = number | readonly [number, number] | ParamRef\n\n// the layer is `attack + d` long (the art scene's gain rises over `a` and falls over `d`)\nfunction lengthOf(d: SceneLength, attack: number): Range {\n if (typeof d === 'number') return attack + d\n if (Array.isArray(d)) return [attack + d[0], attack + d[1]] as const\n return { ...(d as ParamRef), add: ((d as ParamRef).add ?? 0) + attack }\n}\n\nconst envelope = (attack: number): Envelope => [\n [0, 0.0001, 'set', 'fixed'],\n [attack, 1, 'exp'],\n ['1d', 0.0001, 'exp', 'fixed'],\n]\n\nexport type SceneNoise = {\n readonly type?: BiquadFilterType\n readonly f: Range\n /** The filter slides here over `d` (needs a fixed `d`). */\n readonly f2?: number\n readonly q?: number\n readonly a?: number\n readonly d: SceneLength\n readonly vol: Range\n readonly wet?: number\n readonly delay?: Range\n}\n\n/** `sNoise` (cena L1323): noise from a random point, a filter (default lowpass, Q 0.7), the gain rising over `a` and falling over `d`. */\nexport function sceneNoise(o: SceneNoise): Layer {\n const a = o.a ?? ATTACK\n const over = typeof o.d === 'number' ? o.d : 0\n return {\n filters: {\n mode: 'serial',\n bank: [{ type: o.type ?? 'lowpass', frequency: o.f2 === undefined ? { set: o.f } : { set: o.f, to: o.f2, curve: 'exp', over }, q: o.q ?? 0.7 }],\n },\n duration: lengthOf(o.d, a),\n gain: o.vol,\n ...(o.delay === undefined ? {} : { at: o.delay }),\n ...(o.wet === undefined ? {} : { wet: o.wet }),\n source: { kind: 'noise', offset: 'random', offsetScale: 1.5, loop: true },\n envelope: envelope(a),\n }\n}\n\nexport type SceneTone = { readonly wave?: OscillatorType; readonly f: Range; readonly f2?: number; readonly d: SceneLength; readonly vol: Range; readonly wet?: number; readonly delay?: Range }\n\n/** `sTone` (cena L1324): an oscillator sliding from `f` to `f2` (back to `f` when none), the gain rising over 0.002 s and falling over `d`. */\nexport function sceneTone(o: SceneTone): Layer {\n return {\n source: { kind: 'osc', wave: o.wave ?? 'sine', frequency: { from: o.f, to: o.f2 ?? 'from', curve: 'exp', over: 'duration' } },\n duration: lengthOf(o.d, ATTACK),\n gain: o.vol,\n ...(o.delay === undefined ? {} : { at: o.delay }),\n ...(o.wet === undefined ? {} : { wet: o.wet }),\n envelope: envelope(ATTACK),\n }\n}\n\nexport type SceneVoice = {\n /** Start and end frequency of the sweep (the page ramps linearly from `f0` to `f1` over the length). */\n readonly f0: Range\n readonly f1: Range\n /** Length in seconds. */\n readonly d: SceneLength\n /** Centre of the first and second formant (Q 4 and 6) and of the breath band (Q 1.1). */\n readonly fA: Range\n readonly fB: Range\n /** Level of the breath noise. */\n readonly noise: Range\n readonly vol: Range\n readonly wave?: OscillatorType\n}\n\n/**\n * `voice` (cena L1325): an oscillator swept from `f0` to `f1` with a vibrato of 4 to 10 Hz (depth 0.08 of `f0`) through two formant bands plus a band of\n * breath noise, summed and boosted 3.2 times, the gain rising over 0.1 s, held to 0.6 of the length and falling; reverb send 0.45. It is the one\n * layer the page builds with `voice(...)`, so a scream is two of them.\n */\nexport function sceneVoice(o: SceneVoice): Layer {\n return {\n duration: lengthOf(o.d, 0),\n gain: o.vol,\n wet: 0.45,\n source: {\n kind: 'formant_voice',\n wave: o.wave ?? 'sawtooth',\n frequency: { from: o.f0, to: o.f1, curve: 'linear', over: 'duration' },\n vibrato: { rate: [4, 10], depth: 0.08 },\n formants: [\n { frequency: o.fA, q: 4 },\n { frequency: o.fB, q: 6 },\n ],\n breath: { frequency: o.fB, q: 1.1, gain: o.noise },\n mix: 3.2,\n },\n envelope: [\n [0, 0.0001, 'set', 'fixed'],\n [0.1, 1, 'exp'],\n ['0.6d', 1, 'set'],\n ['1d', 0.0001, 'exp', 'fixed'],\n ],\n }\n}\n\n/** The layer played `count` times (a team `for` loop whose body draws numbers): each pass is its own layer, so the draws stay in the loop's order. */\nexport const sceneMany = (count: number, make: () => Layer): Layer[] => Array.from({ length: count }, make)\n\nexport type SceneRecipeOptions = {\n /** Named numbers drawn first (`PlayOptions.params` can override them). */\n readonly vars?: SoundRecipe['vars']\n readonly bus?: BusId\n readonly group?: string\n}\n\n/** A recipe in the art scene's mix: positional with the art scene's curve (`vol / (1 + d² × 0.008)`) and pan; `line` is the team code it comes from (`cena:<line>`). */\nexport function sceneRecipe(id: string, layers: readonly Layer[], line: string, options: SceneRecipeOptions = {}): SoundRecipe {\n return {\n id,\n bus: options.bus ?? 'world',\n pan: true,\n layers,\n falloff: DISTANCE_CURVES.art_scene,\n ...(options.vars ? { vars: options.vars } : {}),\n ...(options.group ? { group: options.group } : {}),\n sources: [`cena:${line}`],\n }\n}\n","// Foley of the hand: items picked up, opened, drunk and eaten, and the doors, lids and drawers of furniture and vehicles. Synthesised stand-ins under the\n// ids of the sound list (`sons/checklist-sons.md` 5.7 and the car doors of 5.6), so a recorded take filed under the same id replaces the recipe without\n// touching the code that plays it. Every recipe draws its numbers from ranges (pitch about ±4 %, timing and level), so no two plays are the same, and\n// falls off faster than a gunshot and loses its highs with distance: a latch is a near sound.\nimport type { Falloff, Layer, SoundBank, SoundRecipe } from '../recipe'\nimport { sceneMany as many, sceneNoise as noise, sceneTone as tone } from './scene'\n\n/** Small sounds of the hand: `vol / (1 + d² × 0.02)`, lowpass cutoffs `/ (1 + d × 0.04)`, silent below 0.004 (a latch at 10 m is a third, at 50 m gone). */\nexport const FOLEY_FALLOFF: Falloff = {\n model: 'inverse_square',\n k: 0.02,\n cutoffK: 0.04,\n minGain: 0.004,\n}\n\n/** ±`pct` around `f`: the range a recipe draws a frequency from. */\nconst vary = (f: number, pct = 0.04): readonly [number, number] => [Math.round(f * (1 - pct)), Math.round(f * (1 + pct))]\n\nconst foley = (id: string, layers: readonly Layer[], note: string): SoundRecipe => ({\n id,\n bus: 'world',\n pan: true,\n layers,\n falloff: FOLEY_FALLOFF,\n sources: [`sdk: ${note}`],\n})\n\n/** The click of a latch or a catch: a short band of noise and a tick of metal. */\nconst click = (f: number, vol: number, delay: readonly [number, number] | number = 0): Layer[] => [\n noise({\n type: 'bandpass',\n f: vary(f, 0.08),\n q: 4,\n d: [0.018, 0.03],\n vol: [vol * 0.85, vol * 1.1],\n delay,\n }),\n tone({\n f: vary(f * 0.8, 0.06),\n f2: Math.round(f * 0.62),\n d: [0.015, 0.025],\n vol: vol * 0.18,\n delay,\n }),\n]\n\n/** A leaf meeting its frame: the body (a falling tone), the board or panel (a band of noise) and the latch catching right after. */\nconst meet = (body: number, panel: number, vol: number, latch: number): Layer[] => [\n tone({\n f: vary(body),\n f2: Math.round(body * 0.5),\n d: [0.12, 0.16],\n vol: [vol * 0.9, vol * 1.1],\n }),\n noise({\n type: 'bandpass',\n f: vary(panel, 0.06),\n q: 1.2,\n d: [0.08, 0.12],\n vol: [vol * 0.9, vol * 1.1],\n wet: 0.25,\n }),\n ...click(latch, vol * 0.45, [0.012, 0.028]),\n]\n\n/** The doors and lids of furniture and vehicles, by what the leaf is (the room picks one from the item, else from the leaf's material). */\nexport const LEAF_FOLEY: readonly SoundRecipe[] = [\n // a wooden house door or wardrobe door: latch, a short creak, the leaf on the frame (the hard slam adds the frame rattling)\n foley('door_wood_open', click(2400, 0.4), 'the latch of a wooden door giving'),\n foley(\n 'door_creak',\n [\n tone({ f: [190, 240], f2: 310, d: [0.4, 0.55], vol: [0.04, 0.06] }),\n noise({\n type: 'bandpass',\n f: [480, 560],\n q: 6,\n a: 0.05,\n d: [0.35, 0.5],\n vol: [0.1, 0.14],\n }),\n ],\n 'a wooden hinge turning',\n ),\n foley('door_wood_close', meet(120, 600, 0.55, 2400), 'a wooden leaf meeting its frame'),\n foley(\n 'door_wood_slam',\n [\n ...meet(110, 560, 0.85, 2300),\n ...many(3, () =>\n noise({\n type: 'bandpass',\n f: [900, 1500],\n q: 3,\n d: 0.03,\n vol: [0.08, 0.14],\n delay: [0.05, 0.18],\n }),\n ),\n ],\n 'a wooden door slammed: the frame and the hinges rattle after the hit',\n ),\n // a metal door or gate: a hollow panel that rings a little\n foley('door_metal_open_close', [...meet(160, 900, 0.55, 2000), tone({ f: vary(1250), f2: 1150, d: [0.1, 0.16], vol: 0.06, wet: 0.3 })], 'a metal door or gate meeting its frame'),\n foley(\n 'door_creak_metal',\n [\n tone({ f: [620, 760], f2: 900, d: [0.3, 0.4], vol: [0.03, 0.045] }),\n noise({\n type: 'bandpass',\n f: [1300, 1500],\n q: 8,\n a: 0.04,\n d: [0.25, 0.35],\n vol: [0.07, 0.09],\n }),\n ],\n 'a metal hinge turning',\n ),\n // the handle of a locked door shaken: the latch knocking in its keeper, five to seven times in half a second\n foley(\n 'door_locked_rattle',\n [\n ...many(6, () =>\n noise({\n type: 'bandpass',\n f: [1600, 2600],\n q: 3,\n d: [0.025, 0.04],\n vol: [0.22, 0.34],\n delay: [0, 0.45],\n }),\n ),\n ...many(3, () =>\n tone({\n f: [170, 210],\n f2: 120,\n d: 0.05,\n vol: [0.12, 0.18],\n delay: [0.02, 0.4],\n }),\n ),\n ],\n 'the handle of a locked door shaken: latch knocks and the leaf thumping in its frame',\n ),\n // a fridge: the rubber seal lets go with a soft suck, the bottles in the door clink; closing it is a soft thump and the seal pulling shut\n foley(\n 'fridge_open',\n [\n noise({\n type: 'lowpass',\n f: [320, 380],\n a: 0.03,\n d: [0.14, 0.2],\n vol: [0.32, 0.4],\n }),\n noise({\n type: 'bandpass',\n f: [800, 950],\n f2: 1400,\n q: 2,\n a: 0.02,\n d: 0.12,\n vol: [0.08, 0.12],\n }),\n ...many(2, () =>\n tone({\n f: [2600, 4200],\n d: [0.04, 0.08],\n vol: [0.015, 0.03],\n delay: [0.08, 0.22],\n }),\n ),\n ],\n 'a fridge door: the seal letting go and the bottles in the door',\n ),\n foley(\n 'fridge_close',\n [\n tone({ f: vary(85), f2: 45, d: [0.1, 0.13], vol: [0.38, 0.46] }),\n noise({\n type: 'lowpass',\n f: [520, 620],\n d: [0.08, 0.12],\n vol: [0.3, 0.36],\n }),\n noise({\n type: 'lowpass',\n f: [260, 320],\n a: 0.02,\n d: 0.1,\n vol: [0.12, 0.18],\n delay: [0.04, 0.07],\n }),\n ...many(2, () =>\n tone({\n f: [2600, 4200],\n d: [0.04, 0.07],\n vol: [0.015, 0.03],\n delay: [0.03, 0.12],\n }),\n ),\n ],\n 'a fridge door shut: a soft thump, the seal pulling and the bottles',\n ),\n // a microwave: the spring catch of the door, plastic on plastic\n foley(\n 'microwave_open',\n [\n ...click(1800, 0.34),\n tone({\n f: [3000, 3400],\n f2: 2800,\n d: 0.05,\n vol: 0.025,\n delay: [0.01, 0.02],\n }),\n ],\n 'the spring catch of a microwave door',\n ),\n foley(\n 'microwave_close',\n [\n noise({\n type: 'bandpass',\n f: [1200, 1450],\n q: 2.5,\n d: [0.04, 0.06],\n vol: [0.36, 0.44],\n }),\n tone({ f: vary(180), f2: 120, d: 0.05, vol: [0.16, 0.22] }),\n ...click(2200, 0.2, [0.008, 0.016]),\n ],\n 'a microwave door clacking shut',\n ),\n foley('microwave_beep', [tone({ wave: 'square', f: 2000, d: 0.12, vol: 0.05 })], 'the beep of a microwave'),\n // drawers and sliding leaves: the runners, then the stop\n foley(\n 'drawer_open',\n [\n noise({\n type: 'bandpass',\n f: [620, 780],\n q: 2,\n a: 0.04,\n d: [0.28, 0.36],\n vol: [0.18, 0.24],\n }),\n noise({ type: 'bandpass', f: [2000, 2400], q: 5, d: 0.28, vol: 0.04 }),\n ...click(1400, 0.16, [0.28, 0.34]),\n ],\n 'a drawer on its runners and its stop',\n ),\n foley(\n 'drawer_close',\n [\n noise({\n type: 'bandpass',\n f: [620, 780],\n q: 2,\n a: 0.03,\n d: [0.2, 0.28],\n vol: [0.18, 0.24],\n }),\n tone({\n f: vary(150),\n f2: 90,\n d: 0.08,\n vol: [0.22, 0.3],\n delay: [0.2, 0.26],\n }),\n ],\n 'a drawer pushed home',\n ),\n]\n\n/** What the hand does with an item: picking it up by what it is made of, throwing it, and the uses (opening, drinking, eating, first aid). */\nexport const ITEM_FOLEY: readonly SoundRecipe[] = [\n // the hand closing on the item: a touch of skin and cloth, then the item's own small sound\n foley(\n 'item_pickup_metal',\n [\n noise({ type: 'bandpass', f: [700, 900], q: 1, d: 0.06, vol: 0.18 }),\n tone({\n f: [1900, 2600],\n f2: 1700,\n d: [0.05, 0.08],\n vol: [0.06, 0.09],\n delay: [0.01, 0.03],\n }),\n ],\n 'picking up a metal thing',\n ),\n foley(\n 'item_pickup_plastic',\n [\n noise({ type: 'bandpass', f: [700, 900], q: 1, d: 0.06, vol: 0.18 }),\n noise({\n type: 'bandpass',\n f: [1500, 1900],\n q: 3,\n d: 0.03,\n vol: [0.15, 0.21],\n delay: [0.01, 0.03],\n }),\n ],\n 'picking up a plastic thing',\n ),\n foley(\n 'item_pickup_glass',\n [\n noise({ type: 'bandpass', f: [700, 900], q: 1, d: 0.06, vol: 0.15 }),\n tone({\n f: [3200, 4200],\n d: [0.05, 0.08],\n vol: [0.038, 0.06],\n delay: [0.01, 0.03],\n }),\n ],\n 'picking up a glass thing',\n ),\n foley(\n 'item_pickup_paper',\n [\n noise({\n type: 'highpass',\n f: [2600, 3400],\n a: 0.01,\n d: [0.1, 0.14],\n vol: [0.12, 0.18],\n }),\n noise({ type: 'bandpass', f: [800, 1000], q: 1, d: 0.05, vol: 0.12 }),\n ],\n 'picking up paper or cardboard',\n ),\n foley(\n 'item_pickup_fabric',\n [\n noise({\n type: 'bandpass',\n f: [900, 1300],\n q: 0.8,\n a: 0.02,\n d: [0.12, 0.16],\n vol: [0.15, 0.21],\n }),\n ],\n 'picking up cloth',\n ),\n foley(\n 'item_pickup_wood',\n [\n noise({ type: 'bandpass', f: [700, 900], q: 1, d: 0.06, vol: 0.18 }),\n noise({\n type: 'bandpass',\n f: [900, 1100],\n q: 2,\n d: 0.04,\n vol: [0.15, 0.21],\n delay: [0.01, 0.03],\n }),\n ],\n 'picking up a wooden thing',\n ),\n foley(\n 'item_pickup_food',\n [\n noise({ type: 'bandpass', f: [700, 900], q: 1, d: 0.06, vol: 0.18 }),\n noise({\n type: 'lowpass',\n f: [500, 650],\n d: 0.05,\n vol: 0.12,\n delay: [0.01, 0.03],\n }),\n ],\n 'picking up food',\n ),\n foley(\n 'item_throw',\n [\n noise({\n type: 'bandpass',\n f: [450, 650],\n f2: 1400,\n q: 1.5,\n a: 0.05,\n d: 0.18,\n vol: [0.1, 0.14],\n }),\n ],\n 'the arm throwing something: air',\n ),\n // a can: the tab cracks, the gas hisses out; drinking is gulps; crushing it crumples the sheet\n foley(\n 'can_open',\n [\n ...click(3200, 0.36),\n noise({\n type: 'highpass',\n f: [3600, 4400],\n a: 0.005,\n d: [0.22, 0.3],\n vol: [0.16, 0.22],\n delay: [0.012, 0.02],\n }),\n ...many(5, () => tone({ f: [4000, 7000], d: 0.02, vol: 0.01, delay: [0.05, 0.4] })),\n ],\n 'the tab of a can and the gas hissing out',\n ),\n foley(\n 'can_crush',\n [\n noise({\n type: 'bandpass',\n f: [1600, 2200],\n q: 1.2,\n d: [0.18, 0.25],\n vol: [0.3, 0.38],\n }),\n ...many(6, () =>\n tone({\n f: [1200, 3400],\n f2: 900,\n d: 0.03,\n vol: [0.03, 0.06],\n delay: [0, 0.2],\n }),\n ),\n ],\n 'a can crushed in the hand',\n ),\n foley(\n 'can_puncture_spray',\n [\n noise({\n type: 'highpass',\n f: [2400, 3000],\n a: 0.005,\n d: [0.5, 0.7],\n vol: [0.2, 0.26],\n }),\n noise({ type: 'bandpass', f: [600, 800], q: 2, d: 0.4, vol: 0.06 }),\n ],\n 'a can holed: the jet hissing out',\n ),\n foley(\n 'bottle_open',\n [\n ...many(5, () =>\n noise({\n type: 'bandpass',\n f: [2200, 3000],\n q: 4,\n d: 0.008,\n vol: [0.1, 0.16],\n delay: [0, 0.18],\n }),\n ),\n noise({\n type: 'highpass',\n f: 3800,\n a: 0.005,\n d: 0.12,\n vol: [0.06, 0.1],\n delay: [0.18, 0.22],\n }),\n ],\n 'the screw cap of a bottle turning off',\n ),\n foley(\n 'drink_gulp',\n [\n noise({\n type: 'lowpass',\n f: [280, 360],\n a: 0.02,\n d: [0.1, 0.14],\n vol: [0.24, 0.3],\n }),\n tone({ f: [140, 170], f2: 85, d: [0.08, 0.11], vol: [0.12, 0.16] }),\n ],\n 'a gulp',\n ),\n foley(\n 'eat_crunch',\n [\n ...many(4, () =>\n noise({\n type: 'bandpass',\n f: [1800, 3200],\n q: 1.5,\n d: [0.02, 0.04],\n vol: [0.12, 0.2],\n delay: [0, 0.12],\n }),\n ),\n ],\n 'a bite of something crunchy',\n ),\n foley(\n 'eat_chew',\n [\n noise({\n type: 'lowpass',\n f: [450, 600],\n a: 0.03,\n d: [0.1, 0.14],\n vol: [0.12, 0.16],\n }),\n noise({\n type: 'bandpass',\n f: [1100, 1400],\n q: 2,\n d: 0.04,\n vol: 0.04,\n delay: [0.03, 0.06],\n }),\n ],\n 'chewing',\n ),\n foley(\n 'bandage_wrap',\n [\n noise({\n type: 'bandpass',\n f: [1400, 1800],\n f2: 2400,\n q: 1,\n a: 0.04,\n d: [0.3, 0.4],\n vol: [0.12, 0.16],\n }),\n ],\n 'a bandage unrolled round a limb',\n ),\n foley(\n 'pills_shake',\n [\n ...many(8, () =>\n tone({\n f: [2400, 3600],\n d: 0.015,\n vol: [0.03, 0.05],\n delay: [0, 0.25],\n }),\n ),\n noise({ type: 'bandpass', f: [1500, 1900], q: 2, d: 0.25, vol: 0.05 }),\n ],\n 'pills shaken in their bottle',\n ),\n foley(\n 'medkit_use',\n [\n ...click(1700, 0.24),\n noise({\n type: 'bandpass',\n f: [1000, 1400],\n q: 1,\n a: 0.03,\n d: [0.25, 0.32],\n vol: [0.08, 0.12],\n delay: [0.05, 0.08],\n }),\n ],\n 'a first aid kit opened and rummaged',\n ),\n foley('flashlight_click', click(2600, 0.3), 'the switch of a flashlight'),\n]\n\n/** The foley bank: register it in the engine (`engine.register(FOLEY_BANK)`). */\nexport const FOLEY_BANK: SoundBank = {\n id: 'foley',\n sounds: [...LEAF_FOLEY, ...ITEM_FOLEY],\n}\n\n/** What a picked-up item sounds like, by its heaviest material class. */\nexport const PICKUP_CLASSES = ['metal', 'plastic', 'glass', 'paper', 'fabric', 'wood', 'food'] as const\nexport type PickupClass = (typeof PICKUP_CLASSES)[number]\n\n/** The sound set of a leaf worked by hand: the ids it plays at the latch, while it turns, and as it meets the frame (gently, and slammed). */\nexport type LeafFoley = {\n readonly open: string\n readonly turn?: string\n readonly close: string\n readonly slam?: string\n readonly locked: string\n}\n\n/** The leaf sound sets the kit ships, by name; an item names one (`TestableItem.sounds.leaves`), else the room picks `wood_door` or `metal_door` by the leaf's material. */\nexport const LEAF_FOLEY_SETS: Readonly<Record<string, LeafFoley>> = {\n wood_door: {\n open: 'door_wood_open',\n turn: 'door_creak',\n close: 'door_wood_close',\n slam: 'door_wood_slam',\n locked: 'door_locked_rattle',\n },\n metal_door: {\n open: 'door_wood_open',\n turn: 'door_creak_metal',\n close: 'door_metal_open_close',\n locked: 'door_locked_rattle',\n },\n fridge: {\n open: 'fridge_open',\n close: 'fridge_close',\n locked: 'door_locked_rattle',\n },\n microwave: {\n open: 'microwave_open',\n close: 'microwave_close',\n locked: 'door_locked_rattle',\n },\n drawer: {\n open: 'drawer_open',\n close: 'drawer_close',\n locked: 'door_locked_rattle',\n },\n}\n","// The sounds of a body: footsteps by surface and gait, landings, the swing and the hit of each blow, hurt, bite and grab. Synthesised in the meantime\n// (the kit has no recorded take of these yet): each id is a set of four takes, with the numbers of each take apart, so the same action never\n// sounds twice the same. A recorded take replaces a variant by its id (`register` a bank with the same recipe id) without touching who plays it.\n//\n// How each one is built (what the ear picks first):\n// - a footstep is the heel (a low thump, how hollow the floor is) and then the roll to the toe (the surface's own texture: the grit of concrete,\n// the crunch of gravel, the ring of a metal sheet, the splash of water); a run hits harder, brighter and shorter, heel and toe almost together;\n// - a landing is the whole body's weight on the surface: a deeper thump, the surface texture longer, the clothes after;\n// - a swing is air: a band of noise sweeping up while the limb or the tool speeds up, loudest just before the contact, so it is started early\n// (`SWING_LEAD_SECONDS` of game-contracts) and the contact sound follows it;\n// - a hit on a body is skin (a slap), mass (a thud) and, for a blade, a wet tear; on an object it is only the striking part (knuckles, sole, steel)\n// and the material's own impact plays beside it.\nimport {\n BODY_SOUND_IDS,\n FOOTSTEP_SOUND_IDS,\n GAIT_IDS,\n LAND_SOUND_IDS,\n LANDING_IDS,\n SURFACE_IDS,\n SWING_LEAD_SECONDS,\n footstepSoundId,\n} from '@adatechnology/game-contracts'\nimport type { BlowId, BodySoundId, GaitId, LandingId, SurfaceId } from '@adatechnology/game-contracts'\n\nimport type { Falloff, Layer, SoundBank, SoundRecipe, SoundSet } from '../recipe'\nimport { sceneNoise, sceneTone, sceneVoice } from './scene'\n\n/** Takes per id. */\nexport const BODY_FOLEY_TAKES = 4\n\n/** How each take differs from the first: frequency factor, timing factor and level factor (fixed numbers, so takes are really apart). */\nconst TAKES: readonly { readonly f: number; readonly t: number; readonly v: number }[] = [\n { f: 1, t: 1, v: 1 },\n { f: 1.08, t: 0.9, v: 0.92 },\n { f: 0.93, t: 1.12, v: 1.05 },\n { f: 1.03, t: 1.05, v: 0.88 },\n]\n\n\n/** Footsteps fade fast with distance and lose their top: a step 10 m away is a quarter of the level, 30 m a few percent, and duller. */\nexport const FOOTSTEP_FALLOFF: Falloff = { model: 'inverse_square', k: 0.03, cutoffK: 0.03, minGain: 0.004 }\n/** Blows and body sounds carry further than a step. */\nexport const BODY_FALLOFF: Falloff = { model: 'inverse_square', k: 0.012, cutoffK: 0.015, minGain: 0.004 }\n\ntype Take = (typeof TAKES)[number]\n\n/** What a surface sounds like under a foot: the heel's thump and the texture of the roll. */\ntype SurfaceVoice = {\n /** The heel: thump pitch (Hz), its length (s) and level. */\n readonly heel: { readonly f: number; readonly d: number; readonly vol: number }\n /** The roll to the toe and the scuff: a filtered noise. */\n readonly roll: { readonly type: BiquadFilterType; readonly f: number; readonly q: number; readonly d: number; readonly vol: number }\n /** Grit, crunch or drips: short bursts spread after the heel. */\n readonly grains?: { readonly count: number; readonly f: number; readonly q: number; readonly spread: number; readonly vol: number }\n /** A ring of the floor itself (a hollow board, a metal sheet). */\n readonly ring?: readonly { readonly f: number; readonly d: number; readonly vol: number }[]\n /** Water: a sweep of the splash band. */\n readonly splash?: { readonly f: number; readonly f2: number; readonly d: number; readonly vol: number }\n}\n\nconst SURFACES: Readonly<Record<SurfaceId, SurfaceVoice>> = {\n concrete: { heel: { f: 95, d: 0.05, vol: 0.55 }, roll: { type: 'bandpass', f: 2300, q: 1.1, d: 0.05, vol: 0.38 }, grains: { count: 2, f: 4200, q: 2, spread: 0.04, vol: 0.08 } },\n asphalt: { heel: { f: 90, d: 0.05, vol: 0.5 }, roll: { type: 'bandpass', f: 1700, q: 0.9, d: 0.06, vol: 0.36 }, grains: { count: 4, f: 3600, q: 2.5, spread: 0.06, vol: 0.1 } },\n wood: { heel: { f: 130, d: 0.08, vol: 0.55 }, roll: { type: 'lowpass', f: 1300, q: 0.8, d: 0.06, vol: 0.3 }, ring: [{ f: 210, d: 0.1, vol: 0.18 }, { f: 470, d: 0.06, vol: 0.06 }] },\n tile: { heel: { f: 110, d: 0.04, vol: 0.45 }, roll: { type: 'bandpass', f: 3600, q: 2, d: 0.03, vol: 0.42 }, ring: [{ f: 1900, d: 0.03, vol: 0.05 }] },\n dirt: { heel: { f: 75, d: 0.06, vol: 0.45 }, roll: { type: 'lowpass', f: 750, q: 0.7, d: 0.09, vol: 0.4 }, grains: { count: 3, f: 1800, q: 1.5, spread: 0.07, vol: 0.06 } },\n grass: { heel: { f: 70, d: 0.05, vol: 0.32 }, roll: { type: 'highpass', f: 2600, q: 0.7, d: 0.13, vol: 0.28 }, grains: { count: 4, f: 5200, q: 1.2, spread: 0.1, vol: 0.07 } },\n gravel: { heel: { f: 80, d: 0.05, vol: 0.4 }, roll: { type: 'lowpass', f: 950, q: 0.8, d: 0.1, vol: 0.3 }, grains: { count: 8, f: 2600, q: 3, spread: 0.13, vol: 0.2 } },\n sand: { heel: { f: 65, d: 0.06, vol: 0.3 }, roll: { type: 'bandpass', f: 1500, q: 0.6, d: 0.16, vol: 0.3 }, grains: { count: 5, f: 4800, q: 1.5, spread: 0.12, vol: 0.05 } },\n metal: { heel: { f: 120, d: 0.05, vol: 0.5 }, roll: { type: 'bandpass', f: 2800, q: 1.5, d: 0.03, vol: 0.25 }, ring: [{ f: 420, d: 0.25, vol: 0.16 }, { f: 1130, d: 0.18, vol: 0.09 }, { f: 2470, d: 0.1, vol: 0.04 }] },\n water: { heel: { f: 70, d: 0.04, vol: 0.25 }, roll: { type: 'bandpass', f: 3000, q: 1.2, d: 0.1, vol: 0.18 }, splash: { f: 1100, f2: 380, d: 0.22, vol: 0.55 }, grains: { count: 4, f: 2400, q: 6, spread: 0.18, vol: 0.12 } },\n glass: { heel: { f: 90, d: 0.04, vol: 0.4 }, roll: { type: 'highpass', f: 4500, q: 0.8, d: 0.06, vol: 0.2 }, grains: { count: 9, f: 6200, q: 5, spread: 0.12, vol: 0.22 }, ring: [{ f: 3900, d: 0.04, vol: 0.04 }, { f: 5300, d: 0.03, vol: 0.03 }] },\n carpet: { heel: { f: 70, d: 0.05, vol: 0.32 }, roll: { type: 'lowpass', f: 420, q: 0.7, d: 0.07, vol: 0.3 } },\n}\n\nconst GAITS: Readonly<Record<GaitId, { readonly vol: number; readonly bright: number; readonly toe: number; readonly short: number }>> = {\n walk: { vol: 1, bright: 1, toe: 0.075, short: 1 },\n run: { vol: 1.35, bright: 1.25, toe: 0.035, short: 0.75 },\n}\n\nconst grainLayers = (g: NonNullable<SurfaceVoice['grains']>, take: Take, start: number, scale: number): Layer[] =>\n Array.from({ length: g.count }, (_, i) =>\n sceneNoise({ type: 'bandpass', f: [g.f * take.f * 0.85, g.f * take.f * 1.15], q: g.q, d: [0.008, 0.02], vol: g.vol * scale * take.v, delay: start + ((i + 0.5) / g.count) * g.spread * take.t }),\n )\n\nconst ringLayers = (rings: NonNullable<SurfaceVoice['ring']>, take: Take, scale: number, at = 0): Layer[] =>\n rings.map((r) => sceneTone({ f: r.f * take.f, d: r.d * take.t, vol: r.vol * scale * take.v, delay: at }))\n\n/** The layers of one foot on a surface: heel, roll to the toe, then grains, ring or splash. `weight` scales the heel (a landing is the whole body). */\nfunction footLayers(surface: SurfaceId, take: Take, gait: (typeof GAITS)[GaitId], weight = 1): Layer[] {\n const s = SURFACES[surface]\n const toe = gait.toe * take.t\n return [\n sceneTone({ f: s.heel.f * take.f * weight ** -0.3, f2: s.heel.f * take.f * 0.6, d: s.heel.d * gait.short * take.t * weight ** 0.5, vol: s.heel.vol * gait.vol * take.v * weight ** 0.5 }),\n sceneNoise({ type: 'lowpass', f: 500 * gait.bright, d: 0.02 * take.t, vol: 0.18 * gait.vol * take.v * weight ** 0.5 }),\n sceneNoise({ type: s.roll.type, f: [s.roll.f * take.f * gait.bright * 0.92, s.roll.f * take.f * gait.bright * 1.08], q: s.roll.q, d: s.roll.d * gait.short * take.t * weight ** 0.3, vol: s.roll.vol * gait.vol * take.v, delay: toe }),\n ...(s.grains ? grainLayers(s.grains, take, toe * 0.5, gait.vol * weight ** 0.5) : []),\n ...(s.ring ? ringLayers(s.ring, take, gait.vol * weight ** 0.5) : []),\n ...(s.splash ? [sceneNoise({ type: 'bandpass', f: s.splash.f * take.f, f2: s.splash.f2 * take.f, q: 1.4, d: s.splash.d * take.t * weight ** 0.4, vol: s.splash.vol * gait.vol * take.v * weight ** 0.5 })] : []),\n ]\n}\n\n/** The layers at `level` of their gain (a scene layer's gain is a number or a range). */\nconst quieter = (level: number, layers: readonly Layer[]): Layer[] =>\n layers.map((layer) => {\n const gain = layer.gain ?? 1\n if (typeof gain === 'number') return { ...layer, gain: gain * level }\n if (Array.isArray(gain)) return { ...layer, gain: [gain[0] * level, gain[1] * level] as const }\n return layer\n })\n\nconst recipe = (id: string, layers: readonly Layer[], falloff: Falloff, bus: SoundRecipe['bus'] = 'world'): SoundRecipe => ({ id, bus, pan: true, layers, falloff, sources: ['sdk'] })\n\nconst takeId = (id: string, index: number): string => `${id}_${String(index + 1).padStart(2, '0')}`\n\n/** The four takes of an id and the set that names them. */\nfunction takes(id: string, layersOf: (take: Take, index: number) => Layer[], falloff: Falloff, rate: readonly [number, number] = [0.96, 1.04], bus?: SoundRecipe['bus']): { sounds: SoundRecipe[]; set: SoundSet } {\n const sounds = TAKES.map((take, index) => recipe(takeId(id, index), layersOf(take, index), falloff, bus))\n return { sounds, set: { id, variants: sounds.map((sound) => sound.id), rate } }\n}\n\nconst footstep = (surface: SurfaceId, gait: GaitId) => takes(footstepSoundId(surface, gait), (take) => footLayers(surface, take, GAITS[gait]), FOOTSTEP_FALLOFF)\n\nconst LANDINGS: Readonly<Record<LandingId, { readonly weight: number; readonly cloth: number }>> = { light: { weight: 1.4, cloth: 0.12 }, heavy: { weight: 2.4, cloth: 0.22 } }\n\n/** A landing's layers are the feet's at the body's weight; this brings the whole of it under a blow on a body (C6). */\nconst LANDING_LEVEL = 0.65\n\nconst landing = (surface: SurfaceId, landing: LandingId) =>\n takes(\n `land_${surface}_${landing}`,\n (take) => quieter(LANDING_LEVEL, [\n // both feet, a hair apart, then the knees taking the weight (a low body thump) and the clothes settling\n ...footLayers(surface, take, GAITS.run, LANDINGS[landing].weight),\n ...footLayers(surface, { ...take, v: take.v * 0.6 }, GAITS.run, LANDINGS[landing].weight * 0.6).map((layer) => ({ ...layer, at: (typeof layer.at === 'number' ? layer.at : 0) + 0.018 * take.t })),\n sceneTone({ f: 60 * take.f, f2: 38, d: 0.14 * LANDINGS[landing].weight * take.t, vol: 0.22 * LANDINGS[landing].weight ** 0.7 * take.v, delay: 0.02 }),\n sceneNoise({ type: 'bandpass', f: [1800, 2600], q: 0.8, d: 0.18, vol: LANDINGS[landing].cloth * take.v, delay: 0.04 }),\n ]),\n FOOTSTEP_FALLOFF,\n )\n\nconst whoosh = (blow: BlowId, from: number, to: number, d: number, vol: number, q = 1.6): ((take: Take) => Layer[]) => (take) => [\n // the air: a band sweeping up as the limb speeds up; it peaks `SWING_LEAD_SECONDS` in, the moment before the contact, then dies away\n sceneNoise({ type: 'bandpass', f: from * take.f, f2: to * take.f, q, a: SWING_LEAD_SECONDS[blow], d: d * take.t, vol: vol * take.v }),\n sceneNoise({ type: 'lowpass', f: 600 * take.f, a: SWING_LEAD_SECONDS[blow], d: d * take.t * 0.8, vol: vol * 0.35 * take.v }),\n]\n\n/** Skin, mass and (optionally) bone: what a blow on a body is made of. */\nconst fleshHit = (o: { slap: number; slapF: number; thud: number; thudF: number; thudD: number; crack?: number; wet?: number }): ((take: Take) => Layer[]) => (take) => [\n sceneNoise({ type: 'bandpass', f: o.slapF * take.f, q: 1.2, d: 0.03 * take.t, vol: o.slap * take.v }),\n sceneNoise({ type: 'highpass', f: 3500 * take.f, d: 0.012, vol: o.slap * 0.4 * take.v }),\n sceneTone({ f: o.thudF * take.f, f2: o.thudF * 0.5, d: o.thudD * take.t, vol: o.thud * take.v }),\n sceneNoise({ type: 'lowpass', f: 600 * take.f, d: o.thudD * 1.2 * take.t, vol: o.thud * 0.5 * take.v }),\n ...(o.crack ? [sceneNoise({ type: 'highpass', f: 2500, d: 0.015, vol: o.crack * take.v, delay: 0.006 }), sceneTone({ wave: 'square', f: 900 * take.f, f2: 300, d: 0.02, vol: o.crack * 0.15 * take.v, delay: 0.006 })] : []),\n ...(o.wet ? [sceneNoise({ type: 'bandpass', f: 1400 * take.f, f2: 500, q: 2.5, d: 0.12 * take.t, vol: o.wet * take.v, delay: 0.01 })] : []),\n]\n\n/** What only the striking part sounds like on a hard thing (the material's impact plays beside it). */\nconst knock = (o: { clickF: number; click: number; tones: readonly (readonly [number, number, number])[] }): ((take: Take) => Layer[]) => (take) => [\n sceneNoise({ type: 'bandpass', f: o.clickF * take.f, q: 1.5, d: 0.018, vol: o.click * take.v }),\n ...o.tones.map(([f, d, vol]) => sceneTone({ f: f * take.f, d: d * take.t, vol: vol * take.v })),\n]\n\nconst voice = (o: { f0: number; f1: number; d: number; fA: number; fB: number; noise: number; vol: number }): ((take: Take) => Layer[]) => (take) => [\n sceneVoice({ f0: o.f0 * take.f, f1: o.f1 * take.f, d: o.d * take.t, fA: o.fA * take.f, fB: o.fB * take.f, noise: o.noise, vol: o.vol * take.v }),\n]\n\nconst BODY: Readonly<Record<BodySoundId, (take: Take) => Layer[]>> = {\n jump: (take) => [\n sceneNoise({ type: 'bandpass', f: 900 * take.f, f2: 1700 * take.f, q: 1, a: 0.03, d: 0.12, vol: 0.18 * take.v }),\n sceneNoise({ type: 'bandpass', f: 2200 * take.f, q: 0.8, d: 0.04, vol: 0.12 * take.v }),\n sceneTone({ f: 85 * take.f, f2: 60, d: 0.04, vol: 0.2 * take.v }),\n ],\n cloth_rustle: (take) => [\n { ...sceneNoise({ type: 'bandpass', f: 2400 * take.f, q: 0.8, a: 0.06, d: 0.22 * take.t, vol: 0.12 * take.v }), modulators: [{ target: 'gain', wave: 'triangle', rate: [9, 14], depth: 0.5 }] },\n ],\n body_fall: (take) => [\n sceneTone({ f: 58 * take.f, f2: 35, d: 0.28 * take.t, vol: 0.9 * take.v }),\n sceneNoise({ type: 'lowpass', f: 480 * take.f, d: 0.3 * take.t, vol: 0.55 * take.v }),\n sceneNoise({ type: 'bandpass', f: 1300 * take.f, q: 1, d: 0.05, vol: 0.3 * take.v }),\n // the limbs a moment later, and the clothes\n sceneTone({ f: 75 * take.f, f2: 45, d: 0.12, vol: 0.4 * take.v, delay: 0.13 * take.t }),\n sceneNoise({ type: 'bandpass', f: 2200, q: 0.8, d: 0.2, vol: 0.12 * take.v, delay: 0.05 }),\n ],\n fall_damage: (take) => [\n ...BODY.body_fall(take),\n sceneNoise({ type: 'highpass', f: 2800, d: 0.02, vol: 0.35 * take.v, delay: 0.01 }),\n ...voice({ f0: 170, f1: 110, d: 0.32, fA: 650, fB: 1150, noise: 0.25, vol: 0.32 })(take).map((layer) => ({ ...layer, at: 0.08 })),\n ],\n player_hurt: voice({ f0: 150, f1: 105, d: 0.26, fA: 620, fB: 1100, noise: 0.3, vol: 0.35 }),\n player_breath_run: (take) => [\n sceneNoise({ type: 'bandpass', f: 1200 * take.f, q: 1, a: 0.08, d: 0.22 * take.t, vol: 0.25 * take.v }),\n sceneNoise({ type: 'bandpass', f: 900 * take.f, q: 1, a: 0.06, d: 0.26 * take.t, vol: 0.3 * take.v, delay: 0.3 * take.t }),\n ],\n player_death: voice({ f0: 135, f1: 68, d: 1, fA: 560, fB: 980, noise: 0.35, vol: 0.4 }),\n bite: (take) => [\n sceneNoise({ type: 'highpass', f: 2600, d: 0.015, vol: 0.4 * take.v }),\n sceneNoise({ type: 'bandpass', f: 1600 * take.f, f2: 450, q: 2.2, d: 0.16 * take.t, vol: 0.55 * take.v, delay: 0.01 }),\n sceneNoise({ type: 'bandpass', f: 3200 * take.f, f2: 1800, q: 1.2, d: 0.22 * take.t, vol: 0.25 * take.v, delay: 0.09 }),\n sceneTone({ f: 120 * take.f, f2: 70, d: 0.06, vol: 0.3 * take.v }),\n ],\n grab: (take) => [\n sceneNoise({ type: 'bandpass', f: 1900 * take.f, q: 0.9, a: 0.004, d: 0.13 * take.t, vol: 0.32 * take.v }),\n sceneTone({ f: 95 * take.f, f2: 60, d: 0.07, vol: 0.3 * take.v }),\n sceneNoise({ type: 'lowpass', f: 700, d: 0.08, vol: 0.2 * take.v }),\n ],\n punch_swing: whoosh('punch', 450, 1500, 0.16, 0.9),\n punch_hit_body: fleshHit({ slap: 0.55, slapF: 1500, thud: 0.6, thudF: 115, thudD: 0.09 }),\n punch_hit_face: fleshHit({ slap: 0.75, slapF: 2300, thud: 0.45, thudF: 150, thudD: 0.07, crack: 0.25 }),\n punch_hit_object: knock({ clickF: 1800, click: 0.3, tones: [[210, 0.04, 0.25]] }),\n kick_swing: whoosh('kick', 280, 950, 0.22, 1, 1.3),\n kick_hit: fleshHit({ slap: 0.45, slapF: 1100, thud: 0.85, thudF: 82, thudD: 0.14 }),\n kick_hit_object: knock({ clickF: 1000, click: 0.3, tones: [[92, 0.08, 0.5]] }),\n shove_two_hands: (take) => [\n sceneNoise({ type: 'bandpass', f: 950 * take.f, q: 0.9, a: 0.01, d: 0.13 * take.t, vol: 0.38 * take.v }),\n sceneTone({ f: 100 * take.f, f2: 60, d: 0.1 * take.t, vol: 0.45 * take.v }),\n sceneNoise({ type: 'bandpass', f: 2300, q: 0.8, d: 0.16, vol: 0.12 * take.v, delay: 0.03 }),\n ],\n knife_swing: whoosh('blade', 1900, 4600, 0.12, 1.1, 2.2),\n knife_stab: fleshHit({ slap: 0.2, slapF: 1200, thud: 0.4, thudF: 160, thudD: 0.06, wet: 0.5 }),\n knife_slash: (take) => [\n sceneNoise({ type: 'highpass', f: 3200 * take.f, f2: 1800, d: 0.13 * take.t, vol: 0.35 * take.v }),\n sceneNoise({ type: 'bandpass', f: 1300 * take.f, f2: 600, q: 2.5, d: 0.12 * take.t, vol: 0.35 * take.v, delay: 0.02 }),\n ],\n knife_hit_object: knock({ clickF: 3200, click: 0.25, tones: [[2800, 0.08, 0.07], [4150, 0.06, 0.05]] }),\n blunt_swing: whoosh('blunt', 220, 760, 0.28, 1.1, 1.5),\n blunt_hit: fleshHit({ slap: 0.35, slapF: 900, thud: 1, thudF: 70, thudD: 0.18, crack: 0.3 }),\n blunt_hit_object: knock({ clickF: 1400, click: 0.35, tones: [[300, 0.12, 0.25], [760, 0.08, 0.12]] }),\n axe_swing: whoosh('chop', 190, 620, 0.3, 1.2, 1.4),\n axe_chop: fleshHit({ slap: 0.3, slapF: 1400, thud: 0.75, thudF: 140, thudD: 0.1, crack: 0.35, wet: 0.45 }),\n axe_hit_object: knock({ clickF: 2200, click: 0.4, tones: [[1500, 0.15, 0.1], [2300, 0.1, 0.06], [140, 0.1, 0.35]] }),\n}\n\nconst BODY_BUS: Partial<Record<BodySoundId, SoundRecipe['bus']>> = { player_hurt: 'voices', player_death: 'voices', player_breath_run: 'voices', fall_damage: 'voices' }\n\nconst built = [\n ...SURFACE_IDS.flatMap((surface) => GAIT_IDS.map((gait) => footstep(surface, gait))),\n ...SURFACE_IDS.flatMap((surface) => LANDING_IDS.map((l) => landing(surface, l))),\n ...BODY_SOUND_IDS.map((id) => takes(id, BODY[id], BODY_FALLOFF, id.endsWith('_swing') ? [0.94, 1.06] : [0.96, 1.04], BODY_BUS[id])),\n]\n\n/**\n * Every body sound of `game-contracts`' `BODY_FOLEY_IDS` as a set of four takes (`footstep_concrete_walk` plays `footstep_concrete_walk_01`..`_04`,\n * never the same twice in a row, at ±4% of rate). Register it in the engine the body plays on.\n */\nexport const BODY_FOLEY_BANK: SoundBank = {\n id: 'body_foley',\n sounds: built.flatMap((entry) => entry.sounds),\n sets: built.map((entry) => entry.set),\n}\n\n/** The ids the bank answers (the sets), in the contract's order. */\nexport const BODY_FOLEY_SET_IDS: readonly string[] = [...FOOTSTEP_SOUND_IDS, ...LAND_SOUND_IDS, ...BODY_SOUND_IDS]\n","import type { AudioListener, AudioSink, LoopHandle, SoundHandle, SoundRequest } from '@adatechnology/game-contracts'\n\nimport type { SoundBank } from '../recipe'\nimport type { AudioEngine, VoiceHandle } from './engine'\n\n/** An `AudioSink` (what a host lends its modules) that carries the engine behind it, so a module that wants more than `play` can use the engine. */\nexport type EngineSink = AudioSink & { readonly engine: AudioEngine }\n\n/** Lends an engine as the host's `audio`: sounds by key, loops, the listener, and banks registered into the same engine. */\nexport function createAudioSink(engine: AudioEngine): EngineSink {\n const playing = new Map<number, VoiceHandle>()\n return {\n engine,\n play(request: SoundRequest): SoundHandle | null {\n const handle = engine.play(request.sound, {\n ...(request.position ? { position: request.position } : {}),\n ...(request.volume === undefined ? {} : { volume: request.volume }),\n ...(request.params ? { params: request.params } : {}),\n ...(request.seed === undefined ? {} : { seed: request.seed }),\n ...(request.delay === undefined ? {} : { delay: request.delay }),\n ...(request.urgent ? { urgent: true } : {}),\n })\n if (!handle) return null\n playing.set(handle.id, handle)\n return { id: handle.id }\n },\n stop(handle) {\n playing.get(handle.id)?.stop()\n playing.delete(handle.id)\n },\n loop(sound, options): LoopHandle {\n const loop = engine.loop(sound)\n // the loop's place comes with the first set; `params.cutoff` drives the first filter\n let position = options?.position\n return {\n set: (state) => {\n position = state.position ?? position\n const cutoff = state.params?.['cutoff']\n loop.set({\n ...(state.volume === undefined ? {} : { volume: state.volume }),\n ...(state.frequency === undefined ? {} : { frequency: state.frequency }),\n ...(position ? { position } : {}),\n ...(cutoff === undefined ? {} : { cutoff }),\n })\n },\n stop: () => loop.stop(),\n }\n },\n setListener(listener: AudioListener) {\n engine.setListener(listener)\n },\n register(bank: unknown) {\n engine.register(bank as SoundBank)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,IAAM,eAAe,CAAC,OAAO,OAAO;AAiBpC,IAAM,aAAa,CAAC,SAAS,OAAO,WAAW,UAAU;AAuCzD,IAAM,YAA8C,EAAE,OAAO,GAAG,QAAQ,MAAM,OAAO,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