csgo\scripts\sound_operator_stacks.txt

From Valve Developer Community
Jump to navigation Jump to search

The following is the content of the file as seen in Counter-Strike: Global Offensive Counter-Strike: Global Offensive, when the VPK that it is found in was last modified on 2023-11-07. The syntax of the file has been simplified for this page, omitting some indentation.

The intention of this page is to be able to reference predefined operator stacks from Counter-Strike: Global Offensive or to copy-paste (parts of) them without having to download the game and look up the file. The sections should make it easy to link to a specific one.

start_stacks

start_sync_to_entry

"elapsed_time" { "operator" "get_entry_time" } "duration_div" { "operator" "math_float" "apply" "div" "input1" "@elapsed_time.output_sound_duration" "input2" "1" } "time_mod" { "operator" "math_float" "apply" "mod" "input1" "@elapsed_time.output_sound_elapsed" "input2" "@duration_div.output" } "div_mult" { "operator" "math_float" "apply" "mult" "input1" "0.0" "input2" "@duration_div.output" } "add_offset" { "operator" "math_float" "apply" "add" "input1" "@time_mod.output" "input2" "@div_mult.output" } "negative_delay" { "operator" "math_float" "apply" "mult" "input1" "@add_offset.output" "input2" "-1.0" } "delay_output" { "operator" "sys_output" "input_float" "@negative_delay.output" "output" "delay" }

CS_start_sync_to_spectate

