"start_stacks"
{
// 	"start_default"
// 	{
// 		"stop_entries"
// 		{
// 			"operator" "sys_stop_entries"
// 		}
// 	}
// 	"start_test_random"
// 	{
// 		"random_float"
// 		{
// 			"operator" "math_random"
// 			"input_min" "0.0"
// 			"input_max" "1.0"
// 		}
// 	}

// 	"start_test"
// 	{

// 		// "get_elapsed"
// 		// {
// 			// "operator" "get_entry_time"
// 		// }

// // 		"play_entry"
// // 		{
// // 			"operator" "sys_start_entry"
// // 			"input_start" "1"	
// // 			"entry_name" "xray.beep"	
// // 		}
// 		"stop_entries"
// 		{
// 			"operator" "sys_stop_entries"
// 		}
// 		"block_entries"
// 		{
// 			"operator" "sys_block_entries"
// 			"input_active" "1.0"	
// 			"input_duration" "2.0"
// 			"match_substring" "false"
// 			"match_entry" "xray.beep"
// 			// "match_sound" "npc\dog\dog_idlemode_loop1.wav"
// 			"match_channel" "false"
// 			"match_entity" "false"
// 		}
// 		"delay_output"
// 		{
// 			"operator" "sys_output"
// 			"input_float" "0.0"
// 			"output" "delay"
// 		}
// 	}
// 	"start_global_bpm_quantize"
// 	{
// 		"sys_time"
// 		{
// 			"operator" "get_sys_time"
// 		}
// 		"bpm"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "60"
// 			"input2" "120"	
// 		}
// 		"beats"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@bpm.output"
// 			"input2" "1"	
// 		}
//  		"time_mod"
// 		{
// 			"operator" "math_float"
// 			"apply" "mod"
// 			"input1" "@sys_time.output_client_time"
// 			"input2" "@beats.output"
// 		}
//  		"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"
// 		}
// 	}
	"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"
		}
	}

	"INS_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"
		}
	}

	"INS_limit_footsteps_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"
		}
	}
	
	"INS_speed_of_sound"
	{

		"source_pos_info"
		{
			"operator" "get_source_info"
			"source"   "emitter"
		}

		"source_sound_distance"
		{
			"operator" "calc_source_distance"
			"input_position"   "@source_pos_info.output_position"
		}
		
		"duration_delay_div"
	{
			"operator" "math_float"
 			"apply" "div"	
 			"input1" "@source_sound_distance.output"
 			"input2" "9002.62"	// 17391.08 units per second = 331.3 meters per second (other titles use 171.5 Mps = 9002.62 units per second)
 		}
		
 		"delay_output"
		{
 			"operator" "sys_output"
 			"input_float" "@duration_delay_div.output"
			"output" "delay"
		}
}

	"INS_weapon_sound_sample_start_random" 
{
	"weapon_random_float"
	{
		"operator" "math_random"
		"input_min" "0.0"
		"input_max" "-0.0000000000000005"
	}
	
	 "delay_weapon_output"
	{
 		"operator" "sys_output"
 		"input_float" "@weapon_random_float.output"
		"output" "delay"
	}
	
	
 }
 
 "INS_DistantVoiceSwap" 
   {
		"voice_source_pos_info"
		{
			"operator" "get_source_info"
			"source"   "emitter"
		}
		
		"voice_source_sound_distance"
		{
			"operator" "calc_source_distance"
			"input_position"   "@voice_source_pos_info.output_position"
		}
		
		"Swap_trigger"
 		{
 			"operator" "math_float"
 			"apply" "greater_than"	
 			"input1" "@voice_source_sound_distance.output"
 			"input2" "1000"
 		}
		
		"voice_play_entry"
 		{
 			"operator" "sys_start_entry"
 			"input_start" "@Swap_trigger.output"
 			"entry_name" "foo"
 		}
		
		"block_close_voice"
		{
		    "operator" "sys_output"
			"input_float" "@Swap_trigger.output"
			"output" "block_start"
		} 
			 			
   } 
   
    "INS_DistantVoiceSwap2" 
   {
		"voice_source_pos_info2"
		{
			"operator" "get_source_info"
			"source"   "emitter"
		}
		
		"voice_source_sound_distance2"
		{
			"operator" "calc_source_distance"
			"input_position"   "@voice_source_pos_info2.output_position"
		}
		
		"Swap_trigger2"
 		{
 			"operator" "math_float"
 			"apply" "greater_than"	
 			"input1" "@voice_source_sound_distance2.output"
 			"input2" "500"
 		}
		
		"voice_play_entry2"
 		{
 			"operator" "sys_start_entry"
 			"input_start" "@Swap_trigger2.output"
 			"entry_name" "foo"
 		}
		
		"block_close_voice2"
		{
		    "operator" "sys_output"
			"input_float" "@Swap_trigger2.output"
			"output" "block_start"
		} 
			 			
   } 

// 	"start_delay_sync_to_entry"
// 	{
// 		"import_stack" "start_sync_to_entry"
//  		"negative_delay"
// 		{
// 			"apply" "sub"
// 			"input1" "@duration_div.output"
// 			"input2" "@time_mod.output"
// 		}