"get_opvar" { "operator" "get_opvar_float" "opvar" "spectateMusicDelay" } "max_spectate_time" { "operator" "math_float" "apply" "add" "input1" "-1.0" "input2" "0.0" } "max_spectate_time_on" { "operator" "math_float" "apply" "greater_than" "input1" "@max_spectate_time.output" "input2" "0.0" } "max_spectate_time_over" { "operator" "math_float" "apply" "greater_than" "input1" "@get_opvar.output" "input2" "@max_spectate_time.output" } "max_spectate_time_and" { "operator" "math_float" "apply" "min" "input1" "@max_spectate_time_on.output" "input2" "@max_spectate_time_over.output" } "block_start_this" { "operator" "sys_output" "input_float" "@max_spectate_time_and.output" "output" "block_start" } "***PRINT_block_start" { "operator" "util_print_float" // "input_execute" "@max_spectate_time_and.output" "input_execute" "0" }

"time_mod" { "operator" "math_float" "apply" "add" "input1" "@get_opvar.output" "input2" "0" } "negative_delay" { "operator" "math_float" "apply" "mult" "input1" "@time_mod.output" "input2" "-1.0" } "delay_output" { "operator" "sys_output" "input_float" "@negative_delay.output" "output" "delay" } "set_opvar" { "operator" "set_opvar_float" "opvar" "spectateMusicDelay" "input" "0.0" }


CS_distance_weapon_start

//replaces null.wav


"play_distant_version_1" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "1.0" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"limit_gunfire" { "operator" "sys_stop_entries" "input_max_entries" "2.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }

CS_limit_start

//replaces null.wav

"limit_entry" { "operator" "sys_stop_entries" "input_max_entries" "1.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }


CS_limit_foley_start

//replaces null.wav

"limit_entry" { "operator" "sys_stop_entries" "input_max_entries" "1.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }


CS_limit_physics_start

//replaces null.wav

"limit_entry" { "operator" "sys_stop_entries" "input_max_entries" "7.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }


CS_limit_bullet_impact

//replaces null.wav

"limit_entry" { "operator" "sys_stop_entries" "input_max_entries" "5.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }


CS_limit_footsteps_start

//replaces null.wav

"limit_entry" { "operator" "sys_stop_entries" "input_max_entries" "3.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }


CS_limit_suit_start

//replaces null.wav

"limit_entry" { "operator" "sys_stop_entries" "input_max_entries" "0.000000" //A sound will not stop itself from playing. "match_entity" "true" "match_substring" "false" "match_this_entry" "true" }


CS_random_music_entry_start_2

//replaces null.wav

"random_variation_picker" //use for random volume if needed { "operator" "math_random" "execute_once" "true" "input_execute" "1.0" "input_min" "1.0" //low value here "input_max" "3.0" //high value here. "round_to_int" "true" }

"compare_1" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@random_variation_picker.output" "input2" "1.0" }

"compare_2" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@random_variation_picker.output" "input2" "2.0" }

"compare_3" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@random_variation_picker.output" "input2" "3.0" }

"play_variation_1" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_1.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"play_variation_2" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_2.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"play_variation_3" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_3.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. } "set_start_music_selection" { "operator" "set_opvar_float" "opvar" "start_music_selection" "input" "@random_variation_picker.output" }


CS_timed_random_music_entry_start

//replaces null.wav

"host_time" { "input_execute" "1.0" "operator" "get_sys_time" } "mod_time" { "operator" "math_float" "apply" "mod" "input_execute" "1.0" "input1" "@host_time.output_host_time" "input2" "1.0" } "add_time" { "operator" "math_float" "apply" "add" "input_execute" "1.0" "input1" "@mod_time.output" "input2" "0.5" } "round_mod_time" { "operator" "math_func1" "function" "round" "input_execute" "1.0" "input1" "@add_time.output" }

"compare_1" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@round_mod_time.output" "input2" "1.0" }

"compare_2" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@round_mod_time.output" "input2" "2.0" }

"compare_3" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@round_mod_time.output" "input2" "3.0" }

"play_variation_1" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_1.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"play_variation_2" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_2.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"play_variation_3" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_3.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }


CS_random_music_entry_start_action

//replaces null.wav

"get_start_music_selection" { "operator" "get_opvar_float" "opvar" "start_music_selection" } "random_variation_picker" //use for random volume if needed { "operator" "math_random" "execute_once" "true" "input_execute" "1.0" "input_min" "1.0" //low value here "input_max" "3.0" //high value here. "round_to_int" "true" } "variation_switch" { "operator" "math_logic_switch" "input_switch" "0" "input1" "@random_variation_picker.output" "input2" "@get_start_music_selection.output" }

"compare_1" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@variation_switch.output" "input2" "1.0" }

"compare_2" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@variation_switch.output" "input2" "2.0" }

"compare_3" { "operator" "math_float" "apply" "equals" "input_execute" "1.0" "input1" "@variation_switch.output" "input2" "3.0" }

"play_variation_1" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_1.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"play_variation_2" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_2.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }

"play_variation_3" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@compare_3.output" "input_start" "1" "entry_name" "Default.Null" //Replace with the sound you want to play. }


CS_test_music_volume_deathcam_switch

"snd_musicvolume_convar" { "operator" "get_convar" "convar" "snd_musicvolume_fixed" } "snd_musicvolume_off" { "operator" "math_float" "apply" "less_than" "input1" "@snd_musicvolume_convar.output" "input2" "0.1" } "play_classic_deathcam" { "operator" "sys_start_entry" "execute_once" "true" "input_execute" "@snd_musicvolume_off.output" "input_start" "1" "entry_name" "Player.FreezeCam" } // don't play this "block_start" { "input_execute" "@snd_musicvolume_off.output" "operator" "sys_output" "input_float" "1" "output" "block_start" }


start_delay_to_track_sync_point

// the start sync point for the file we are syncing to "this_entry_syncpoints" { "operator" "get_track_syncpoint" "syncpoint_list" "syncpoints_1" "this_entry_syncpoints" "true" } "sync_track_syncpoints" { "operator" "get_track_syncpoint" "syncpoint_list" "syncpoints_1" "input_min_time_to_next_sync" "@this_entry_syncpoints.output_first_syncpoint" "input_max_time_to_next_sync" "1000" "match_entry" "DOTAMusic.BattleMusic" }

// output our resulting delay value "delay_output" { "operator" "sys_output" "input_float" "@sync_track_syncpoints.output_time_to_next_syncpoint" "output" "delay" }



//////////////////////////////////////////////////////////////////////////////////////////// // // update stacks // ////////////////////////////////////////////////////////////////////////////////////////////

update_stacks

update_play_at_velocity

// temporary disabling "upav_stop_TEMP" { "input_execute" "1" "execute_once" "false" "operator" "sys_stop_entries" "stop_this_entry" "true" }

"upav_elapsed_time" { "operator" "get_entry_time" } "upav_min_time" { "operator" "math_float" "apply" "greater_than" "input1" "@upav_elapsed_time.output_entry_elapsed" "input2" "0.2" } "upav_view_info" { "operator" "game_view_info" // "source" "entity" // "source" "emitter" } "upav_source_info" { "operator" "get_source_info" "source" "entity" // "source" "emitter" }

"upav_get_entity_info" { "input_execute" "1" "operator" "game_entity_info" "input_entity_index" "@upav_source_info.output_entity_index" } "upav_delta_trigger" { "operator" "math_float" "apply" "greater_than" // "input1" "@upav_get_entity_info.output_velocity" "input1" "@upav_view_info.output_velocity" "input2" "0.1" } "upav_delta_and_time" { "operator" "math_float" "apply" "min" "input1" "@upav_delta_trigger.output" "input2" "@upav_min_time.output" } "upav_test_stopped" { "operator" "math_float" "apply" "less_than" "input1" "@upav_elapsed_time.output_stop_elapsed" "input2" "0.0" }

// "PRINT_upav_delta_trigger" // { // "operator" "util_print_float" // "input" "@upav_delta_trigger.output" // } // "PRINT_upav_min_time" // { // "operator" "util_print_float" // "input" "@upav_min_time.output" // } // "PRINT_upav_delta_and_time" // { // "operator" "util_print_float" // "input" "@upav_delta_and_time.output" // }


"upav_play_entry" { "input_execute" "@upav_delta_and_time.output" "execute_once" "true" "operator" "sys_start_entry" "input_start" "@upav_delta_and_time.output" "entry_name" "Default.Null" } "upav_stop_entry" { "input_execute" "@upav_delta_and_time.output" "execute_once" "true" "operator" "sys_stop_entries" "stop_this_entry" "true" }


update_stop_at_time

"usat_elapsed_time" { "operator" "get_entry_time" }

"usat_stop_time" { "operator" "math_float" "apply" "greater_than" "input1" "@usat_elapsed_time.output_sound_elapsed" "input2" "1.0" } "usat_stop_entry" { "execute_once" "true" "input_execute" "@usat_stop_time.output" "operator" "sys_stop_entries" "stop_this_entry" "true" }

halftime_update_start_at_time

"usat_elapsed_time" { "operator" "get_entry_time" } "is_halftime_opvar" { "operator" "get_opvar_float" "opvar" "csgo_ishalftime" } "usat_stop_time" { "operator" "math_float" "apply" "greater_than" "input1" "@usat_elapsed_time.output_sound_elapsed" "input2" "6.0" } "is_halftime_and" { "operator" "math_float" "apply" "min" "input1" "@is_halftime_opvar.output" "input2" "@usat_stop_time.output" }

"usat_stop_entry" { "execute_once" "true" "input_execute" "@is_halftime_and.output" "operator" "sys_stop_entries" "stop_this_entry" "true" } "upav_play_entry" { "input_execute" "@is_halftime_and.output" "execute_once" "true" "operator" "sys_start_entry" "input_start" "1" "entry_name" "Default.Null" } "clear_halftime_opvar" { "input_execute" "@is_halftime_and.output" "operator" "set_opvar_float" "opvar" "csgo_ishalftime" "input" "0.0" }


// //////////////////////////////////////////////////////////////////////////////////////////// // // // // MUSIC STACKS // // // ////////////////////////////////////////////////////////////////////////////////////////////

CS_update_music_stereo

"start_time_opvar" { "input_execute" "0.0" "operator" "get_opvar_float" "opvar" "csgo_roundstart_time" } "host_time" { "input_execute" "0.0" "operator" "get_sys_time" } "elapsed_roundtime" { "input_execute" "0.0" "operator" "math_float" "apply" "sub" "input1" "@host_time.output_client_time" "input2" "@start_time_opvar.output" } "elapsed_time" { "operator" "get_entry_time" } "source_info" { "operator" "get_source_info" // "source" "entity" "source" "emitter" } "mixer" { "operator" "get_soundmixer" "mixgroup" "Music" } "snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } // "snd_musicvolume_opvar" // { // "operator" "get_opvar_float" // "opvar" "csgo_music_volume" // } "snd_musicvolume_convar" { "operator" "get_convar" "convar" "snd_musicvolume_fixed" } // "snd_musicvolume_switch" // { // "operator" "math_logic_switch" // "input_switch" "@snd_musicvolume_opvar.output_opvar_exists" // "input1" "@snd_musicvolume_convar.output" // "input2" "@snd_musicvolume_opvar.output" // } // "snd_cuevolume_opvar" // { // "operator" "get_opvar_float" // "opvar" "csgo_music_volume" // } "snd_cuevolume_convar" { "operator" "get_convar" "convar" "snd_musicvolume_fixed" } // "snd_cuevolume_switch" // { // "operator" "math_logic_switch" // "input_switch" "@snd_cuevolume_opvar.output_opvar_exists" // "input1" "@snd_cuevolume_convar.output" // "input2" "@snd_cuevolume_opvar.output" // } // "snd_musicvolume_max" // { // "operator" "math_float" // "apply" "max" // "input1" "@snd_musicvolume_switch.output" // "input2" "0.0" // } "dashboard" { "operator" "get_dashboard" } // "opvar_total" // { // "operator" "math_float" // "apply" "mult" // "input1" "@snd_musicvolume_max.output" // "input2" "@snd_cuevolume_switch.output" // } "music_total" { "operator" "math_float" "apply" "mult" "input1" "@snd_musicvolume_convar.output" "input2" "@snd_cuevolume_convar.output" } "convar_total" { "operator" "math_float" "apply" "mult" "input1" "@music_total.output" "input2" "@snd_gain_convar.output" } "dashboard_total" { "operator" "math_float" "apply" "mult" "input1" "@convar_total.output" "input2" "@dashboard.output" } "volume_fade_in" { "operator" "math_remap_float" "input" "@elapsed_time.output_sound_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "0.0" "input_map_max" "1.0" "default_to_max" "true" } "volume_fade_initial" { "input_execute" "1" "operator" "math_remap_float" "input" "@elapsed_time.output_sound_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "1.0" "input_map_max" "1.0" "default_to_max" "false" } "volume_lfo_time_scale" { "operator" "math_float" "apply" "mult" "input1" "@elapsed_time.output_sound_elapsed" "input2" "0.0" } "volume_lfo" { "operator" "math_func1" "function" "cos" "normalize_trig" "true" "input1" "@volume_lfo_time_scale.output" } "volume_lfo_scale" { "operator" "math_float" "apply" "invert_scale" "input1" "@volume_lfo.output" "input2" "0.0" }

"volume_fade_out" { "operator" "math_remap_float" "input" "@elapsed_time.output_stop_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "0.0" "input_map_max" "1.0" "default_to_max" "false" } "volume_invert_fadeout" { "operator" "math_float" "apply" "sub" "input1" "1.0" "input2" "@volume_fade_out.output" } "volume_apply_fade_in" { "operator" "math_float" "apply" "mult" "input1" "@volume_fade_in.output" "input2" "@dashboard_total.output" } "volume_apply_fade_initial" { "operator" "math_float" "apply" "mult" "input1" "@volume_fade_initial.output" "input2" "@volume_apply_fade_in.output" } "volume_apply_lfo" { "operator" "math_float" "apply" "mult" "input1" "@volume_apply_fade_initial.output" "input2" "@volume_lfo_scale.output" } "volume_apply_fade_out" { "operator" "math_float" "apply" "mult" "input1" "@volume_apply_lfo.output" "input2" "@volume_invert_fadeout.output" } "volume_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_volume" "input2" "@volume_apply_fade_out.output" } "volume_apply_adjust" { "operator" "math_float" "apply" "mult" "input1" "1.0" "input2" "@volume_apply_mixer.output" } "speaker_volume" { "operator" "math_float" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_apply_adjust.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult" "left_front" "1.0" "right_front" "1.0" "center" "0.0" "lfe" "0.0" "left_rear" "0.8" "right_rear" "0.8"

"input2[*]" "@speaker_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" } "get_selection_mixlayer_opvar" { "operator" "get_opvar_float" "opvar" "selection_mixlayer" }

// for block the "duration" that the file plays "hold_mixlayer_time_calc" { "operator" "math_float" "apply" "greater_than" "input1" "@elapsed_time.output_sound_duration" "input2" "@elapsed_time.output_entry_elapsed" } "hold_mixlayer_time_calc2" { "operator" "math_float" "apply" "mult" "input1" "@hold_mixlayer_time_calc.output" "input2" "@get_selection_mixlayer_opvar.output" }

"output_mixlayer_trigger" { "operator" "sys_output" "input_float" "@hold_mixlayer_time_calc2.output" "output" "mixlayer_trigger" } "stoptime_elapsed_trigger" { "operator" "math_float" "apply" "greater_than" "input1" "@volume_invert_fadeout.output" "input2" "0.0" } "stop_hold_output" { "operator" "sys_output" "output" "stop_hold" "input_float" "@stoptime_elapsed_trigger.output" } // for block the "duration" that the file plays "block_entry_time_calc" { "operator" "math_float" "apply" "add" "input1" "0.5" "input2" "@elapsed_time.output_entry_elapsed" }

"block_entries" { "operator" "sys_block_entries" "input_active" "0.0" "input_duration" "@block_entry_time_calc.output" //in seconds, you can use "@get_random.output" for a random blocking period "match_substring" "true" "match_entry" "foo" //The sound entry to use "match_channel" "false" "match_entity" "false" }


CS_update_music_gungame_startround

"import_stack" "CS_update_music_stereo" "volume_fade_initial" { "input_execute" "1" "input_min" "1.0" "input_max" "6.0" "input_map_min" "1.0" "input_map_max" "0.3" "default_to_max" "false" } "volume_fade_out" { "input_max" "3.0" } "mixer" { "mixgroup" "BuyMusic" } "update_track" { "operator" "track_update" } "import_stack" "update_stop_at_time" "usat_stop_time" { "input2" "6.0" }


// //////////////////////////////////////////////////////////////////////////////////////////// // // // // STANDARD STACKS // // // ////////////////////////////////////////////////////////////////////////////////////////////

update_simple_quad

"save_restore_output" { "operator" "sys_output" "execute_once" "true" "input_float" "1.0" "output" "save_restore" } "mixer" { "operator" "get_soundmixer" "mixgroup" "All" } "snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "volume_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_volume" "input2" "@snd_gain_convar.output" } "speaker_volume" { "operator" "math_float" "apply" "mult" "input1" "1" "input2" "@volume_apply_mixer.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult" "left_front" "1.0" "right_front" "1.0" "center" "0.0" "lfe" "0.0" "left_rear" "1.0" "right_rear" "1.0"

"input2[*]" "@speaker_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" } "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" }


update_default

"elapsed_time" { "operator" "get_entry_time" }

////////////////////// // POSITION "source_info" { "operator" "get_source_info" // "source" "entity" "source" "emitter" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" // "mixgroup" "All" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME

// NOTE: distance has precalculated minimum distance of the ss players "volume_falloff" { "operator" "calc_falloff" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "volume_fade_out" { "operator" "math_remap_float" "input" "@elapsed_time.output_stop_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "1.0" "input_map_max" "0.0" "default_to_max" "true" }

// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@volume_fade_out.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0" }

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" } "stoptime_elapsed_trigger" { "operator" "math_float" "apply" "greater_than" "input1" "@volume_fade_out.output" "input2" "0.0" } "stop_hold_output" { "operator" "sys_output" "output" "stop_hold" "input_float" "@stoptime_elapsed_trigger.output" }


CS_update_weapon

////////////////////// //convar which controls weapon falloff. "volume_sound_falloff_multiplier" { "operator" "get_convar" "convar" "weapon_sound_falloff_multiplier" }

////////////////////// // "variables" "volume_xfade_start_dist" { "operator" "math_float" "apply" "mult" "input1" "@volume_sound_falloff_multiplier.output" "input2" "800" } "volume_xfade_end_dist" { "operator" "math_float" "apply" "mult" "input1" "@volume_sound_falloff_multiplier.output" "input2" "2800" } "volume_falloff_min" { "operator" "math_float" "apply" "mult" "input1" "@volume_sound_falloff_multiplier.output" "input2" "400.0" } "volume_falloff_max" { "operator" "math_float" "apply" "mult" "input1" "@volume_sound_falloff_multiplier.output" "input2" "3937.0" }

////////////////////// // POSITION "source_info" { "operator" "get_source_info" // "source" "entity" "source" "emitter" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" "mixgroup" "AllWeapons" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME

// NOTE: distance has precalculated minimum distance of the ss players "volume_falloff" { "operator" "calc_falloff_curve" "input_distance" "@source_distance.output" //"input_level" "@level_apply_mixer.output" "input_min" "@volume_falloff_min.output" "input_max" "@volume_falloff_max.output" "input_atten" "0.98" "input_curve_amount" "0.7"

//make gunfire always play at low volume all across the map. "input_volume_min" "0.05" } "volume_distance_xfade" { "operator" "math_remap_float" "input" "@source_distance.output" "input_min" "@volume_xfade_start_dist.output" "input_max" "@volume_xfade_end_dist.output" "input_map_min" "1.0" "input_map_max" "0.0" //old: 0.0 "default_to_max" "false" } "volume_xfade_exponent" { "operator" "math_float" "apply" "pow" "input1" "@volume_distance_xfade.output" // "input2" "1.22" "input2" "1.2" } "volume_invert_distance_xfade" { "operator" "math_float" "apply" "sub" "input1" "1.0" "input2" "@volume_xfade_exponent.output" }

// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@volume_invert_distance_xfade.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0"

}

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" }


CS_update_physics

////////////////////// // POSITION "source_info" { "operator" "get_source_info" "source" "entity" //"source" "emitter" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" "mixgroup" "Physics" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME

// NOTE: distance has precalculated minimum distance of the ss players "volume_falloff" { "operator" "calc_falloff_curve" "input_distance" "@source_distance.output" "input_min" "120.0" "input_max" "600.0" "input_atten" "1.0" "input_curve_amount" "0.1" }

"distance_shutdown" { "operator" "math_float" "apply" "less_than" "input1" "@source_distance.output" "input2" "600.0" }


// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@distance_shutdown.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0"

}

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" }


CS_update_rics

////////////////////// // POSITION "source_info" { "operator" "get_source_info" // "source" "entity" "source" "emitter" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" "mixgroup" "BulletImpacts" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME

// NOTE: distance has precalculated minimum distance of the ss players "volume_falloff" { "operator" "calc_falloff_curve" "input_distance" "@source_distance.output" "input_min" "120.0" "input_max" "600.0" "input_atten" "1.0" "input_curve_amount" "0.1" }

"distance_shutdown" { "operator" "math_float" "apply" "less_than" "input1" "@source_distance.output" "input2" "600.0" }


// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@distance_shutdown.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0"

}

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" }


CS_update_footsteps

"elapsed_time" { "operator" "get_entry_time" }

////////////////////// // POSITION "source_info" { "operator" "get_source_info" "source" "entity" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" // "mixgroup" "All" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" "input_scalar" "1.0" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME "volume_falloff" { "operator" "calc_falloff_curve" "input_distance" "@source_distance.output" "input_min" "120.0" "input_max" "1100.0" "input_atten" "0.96" "input_curve_amount" "0.7" } "volume_fade_out" { "operator" "math_remap_float" "input" "@elapsed_time.output_stop_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "1.0" "input_map_max" "0.0" "default_to_max" "true" }

"random_volume" //use for random volume if needed { "operator" "math_random" "execute_once" "true" "input_execute" "1.0" "input_min" "1.0" //low value here "input_max" "1.0" //high value here. "round_to_int" "false" }

// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "0.8" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@volume_fade_out.output" "input7" "@source_info.output_volume" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "@random_volume.output" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0" }

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" } "stoptime_elapsed_trigger" { "operator" "math_float" "apply" "greater_than" "input1" "@volume_fade_out.output" "input2" "0.0" } "stop_hold_output" { "operator" "sys_output" "output" "stop_hold" "input_float" "@stoptime_elapsed_trigger.output" }


// SUIT SOUNDS

CS_update_suit

"elapsed_time" { "operator" "get_entry_time" }

////////////////////// // POSITION "source_info" { "operator" "get_source_info" "source" "entity" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" // "mixgroup" "All" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" "input_scalar" "1.0" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME "volume_falloff" { "operator" "calc_falloff_curve" "input_distance" "@source_distance.output" "input_min" "120.0" "input_max" "1100.0" "input_atten" "0.96" "input_curve_amount" "0.7" } "volume_fade_out" { "operator" "math_remap_float" "input" "@elapsed_time.output_stop_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "1.0" "input_map_max" "0.0" "default_to_max" "true" }

// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@volume_fade_out.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0" }

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" } "stoptime_elapsed_trigger" { "operator" "math_float" "apply" "greater_than" "input1" "@volume_fade_out.output" "input2" "0.0" } "stop_hold_output" { "operator" "sys_output" "output" "stop_hold" "input_float" "@stoptime_elapsed_trigger.output" }


////////// ///// WEAPON FOLEY /////////

CS_update_foley

"elapsed_time" { "operator" "get_entry_time" }

////////////////////// // POSITION "source_info" { "operator" "get_source_info" "source" "entity" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" }

// Phonon calculation -- xfade phonon effects once the player // is very close to the emitter. "phonon_xfade_start_dist" { "operator" "math_float" "apply" "add" "input1" "0.0" "input2" "50" } "phonon_xfade_end_dist" { "operator" "math_float" "apply" "add" "input1" "0.0" "input2" "180" } "phonon_distance_xfade" { "operator" "math_remap_float" "input" "@source_distance.output" "input_min" "@phonon_xfade_start_dist.output" "input_max" "@phonon_xfade_end_dist.output" "input_map_min" "0.0" "input_map_max" "1.0" "default_to_max" "true" }

"phonon_output" { "operator" "sys_output" "input_float" "@phonon_distance_xfade.output" "output" "phonon_xfade" }

//////////////////// // calc "mixer" { "operator" "get_soundmixer" // "mixgroup" "All" }

// NOTE: uses player data, ie: SS, return least occluded value "occlusion" { "operator" "calc_occlusion" "input_position" "@source_info.output_position" "input_scalar" "1.0" }

"snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME "volume_falloff" { "operator" "calc_falloff_curve" "input_distance" "@source_distance.output" "input_min" "400.0" "input_max" "1100.0" "input_atten" "0.96" "input_curve_amount" "0.7" } "volume_fade_out" { "operator" "math_remap_float" "input" "@elapsed_time.output_stop_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "1.0" "input_map_max" "0.0" "default_to_max" "true" }

// multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@volume_falloff.output" "input3" "@mixer.output_volume" "input4" "@snd_gain_convar.output" "input5" "@occlusion.output" "input6" "@volume_fade_out.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

// output mix layer trigger "output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" } /////////////////// // PITCH "pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0" }

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" }

"speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" } "stoptime_elapsed_trigger" { "operator" "math_float" "apply" "greater_than" "input1" "@volume_fade_out.output" "input2" "0.0" } "stop_hold_output" { "operator" "sys_output" "output" "stop_hold" "input_float" "@stoptime_elapsed_trigger.output" }


CS_update_linear_falloff

////////////////////// // POSITION "source_info" { "operator" "get_source_info" // "source" "entity" "source" "emitter" }

"get_entity_info" { "input_execute" "1" "operator" "game_entity_info" "input_entity_index" "@source_info.output_entity_index" }

// reports various time values "elapsed_time" { "operator" "get_entry_time" }

// NOTE: uses player data, ie: SS, returns minimum distance "source_distance" { "operator" "calc_source_distance" "input_position" "@source_info.output_position" // "in2d" "1.0" }

// get values of specified mixgroup // NOTE: I believe this also sets this sound to be a member of that mixgroup as well // which is relevant to mixlayers "mixer" { "operator" "get_soundmixer" "mixgroup" "All" }

"output_mixlayer_trigger" { "execute_once" "1" "operator" "sys_output" "input_float" "1" "output" "mixlayer_trigger" }

// NOTE: uses player data, ie: SS, return least occluded value // "occlusion" // { // "operator" "calc_occlusion" // "input_position" "@source_info.output_position" // }

// convar to control all sound levels "snd_gain_convar" { "operator" "get_convar" "convar" "snd_gain" } "snd_op_test_convar" { "operator" "get_convar" "convar" "snd_op_test_convar" }

////////////////////// // LEVEL // adjust SPL to reflect mixer settings, this will be used below in falloff calculations "level_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_level" "input2" "@source_info.output_level" }

///////////////////// // VOLUME // // Various volume calculations //

"volume_falloff_linear" { "operator" "math_remap_float" "input" "@source_distance.output" "input_min" "30.0" "input_max" "3000.0" "input_map_min" "1.0" "input_map_max" "0.05" "default_to_max" "false" }

"volume_fade_in" { "operator" "math_remap_float" "input" "@elapsed_time.output_entry_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "0.05" "input_map_max" "1.0" "default_to_max" "true" } "volume_fade_out" { "operator" "math_remap_float" "input" "@elapsed_time.output_stop_elapsed" "input_min" "0.0" "input_max" "0.0" "input_map_min" "1.0" "input_map_max" "0.0" "default_to_max" "false" } // multiply all volume adjustments together "volume_accumulate" { "operator" "math_float_accumulate12" "apply" "mult" "input1" "@source_info.output_volume" "input2" "@mixer.output_volume" "input3" "@snd_gain_convar.output" "input4" "@volume_falloff_linear.output" "input5" "@volume_fade_in.output" "input6" "@volume_fade_out.output" "input7" "1.0" "input8" "1.0" "input9" "1.0" "input10" "1.0" "input11" "1.0" "input12" "1.0" }

///////////////////////////////////////////////////////// // handle stoptime/fade outs "stoptime_elapsed_trigger" { "operator" "math_float" "apply" "greater_than" "input1" "@volume_fade_out.output" "input2" "0.0" } "stop_hold_output" { "operator" "sys_output" "output" "stop_hold" "input_float" "@stoptime_elapsed_trigger.output" }

/////////////////// // PITCH

"pitch_output" { "operator" "sys_output" "output" "pitch" "input_float" "@source_info.output_pitch" }

/////////////////// // DSP "dsp_emitter" { "operator" "math_float" "apply" "set" "input1" "1.0" } "dsp_apply_mixer" { "operator" "math_float" "apply" "mult" "input1" "@mixer.output_dsp" "input2" "@dsp_emitter.output" } "dsp_distantDSP" { "operator" "calc_distant_dsp" "input_distance" "@source_distance.output" "input_level" "@level_apply_mixer.output" } "dsp_apply_distant" { "operator" "math_float" "apply" "mult" "input1" "@dsp_distantDSP.output" "input2" "@dsp_apply_mixer.output" } "dsp_output" { "operator" "sys_output" "input_float" "@dsp_apply_distant.output" "output" "dsp" }

///////////////////// // SPEAKERS

// NOTE: uses player data, ie: SS, calculates all players and merges them "speakers_spatialize" { "operator" "calc_spatialize_speakers" "input_radius_min" "23" "input_radius_max" "24" "input_distance" "@source_distance.output" "input_position" "@source_info.output_position" "input_rear_stereo_scale" "1.0"

}

"speakers_apply_volume" { "operator" "math_speakers" "apply" "mult" "input1" "@speakers_spatialize.output" "input2[*]" "@volume_accumulate.output" }

"speakers_limit" { "operator" "math_speakers" "apply" "mult"

"left_front" "1.0" "right_front" "1.0" "center" "1.0" "lfe" "1.0" "left_rear" "1.0" "right_rear" "1.0"

"input2" "@speakers_apply_volume.output" } "speakers_output" { "operator" "sys_output" "input_speakers" "@speakers_limit.output" "output" "speakers" }


update_stop_at_track_syncpoint

"usats_this_entry_syncpoints" { "operator" "get_track_syncpoint" "syncpoint_list" "syncpoints_1" "this_entry_syncpoints" "true" }

"usats_elapsed_time" { "operator" "get_entry_time" }

"usats_stop_time" { "operator" "math_float" "apply" "greater_than" "input1" "@usats_elapsed_time.output_sound_elapsed" "input2" "@usats_this_entry_syncpoints.output_first_syncpoint" } "usats_stop_entry" { "input_execute" "@usats_stop_time.output" "operator" "sys_stop_entries" "stop_this_entry" "false" "input_max_entries" "0.000000" //A sound will not stop itself from playing. "match_entity" "false" "match_entry" "Default.Null" }