// 	}

// 		//Console hacks begin here.
		
		
// 		"sys_get_platform" //should be for X360/PS3, only use PC for testing.
// 		{
// 			"operator" "sys_platform"
// 			//"pc" "true" //IF THIS IS UNCOMMENTED CHANGE IT!!!  SERIOUSLY!!!
// 			"x360" "true"
// 			"ps3" "true"
// 		}
		
// 		"limit_robot_sounds_ps3"
// 		{
// 			"operator" "sys_stop_entries"
// 			"input_execute" "@sys_get_platform.output"
// 			"input_max_entries" "9.000000" //I hate myself.
// 			"match_entity" "false"	
// 			"match_substring" "true"
// 			"match_entry" "Robot"		
// 		}
		
// 		"ps3_num_voices_compare"
// 		{
// 			"operator" "math_float"
// 			"apply" "greater_than_or_equal"	
// 			"input1" "@limit_robot_sounds_ps3.output_entries_matching" // This is the percentage chance to play a null
// 			"input2" "10.0" //match the max number of played sounds ( = input_max_entries + 1 )
// 		}
		
// 		"block_robot_entries_ps3"  //helps with disc I/O: Blocks sound requests of robots once a max number of robots exist
// 		{
// 			"operator" "sys_block_entries"
// 			//"input_execute" "0.0"
// 			"input_execute" "@ps3_num_voices_compare.output"
// 			"input_active" "1.0"	
// 			"input_duration" "0.25" //in seconds, you can use "@get_random.output" for a random blocking period
// 			"match_substring" "true"
// 			"match_entry" "Robot" //The sound entry to use
// 			"match_channel" "false"
// 			"match_entity" "false"
// 		}
		
// 		"limit_sound_ps3"
// 		{
// 			"operator" "sys_stop_entries"
// 			"input_execute" "0.0"
// 			//"input_execute" "@sys_get_platform.output"
// 			"input_max_entries" "0.000000" //A sound will not stop itself from playing.
// 			"match_entity" "false"	
// 			"match_substring" "true"
// 			"match_entry" "NONE"		
// 		}
		
// 		"block_entries_ps3"
// 		{
// 			"operator" "sys_block_entries"
// 			"input_execute" "0.0"
// 			//"input_execute" "@sys_get_platform.output"
// 			"input_active" "1.0"	
// 			"input_duration" "5.0" //in seconds, you can use "@get_random.output" for a random blocking period
// 			"match_substring" "false"
// 			"match_entry" "NONE" //The sound entry to use
// 			"match_channel" "false"
// 			"match_entity" "false"
// 		}
		
// 	}

	"INS_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" "0.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" "0.0"
		}		
				
		"compare_2"
		{
			"operator" "math_float"
			"apply" "equals"	
 			"input_execute" "1.0"
			"input1" "@random_variation_picker.output"
			"input2" "1.0"
		}	
		
		"compare_3"
		{
			"operator" "math_float"
			"apply" "equals"	
 			"input_execute" "1.0"
			"input1" "@random_variation_picker.output"
			"input2" "2.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.
		}
		
	}

	"INS_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.
		}
    }
	
	
	"INS_mid_distance_weapon_start" //replaces null.wav
	{

		"play_mid_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.
		}
    }
	
	
	"INS_limit_start" //replaces null.wav
	{
		"limit_entry"
		{
			"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"
		}
	}
	
		"INS_limit_start2" //replaces null.wav
	{
		"limit_entry2"
		{
			"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"
		}
	}
	
		"INS_limit_start3" //replaces null.wav
	{
		"limit_entry3"
		{
			"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"
		}
	}
	

	
// ////////////////////////////////////////////////////////////////////////////////////////////
// //
// // dialog start stacks
// //
// ////////////////////////////////////////////////////////////////////////////////////////////

	"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"
{

////////////////////////////////////////////////////////////////////////////////////////////
//
// TEST STACKS
//
////////////////////////////////////////////////////////////////////////////////////////////

// 	"update_test1"
// 	{

// 		"test1_value1"
// 		{
// 			"operator" "math_float"
// 			"apply" "add"	
// 			"input1" "8"
// 			"input2" "9"
// 		}
// 		"test1_value1"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "0"
// 			"input2" "1"
// 		}
// 		"test1_value2"
// 		{
// 			"operator" "math_float"
// 			"apply" "add"	
// 			"input1" "@test1_value1.output"
// 			"input2" "1"
// 		}
// 	}
// 	"update_test2"
// 	{
// 		"test2_value1"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "8"
// 			"input2" "9"
// 		}
// 		"test2_value1"
// 		{
// 			"apply" "add"	
// 			"input1" "6"
// 			"input2" "7"
// 		}
// 		"test2_value2"
// 		{
// 			"operator" "math_float"
// 			"apply" "add"	
// 			"input1" "@test2_value1.output"
// 			"input2" "1"
// 		}
// 	}
// 	"update_test3"
// 	{
// 		"import_stack" "update_test1"
// 		"import_stack" "update_test2"
// 		"test2_value1"
// 		{
// 			"apply" "add"	
// 			"input1" "2"
// 			"input2" "3"
// 		}
// 	}
// 	"update_test4"
// 	{
// 		"elapsed_time"
// 		{
// 			"operator" "get_entry_time"
// 		}
// 		"duration_div"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "@elapsed_time.output_sound_duration"
// 			"input2" "4"	
// 		}
// 		"time_div"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "@elapsed_time.output_sound_elapsed"
// 			"input2" "@duration_div.output"	
// 		}
// 		"time_mod"
// 		{
// 			"operator" "math_float"
// 			"apply" "mod"	
// 			"input1" "@time_div.output"
// 			"input2" "1"	
// 		}
// 		"time_step"
// 		{
// 			"operator" "math_float"
// 			"apply" "sub"	
// 			"input1" "@time_div.output"
// 			"input2" "@time_mod.output"
// 		}
// 		"step_delta"
// 		{
// 			"operator" "math_delta"
// 			"input" "@time_step.output"	
// 		}
// 		"delta_trigger"
// 		{
// 			"operator" "math_float"
// 			"apply" "greater_than"	
// 			"input1" "@step_delta.output"
// 			"input2" "0.1"
// 		}
		
// 		"play_entry"
// 		{
// 			"operator" "sys_start_entry"
// 			"input_start" "@delta_trigger.output"
// 			"entry_name" "xray.beep"	
// 		}

// 		"speaker_volume"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "1"
// 			"input2" "1"
// 		}

// 		"speakers_limit"
// 		{
// 			"operator"      "math_speakers"
// 			"apply"	       "mult"
// 			"left_front"   "1.0"	
// 			"right_front"  "1.0"	
// 			"center"       "0.0"	
// 			"lfe"          "0.0"	
// 			"left_rear"    "0.0"
// 			"right_rear"   "0.0"	
			
// 			"input2[*]" "@speaker_volume.output"		
// 		}

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

// 	"update_remap_tests"
// 	{

// 		"remap_norm"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" ".7"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_norm_rev1"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" ".7"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_norm_rev2"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" ".7"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "1.0"
// 			"input_map_max" "0.0"
// 		}
// 		"remap_norm_rev3"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" ".7"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "1.0"
// 			"input_map_max" "0.0"
// 		}
// 		"remap_less_than_min"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-1"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_greater_than_max"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "2"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_less_than_min_clamp"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-1"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 			"clamp_range" "true"	
// 		}
// 		"remap_greater_than_max_clamp"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "2"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 			"clamp_range" "true"	
// 		}

// 		"remap_equal_equal_min_max"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "1"
// 			"input_min" "1"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_equal_equal_min_max_default_min"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "1"
// 			"input_min" "1"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 			"default_to_max" "false"
// 		}

// 		"remap_less_than_equal_min_max"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" ".5"
// 			"input_min" "1"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_greater_than_equal_min_max"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "1.5"
// 			"input_min" "1"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_greater_than_range"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "1.5"
// 			"input_min" "0"
// 			"input_max" "1"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_less_than_range"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "0.5"
// 			"input_min" "1.0"
// 			"input_max" "2.0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}

// 		"remap_norm_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" ".7"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_less_than_min_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-1"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_greater_than_max_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "2"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 		}
// 		"remap_less_than_min_clamp_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-1"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 			"clamp_range" "true"	
// 		}
// 		"remap_greater_than_max_clamp_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "2"
// 			"input_min" "1"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "1.0"
// 			"clamp_range" "true"	
// 		}

// 		"big_remap_norm"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "70"
// 			"input_min" "0"
// 			"input_max" "100"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_less_than_min"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-1"
// 			"input_min" "0"
// 			"input_max" "100"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_greater_than_max"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "200"
// 			"input_min" "0"
// 			"input_max" "100"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_less_than_min_clamp"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-1"
// 			"input_min" "0"
// 			"input_max" "100"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 			"clamp_range" "true"	
// 		}
// 		"big_remap_greater_than_max_clamp"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "200"
// 			"input_min" "0"
// 			"input_max" "100"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 			"clamp_range" "true"	
// 		}

// 		"big_remap_greater_than_range"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "150"
// 			"input_min" "0"
// 			"input_max" "100"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_less_than_range"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "50"
// 			"input_min" "100.0"
// 			"input_max" "200.0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}

// 		"big_remap_norm_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "70"
// 			"input_min" "100"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_less_than_min_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-100"
// 			"input_min" "100"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_greater_than_max_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "200"
// 			"input_min" "100"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 		}
// 		"big_remap_less_than_min_clamp_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "-100"
// 			"input_min" "100"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 			"clamp_range" "true"	
// 		}
// 		"big_remap_greater_than_max_clamp_rev"
// 		{
// 			"execute_once" "true"
// 			"operator" "math_remap_float"
// 			"input" "200"
// 			"input_min" "100"
// 			"input_max" "0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "100.0"
// 			"clamp_range" "true"	
// 		}


// 	}

// 	"update_remap_test"
// 	{

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

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

// 		"remap_distance"
// 		{
// 			"operator" "math_remap_float"
// 			"input" "@source_distance.output"
// 			"input_min" "300"
// 			"input_max" "1000"
// 			"input_map_min" "0.80"
// 			"input_map_max" "1.2"
// 		}
// 		"invert_remap"
// 		{
// 			"operator" "math_float"
// // 			"apply" "sub"
// 			"apply" "mult"
// 			"input1" "1.0"
// 			"input2" "@remap_distance.output"
// 		}

// 		"pitch_output"
// 		{
// 			"operator" "sys_output"
// 			"output"   "pitch"
// 			"input_float" "@remap_distance.output"	
// 		}

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

// 		"speakers_spatialize"
// 		{
// 			"operator" "calc_spatialize_speakers"
// 			"input_radius"  "300"
// 			"input_distance"  "@source_distance.output"
// 			"input_position"  "@source_info.output_position"
// 		}
	
// 		"speakers_volume"
// 		{
// 			"operator"     "math_speakers"
// 			"apply"	       "mult"
// 			"input1"       "@speakers_spatialize.output"
// 			"input2[*]"	   "@invert_remap.output"
// 			// "input2[*]"	   "@facing.output"
// 		}

// 		"speakers_output"
// 		{
// 			"operator" "sys_output"
// 			"input_speakers" "@speakers_volume.output"
// 			"output" "speakers"
// 		}
// 	}

	"update_play_at_velocity"
	{
		"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_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"
			"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_entry_elapsed"
			"input2" "1.0"
		}
		"usat_stop_entry"
		{
			"execute_once" "true"
			"input_execute" "@usat_stop_time.output"
			"operator" "sys_stop_entries"
			"stop_this_entry" "true"	
		}
	}

// 	"update_trigger_layer_til_time"
// 	{
// 		"utltt_elapsed_time"
// 		{
// 			"operator" "get_entry_time"
// 		}
		
// 		"utltt_trigger_time"
// 		{
// 			"operator" "math_float"
// 			"apply" "less_than"	
// 			"input1" "@utltt_elapsed_time.output_sound_elapsed"
// 			"input2" "1.0"
// 		}
// 		"utltt_output_mixlayer_trigger"
// 		{
// 			"operator" "sys_output"
// 			"input_float" "@utltt_trigger_time.output"
// 			"output" "mixlayer_trigger"
// 		}

// 	}

// 	"update_stop_at_distance"
// 	{
// 		// this will use the standard "source_distance" operator exists
// 		"usad_stop_dist"
// 		{
// 			"operator" "math_float"
// 			"apply" "greater_than"	
// 			"input1" "0.0"
// 			"input2" "1.0"
// 		}
// 		"usad_stop_entry"
// 		{
// 			"operator" "sys_stop_entries"
// 			"input_execute" "@usad_stop_dist.output"
// 			"stop_this_entry" "true"	
// 		}
// 	}
	
// ////////////////////////////////////////////////////////////////////////////////////////////
// //
// // TRIGGER STACKS
// //
// ////////////////////////////////////////////////////////////////////////////////////////////
// 	"update_music_div_trigger"
// 	{
// 		"elapsed_time_div"
// 		{
// 			"operator" "get_entry_time"
// 		}
// 		"duration_div"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "@elapsed_time_div.output_sound_duration"
// 			"input2" "4"	
// 		}
// 		"time_div"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "@elapsed_time_div.output_sound_elapsed"
// 			"input2" "@duration_div.output"	
// 		}
// 		"time_mod"
// 		{
// 			"operator" "math_float"
// 			"apply" "mod"	
// 			"input1" "@time_div.output"
// 			"input2" "1"	
// 		}
// 		"time_step"
// 		{
// 			"operator" "math_float"
// 			"apply" "sub"	
// 			"input1" "@time_div.output"
// 			"input2" "@time_mod.output"
// 		}
// 		"step_delta"
// 		{
// 			"operator" "math_delta"
// 			"input" "@time_step.output"	
// 		}
// 		"delta_trigger"
// 		{
// 			"operator" "math_float"
// 			"apply" "greater_than"	
// 			"input1" "@step_delta.output"
// 			"input2" "0.1"
// 		}
		
// 		"play_entry"
// 		{
// 			"operator" "sys_start_entry"
// 			"input_start" "@delta_trigger.output"
// 			"entry_name" "xray.beep"	
// 		}
// 	}

// 	"update_looping_triggers"
// 	{
// 		"elapsed_time_div"
// 		{
// 			"operator" "get_entry_time"
// 		}
// 		///////////// x1
//  		"duration_div_x1"
//  		{
//  			"operator" "math_float"
//  			"apply" "div"	
//  			"input1" "@elapsed_time_div.output_sound_duration"
//  			"input2" "4"	
//  		}
// 		"time_div_x1"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "@elapsed_time_div.output_entry_elapsed"
// 			"input2" "@duration_div_x1.output"	
// 		}
// 		"time_mod_x1"
// 		{
// 			"operator" "math_float"
// 			"apply" "mod"	
// 			"input1" "@time_div_x1.output"
// 			"input2" "1"	
// 		}
// 		"time_step_x1"
// 		{
// 			"operator" "math_float"
// 			"apply" "sub"	
// 			"input1" "@time_div_x1.output"
// 			"input2" "@time_mod_x1.output"
// 		}
// 		"step_delta_x1"
// 		{
// 			"operator" "math_delta"
// 			"input" "@time_step_x1.output"	
// 		}
// 		"delta_trigger_x1"
// 		{
// 			"operator" "math_float"
// 			"apply" "greater_than"	
// 			"input1" "@step_delta_x1.output"
// 			"input2" "0.1"
// 		}
		
// 		"play_entry_x1"
// 		{
// 			"operator" "sys_start_entry"
// 			"input_start" "@delta_trigger_x1.output"
// 			"entry_name" "xray.beep"	
// 		}

// 		///////////// x2
//  		"duration_div_x2"
//  		{
//  			"operator" "math_float"
//  			"apply" "div"	
//  			"input1" "@elapsed_time_div.output_sound_duration"
//  			"input2" "4"	
//  		}
// 		"time_div_x2"
// 		{
// 			"operator" "math_float"
// 			"apply" "div"	
// 			"input1" "@elapsed_time_div.output_entry_elapsed"
// 			"input2" "@duration_div_x2.output"	
// 		}
// 		"time_mod_x2"
// 		{
// 			"operator" "math_float"
// 			"apply" "mod"	
// 			"input1" "@time_div_x2.output"
// 			"input2" "1"	
// 		}
// 		"time_step_x2"
// 		{
// 			"operator" "math_float"
// 			"apply" "sub"	
// 			"input1" "@time_div_x2.output"
// 			"input2" "@time_mod_x2.output"
// 		}
// 		"step_delta_x2"
// 		{
// 			"operator" "math_delta"
// 			"input" "@time_step_x2.output"	
// 		}
// 		"delta_trigger_x2"
// 		{
// 			"operator" "math_float"
// 			"apply" "greater_than"	
// 			"input1" "@step_delta_x2.output"
// 			"input2" "0.1"
// 		}
		
// 		"play_entry_x2"
// 		{
// 			"operator" "sys_start_entry"
// 			"input_start" "@delta_trigger_x2.output"
// 			"entry_name" "xray.beep"	
// 		}
// 	}

	"INS_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" "Weapons"
		}

		// 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"
		}

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



		// 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"  "300"
			"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"
		}
	}	

	"INS_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
			
		// 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_falloff" //REPLACE THIS WITH A MULTINODE REMAPPER WHEN THE TIME COMES <DONE> X = Distance / Y = Volume
		{
			"operator" "math_curve_2d_4knot"
			"curve_type" "linear"	
			"input" "@source_distance.output"
			"input_X1" "0.0"	//0 units
			"input_Y1" "1.0"	// full volume
			"input_X2" "30.0"	// 30 units (approx 0.59 meters)
			"input_Y2" "1.0"	// full volume
			"input_X3" "1000.0"	// 1000 units originally (approx 19.07 meters)
			"input_Y3" "0.1"	// volume 0.1
			"input_X4" "1100.0"	// 1100 units originally (approx 20.97 meters)
			"input_Y4" "0.0"	// inaudible
		}

		"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" "0.8"
			"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"  "75"
			"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"	
		}
	}

// ////////////////////////////////////////////////////////////////////////////////////////////
// //
// // MUSIC STACKS
// //
// ////////////////////////////////////////////////////////////////////////////////////////////
	"INS_update_music_stereo"
	{
		"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_convar"
		{
			"operator" "get_convar"
			"convar" "snd_musicvolume"
		}
		"dashboard"
		{
			"operator" "get_dashboard"
		}
		"convar_total"
		{
			"operator" "math_float"
			"apply" "mult"	
			"input1" "@snd_musicvolume_convar.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_entry_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_entry_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"
		}

	}	
	

// 	"update_music_spatial"
// 	{
// 		"save_restore_output"
// 		{
// 			"operator" "sys_output"
// 			"execute_once" "true"
// 			"input_float" "1.0"
// 			"output" "save_restore"
// 		}

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

// 		"elapsed_time"
// 		{
// 			"operator" "get_entry_time"
// 		}

// 		"position_array"
// 		{
// 			"operator" "util_pos_vec8"
				
// 			"input_entry_count" "1"
// 			"input_index" "0"	
// 			"input_position_0" "@source_info.output_position"

// 		}

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

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

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

// 		"snd_gain_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_gain"
// 		}
// 		"snd_op_test_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_op_test_convar"
// 		}
// 		"snd_musicvolume_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_musicvolume"
// 		}

// 		"dashboard"
// 		{
// 			"operator" "get_dashboard"
// 		}

// 		//////////////////////
// 		// 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_in"
// 		{
// 			"operator" "math_remap_float"
// 			"input" "@elapsed_time.output_entry_elapsed"
// 			"input_min" "0.0"
// 			"input_max" "0.0"
// 			"input_map_min" "0.0"
// 			"input_map_max" "@source_info.output_volume"
// 		}

// 		"volume_clamp_fade_in"
// 		{
// 			"operator" "math_float"
// 			"apply"	"min"
// 			"input1" "@volume_fade_in.output"
// 			"input2" "1.0"
// 		}
// 		"volume_fade_initial"
// 		{
// 			"input_execute" "0"
// 			"operator" "math_remap_float"
// 			"input" "@elapsed_time.output_entry_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_initial"
// 		{
// 			"operator" "math_float"
// 			"apply"	"sub"
// 			"input1" "1.0"
// 			"input2" "@volume_fade_initial.output"
// 		}
// 		"volume_apply_fade_initial"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@volume_invert_initial.output"
// 			"input2" "@volume_clamp_fade_in.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" "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_out"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@volume_apply_fade_initial.output"
// 			"input2" "@volume_invert_fadeout.output"
// 		}

// 		"volume_apply_falloff"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@volume_apply_fade_out.output"
// 			"input2" "@volume_falloff.output"
// 		}

// 		"volume_apply_mixer"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@mixer.output_volume"
// 			"input2" "@volume_apply_falloff.output"	
// 		}

// 		"volume_apply_snd_gain_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@snd_gain_convar.output"
// 			"input2" "@volume_apply_mixer.output"	
// 		}

// 		"volume_apply_musicvolume_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@snd_musicvolume_convar.output"
// 			"input2" "@volume_apply_snd_gain_convar.output"	
// 		}

// 		"volume_apply_occlusion"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@volume_apply_musicvolume_convar.output"
// 			"input2" "@occlusion.output"
// 		}

// 		"volume_apply_dashboard"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@volume_apply_occlusion.output"
// 			"input2" "@dashboard.output"
// 		}


// 		// set dsp just to be sure
// 		"dsp_output"
// 		{
// 			"operator" "sys_output"
// 			// "input_float" "@dsp_apply_distant.output"
// 			"input_float" "0"
// 			"output" "dsp"
// 		}

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

// 		// NOTE: uses player data, ie: SS, calculates all players and merges them
// 		"speakers_spatialize"
// 		{
// 			"operator" "calc_spatialize_speakers"
// 			"input_rear_stereo_scale" "1.0"	
// 			"input_radius"  "300"
// 			"input_distance"  "@source_distance.output"
// 			"input_position"   "@position_array.output_position"
// 		}
	
// 		"speakers_volume"
// 		{
// 			"operator"     "math_speakers"
// 			"apply"	       "mult"
// 			"input1"       "@speakers_spatialize.output"
// 			"input2[*]"	   "@volume_apply_dashboard.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_volume.output"
		
// 		}

// 		"speakers_multi_origin"
// 		{
// 			"operator"    "iterate_merge_speakers"

// 			"input_max_iterations" "@position_array.output_max_index"
//             "iterate_operator" "position_array"
// 			"input" "@speakers_limit.output"

// 		}
// 		// connecting output after operator has been created
// 		"position_array"
// 		{
// 			"input_index" "@speakers_multi_origin.output_index"	
// 		}

// 		"speakers_output"
// 		{
// 			"operator" "sys_output"
// 			"input_speakers" "@speakers_multi_origin.output"
// 			"output" "speakers"
// 		}

// 		// stop deletion until after fadeout
// 		"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"	
// 		}
// 	}	



// 	"update_music_spatial_stop_dist"
// 	{
// 		"import_stack" 	"update_music_spatial"

// 		"import_stack" 	"update_stop_at_distance"
// 		"usad_stop_dist"
// 		{
// 			"input1" "@source_distance.output"
// 			"input2" "1.0"  // distance beyond which to stop
// 		}
// 	}

// 	"update_music_spatial_looping_triggers"
// 	{
// 		"import_stack" 	"update_music_spatial"
// 		"import_stack" "update_looping_triggers"
// 	}

// 	"update_music_stereo_trigger"
// 	{
// 		"import_stack" 	"update_music_stereo"
// 		"import_stack" "update_music_div_trigger"
// 	}
	
// ////////////////////////////////////////////////////////////////////////////////////////////
// //
// // 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"  "300"
			"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"	
		}
	}	

	"INS_update_weapon"
	{

		////////////////////// Original 800 - 1800
		// "variables"
		"volume_xfade_start_dist"
		{
			"operator" "math_float"
			"apply" "add"
			"input1" "0.0"
			"input2" "1500"
		}	
		"volume_xfade_end_dist"
		{
			"operator" "math_float"
			"apply" "add"
			"input1" "0.0"
			"input2" "2500"
		}	




		//////////////////////
		// 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" "Weapons"
		}

		// 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_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"
			"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"  "300"
			"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"
		}
	}	
	
	


// ////////////////////////////////////////////////////////////////////////////////////////////
// //
// // DIALOG STACKS
// //
// ////////////////////////////////////////////////////////////////////////////////////////////

// 	"update_dialog"
// 	{

// 		///////////////////////
//         //  stopping previous lines
// 		"stop_entries"
// 		{
// 			"execute_once" "true"
// 			"operator" "sys_stop_entries"
// 			"match_channel" "true"
// 			"match_entity" "true"	
// 			"input_max_entries" "0" // doesn't include new one
// 		}

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

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

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

// 		////////////////////////
// 		// tell the mixer we're active
// 		"output_mixlayer_trigger"
// 		{
// 			"execute_once" "1"
// 			"operator" "sys_output"
// 			"input_float" "1"
// 			"output" "mixlayer_trigger"
// 		}

// 		/////////////////////
// 		// VOLUME
// 		"volume_apply_mixer"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@mixer.output_volume"
// 			"input2" "@source_info.output_volume"	
// 		}
// 		"volume_apply_snd_gain_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@snd_gain_convar.output"
// 			"input2" "@volume_apply_mixer.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_output"
// 		{
// 			"operator" "sys_output"
// 			"input_float" "@dsp_apply_mixer.output"
// 			"output" "dsp"
// 		}



// 		/////////////////////
// 		// SPEAKERS
// 		"snd_op_test_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_op_test_convar"
// 		}
// 		"snd_surround_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_surround_speakers"
// 		}
// 		"remap_surround_dialog"
// 		{
// 			"operator" "math_remap_float"
// 			"input" "@snd_surround_convar.output"
// 			"input_min" "2"
// 			"input_max" "5" //default 0.45
// 			"input_map_min" "0.0"
// //			"input_map_max" "@snd_op_test_convar.output"
// 			"input_map_max" "0.28"
// 			"default_to_max" "false"	
// 		}
// 		"snd_surround_dialog_invert"
// 		{
// 			"operator" "math_float"
// 			"apply"	"sub"
// 			"input1" "1.0"
// 			"input2" "@remap_surround_dialog.output"
// 		}
// 		"speakers_limit"
// 		{
// 			"operator"      "math_speakers"
// 			"apply"	       "mult"

// 			"input1[*]"	   "@snd_surround_dialog_invert.output"

// // 			"left_front"   "1.0"
// // 			"right_front"  "1.0"
// // 			"center"       "1.0"
// 			"lfe"          "0.0"	
// // 			"left_rear"    "1.0"
// // 			"right_rear"   "1.0"
			
// 			"input2[*]"	   "@volume_apply_snd_gain_convar.output"
// 		}

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

// 	"update_dialog_spatial"
// 	{

// 		///////////////////////
//         //  stopping previous lines
// 		"stop_entries"
// 		{
// 			"execute_once" "true"
// 			"operator" "sys_stop_entries"
// 			"match_channel" "true"
// 			"match_entity" "true"	
// 			"input_max_entries" "0" // doesn't include new one
// 		}

// 		//////////////////////
// 		// 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"
// 		}

// 		"occlusion"
// 		{
// 			"operator" "calc_occlusion"
// 			"input_position" "@source_info.output_position"
// //			"input_trace_interval" "0.05"
// //			"input_scalar" "0.7"
// 		}

// // 		"print_occlusion"
// // 		{
// // 			"operator" "util_print_float"
// // 			"input" "@occlusion.output"
// // 		}
// // 		// ramp distance to affect occlusion
// // 		"remap_distance_occlusion"
// // 		{
// // 			"operator" "math_remap_float"
// // 			"input" "@source_distance.output"
// // 			"input_min" "1000.0"
// // 			"input_max" "1500.0"
// // 			"input_map_min" "0.0"
// // 			"input_map_max" "1.0"
// // 			"default_to_max" "false"	
// // 		}
// // 		"distance_occlusion_invert"
// // 		{
// // 			"operator" "math_float"
// // 			"apply" "sub"	
// // 			"input1" "1.0"
// // 			"input2" "@remap_distance_occlusion"
// // 		}
// // 		"occlusion_invert"
// // 		{
// // 			"operator" "math_float"
// // 			"apply" "sub"	
// // 			"input1" "1.0"
// // 			"input2" "@occlusion.output"
// // 		}



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

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

// 		"snd_op_test_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_op_test_convar"
// 		}

// 		////////////////////////
// 		// tell the mixer we're active
// 		"output_mixlayer_trigger"
// 		{
// 			"execute_once" "1"
// 			"operator" "sys_output"
// 			"input_float" "1"
// 			"output" "mixlayer_trigger"
// 		}

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

// 		/////////////////////
// 		// VOLUME
// 		"volume_falloff"
// 		{
// 			"operator" "calc_falloff"
// 			"input_distance"  "@source_distance.output"
// 			"input_level"	  "@level_apply_mixer.output"
// 		}

			
// 		// NOTE: distance has precalculated minimum distance of the ss players			
// 		// ramp distance to affect occlusion
// // 		"remap_distance_falloff"
// // 		{
// // 			"operator" "math_remap_float"
// // 			"input" "@source_distance.output"
// // 			"input_min" "2500.0"
// // 			"input_max" "3000.0"
// // 			"input_map_min" "0.0"
// // 			"input_map_max" "1.0"
// // 			"default_to_max" "false"	
// // 		}
// // 		"remap_distance_falloff_invert"
// // 		{
// // 			"operator" "math_float"
// // 			"apply"	"sub"
// // 			"input1" "1"
// // 			"input2" "@remap_distance_falloff.output"
// // 		}
		
// 		"volume_apply_occlusion"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@source_info.output_volume"
// 			"input2" "@occlusion.output"
// //			"input2" "1"
// 		}
// 		"volume_apply_falloff"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@volume_apply_occlusion.output"
// 			"input2" "@volume_falloff.output"
// 		}
// // 		"volume_apply_distance_falloff"
// // 		{
// // 			"operator" "math_float"
// // 			"apply"	"mult"
// // 			"input1" "@volume_apply_falloff.output"
// // 			"input2" "@remap_distance_falloff_invert.output"
// // 		}
// 		"volume_apply_mixer"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@mixer.output_volume"
// 			"input2" "@volume_apply_falloff.output"	
// 		}
// // 		"volume_apply_distance_occlusion"
// // 		{
// // 			"operator" "math_float"
// // 			"apply" "mult"	
// // 			"input1" "@mixer.output_volume"
// // 			"input2" "@volume_apply_falloff.output"	
// // 		}
// 		"volume_apply_snd_gain_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@snd_gain_convar.output"
// 			"input2" "@volume_apply_mixer.output"	
// 		}
// 		"volume_apply_test_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "1.0"
// 			"input2" "@volume_apply_snd_gain_convar.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_distance"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@dsp_distantDSP.output"
// 			"input2" "@dsp_apply_mixer.output"	
// 		}
// 		"dsp_output"
// 		{
// 			"operator" "sys_output"
// 			"input_float" "@dsp_apply_distance.output"
// 			"output" "dsp"
// 		}

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

// 		// NOTE: uses player data, ie: SS, calculates all players and merges them
// 		"speakers_spatialize"
// 		{
// 			"operator" "calc_spatialize_speakers"
// 			"input_radius"  "300"
// 			"input_rear_stereo_scale" "1.0"
// 			"input_distance"  "@source_distance.output"
// 			"input_position"  "@source_info.output_position"
// 		}
	
// 		"speakers_apply_volume"
// 		{
// 			"operator"     "math_speakers"
// 			"apply"	       "mult"
// 			"input1"       "@speakers_spatialize.output"
// 			"input2[*]"	   "@volume_apply_test_convar.output"
// 		}

// 		"speakers_limit"
// 		{
// 			"operator"      "math_speakers"
// 			"apply"	       "max"

// 			"left_front"   "0.0"	
// 			"right_front"  "0.0"	
// 			"center"       "0.0"	
// 			"lfe"          "0.0"	
// 			"left_rear"    "0.0"
// 			"right_rear"   "0.0"	
			
// 			"input2"	   "@speakers_apply_volume.output"
// 		}

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

// ////////////////////////////////////////////////////////////////////////////////////////////
// //
// // SPECIALTY STACKS
// //
// ////////////////////////////////////////////////////////////////////////////////////////////

// 	"update_facing"
// 	{

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

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

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

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

// 		// NOTE: uses player data, ie: blended origin for SS players
// 		"facing"
// 		{
// 			"operator" "calc_angles_facing"
// 			// "input_angles" "@source_info.output_angles"
// 			"input_angles[0]" "0"
// 			"input_angles[1]" "0"
// 			"input_angles[2]" "0"
// 		}

// 		"facing_output"
// 		{
// 			"operator" "sys_output"
// 			"input_float" "@facing.output"
// 			"output" "facing"
// 		}
// 		"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"
// 			"input_distance"  "@source_distance.output"
// 			"input_level"	  "@level_apply_mixer.output"
// 		}
// 		"volume_apply_falloff"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@source_info.output_volume"
// 			"input2" "@volume_falloff.output"
// 		}

// 		"volume_apply_mixer"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@mixer.output_volume"
// 			"input2" "@volume_apply_falloff.output"	
// 		}
// 		"volume_apply_snd_gain_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@snd_gain_convar.output"
// 			"input2" "@volume_apply_mixer.output"	
// 		}
// 		"volume_apply_test_convar"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "1.0"
// 			"input2" "@volume_apply_snd_gain_convar.output"	
// 		}

// 		"volume_apply_facing"
// 		{
// 			"operator" "math_float"
// 			"apply" "mult"	
// 			"input1" "@facing.output"
// 			"input2" "@volume_apply_test_convar.output"	
// 		}

// 		"volume_apply_occlusion"
// 		{
// 			"operator" "math_float"
// 			"apply"	"mult"
// 			"input1" "@volume_apply_facing.output"
// 			"input2" "@occlusion.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" "speakers"
// 		}
// 		/////////////////////
// 		// SPEAKERS

// 		// NOTE: uses player data, ie: SS
//         // SS COULD BE SELF-CONTAINED? 
// 		"speakers_spatialize"
// 		{
// 			"operator" "calc_spatialize_speakers"
// 			"input_radius"  "300"
// 			"input_distance"  "@source_distance.output"
// 			"input_position"  "@source_info.output_position"
// 		}
	
// 		"speakers_volume"
// 		{
// 			"operator"     "math_speakers"
// 			"apply"	       "mult"
// 			"input1"       "@speakers_spatialize.output"
// 			"input2[*]"	   "@volume_apply_occlusion.output"
// 			// "input2[*]"	   "@facing.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_volume.output"
		
// 		}

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

}

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

// 	}
// 	"stop_default"
// 	{
// 		"snd_op_test_convar"
// 		{
// 			"operator" "get_convar"
// 			"convar" "snd_op_test_convar"
// 		}
// 	}

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


