SIMISA@@@@@@@@@@JINX0x1t______

Tr_SMS (

	Skip ( ** SL 5 sounds - Two looping audio streams, multiple waves - pitch shifted & Xfaded by current ** )
	Skip ( **             - One Horn audio stream				                                                  ** )
	Skip ( **             - One Sander audio stream				                                            ** )
	Skip ( **             - One Compressor audio stream				                                            ** )
	Skip ( **             - One TBrake audio stream				                                                ** )
	Skip ( **             - One Coupling audio stream				                                              ** )
	ScalabiltyGroup( 5
		Activation (			ExternalCam ()  PassengerCam	()			Distance    	(1000)		)
		Deactivation (		CabCam			()						Distance    	(1000)		)
		Volume(0.8)
		Streams ( 18
		Stream (
				Skip (**** Suonipartenza***************************************)
				Priority ( 6 )
				Triggers ( 4
				Variable_Trigger  ( Speed_Inc_Past 0.05 StartLoop   ( 1 File ( "x_Inizio partenza_2_fil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  0.05 ReleaseLoopRelease () )
			

				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		11025
						0.000		11025
					10.0		11025
					
					)
					Granularity ( 1 )		
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 5
						 -0.05		0.8
						 0			0.8
                                    1			0.8
						 10.0             0.8
						 100.0            0.8
					)
 					Granularity ( 0.05 )					
				)				
			)
		Stream (
				Skip (**** Suonipartenza***************************************)
				Priority ( 6 )
				Triggers ( 14
				Variable_Trigger  ( Speed_Inc_Past 0.5 StartLoop   ( 1 File ( "x_Inverter E464.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Inc_Past  8.333 ReleaseLoopRelease () )
				Variable_Trigger  ( Speed_Inc_Past 8.333 StartLoopRelease   ( 1 File ( "x_Inverter_sali_e_stai.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  8.333 ReleaseLoopRelease () )
				Variable_Trigger  ( Speed_Dec_Past 8.333 StartLoop   ( 1 File ( "x_Inverter E464.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  0.05 ReleaseLoopRelease () )
					Variable_Trigger (Speed_Inc_Past 15.0 SetStreamVolume ( 0.90 ) )
					Variable_Trigger (Speed_Inc_Past 20.0 SetStreamVolume ( 0.80 ) )
					Variable_Trigger (Speed_Inc_Past 25.0 SetStreamVolume ( 0.73 ) )
					Variable_Trigger (Speed_Inc_Past 30.0 SetStreamVolume ( 0.68 ) )
					Variable_Trigger (Speed_Dec_Past 30.0 SetStreamVolume ( 0.73 ) )
					Variable_Trigger (Speed_Dec_Past 25.0 SetStreamVolume ( 0.80 ) )
					Variable_Trigger (Speed_Dec_Past 20.0 SetStreamVolume ( 0.90 ) )
					Variable_Trigger (Speed_Dec_Past 15.0 SetStreamVolume ( 1.00 ) )
				
			

				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		44100
						0.000		44100
					10.0		44100
					
					)
					Granularity ( 1 )		
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 5
						 -0.05		0.05
						 0			0.20
                                    1			0.25
						 10.0             0.45
						 100.0            0.65
					)
 					Granularity ( 0.05 )					
				)				
			)

Stream (
				Priority ( 6 )
				Triggers ( 4
				Variable_Trigger  ( Speed_Inc_Past 0.5 StartLoop
						   ( 1 File ( "x_Elec2fil.wav" -1 )
						     SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Inc_Past  10.00 ReleaseLoopRelease () )

Variable_Trigger  ( Speed_Dec_Past 10.00 StartLoop   ( 1 File ( "x_Elec2fil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )							
Variable_Trigger ( Speed_Dec_Past  0.5 ReleaseLoopRelease () )
	
				)
	
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		44100
						0.000		11025
					10.0		44100
					
					)
					Granularity ( 1 )		
				)

				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 5
						 -0.05		0.05
						 0			0.08
                                    1			0.10
						 10.0             0.15
						 100.0            0.30
					)
 					Granularity ( 0.05 )					
				)				
			)
			Stream (
				Skip (**** Motorihigh***************************************)
				Priority ( 6 )
				Triggers ( 2
				Variable_Trigger  ( Speed_Inc_Past 10.0 StartLoop   
									( 1 File ( "x_Elec2highfil.wav" -1 )
									  SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  10.0 ReleaseLoopRelease () )
				
				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5	
						-64.000	44100
						-10.0		11025
						0.000		9000
						10.0		11025
						64.000	44100
					)
					Granularity ( 1 )		
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 5
						 -0.05		0.08
						 0			0.08
                                    1			0.16
						 10.0             0.20
						 100.0            0.40
					)
 					Granularity ( 0.05 )					
				)				
			)
			Stream (
				Skip (**** Motorilow frenatura dinamica ***************************************)
				Priority ( 6 )
				Triggers ( 8
					Initial_Trigger ( SetStreamVolume ( 0.00 ) )
					Variable_Trigger (Variable3_Inc_Past 0.10 SetStreamVolume ( 1.00 ) )

					Variable_Trigger (Variable3_Dec_Past 0.10 SetStreamVolume ( 0.00 ) )
					Variable_Trigger (Speed_Dec_Past 0.5 SetStreamVolume ( 0.00 ) )

				Variable_Trigger  ( Speed_Inc_Past 0.5 StartLoop   ( 1 File ( "x_Elec2fil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Inc_Past  10.0 ReleaseLoopRelease () )

Variable_Trigger  ( Speed_Dec_Past 10.00 StartLoop   ( 1 File ( "x_Elec2fil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )							
Variable_Trigger ( Speed_Dec_Past  0.5 ReleaseLoopRelease () )
	
				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		44100
						0.000		11025
					10.0		44100
					
					)
					Granularity ( 1 )		
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 6
						 0.0			0.0
                                    -5.0			0.00
						 -25.0            0.15
						 -50.0		0.30
						-75.0			0.45
						 -100.0            0.64
					)
 					Granularity ( 0.05 )					
				)				
			)
				Stream (
				Skip (**** Motorihigh frenatura dinamica***************************************)
				Priority ( 6 )
				Triggers ( 5
				Initial_Trigger ( SetStreamVolume ( 0.00 ) )
					Variable_Trigger (Variable3_Inc_Past 0.10 SetStreamVolume ( 1.00 ) )

					Variable_Trigger (Variable3_Dec_Past 0.10 SetStreamVolume ( 0.00 ) )

				Variable_Trigger  ( Speed_Inc_Past 10.0 StartLoop   ( 1 File ( "x_Elec2highfil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )

Variable_Trigger ( Speed_Dec_Past  10.0 ReleaseLoopRelease () )				
	
				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5	
-64.000	44100 						-10.0		11025
						0.000		9000
					10.0		11025
					64.000	44100
					)
					Granularity ( 1 )		
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 6
						 0.0			0.0
                                    -5.0			0.00
						 -25.0            0.15
						 -50.0		0.30
						-75.0			0.45
						 -100.0            0.64
					)
 					Granularity ( 0.05 )					
				)				
			)

Stream (
				Priority ( 6 )
				Triggers ( 2
					Variable_Trigger ( Speed_Inc_Past  0.1	StartLoop ( 1
										File ( "x_roll_ita.wav" -1 )
										SelectionMethod ( RandomSelection ) ) )
					Variable_Trigger ( Speed_Dec_Past  0.1	ReleaseLoopRelease () )					
				)
				VolumeCurve ( 
					SpeedControlled
					CurvePoints ( 6
						 0.0		0.0
						 0.1		0.7
					       1.0		1.0
					       6.0		1.0
						10.0		1.0
					      50.0		1.0
					)
					Granularity ( 0.01 )
				)			
				FrequencyCurve ( 
					SpeedControlled
					CurvePoints ( 5
					     -50.0		13000
						-0.1		11025
						 0.0		 9000
						 0.1		11025
						50.0		13000
					)
					Granularity ( 25 )
				)
			)
			

			Stream (
				Skip ( **** Brake Squeal **** )				
				Priority ( 6 )			
				Triggers ( 9
					Discrete_Trigger (  14  DisableTrigger ( 4 ))
					Discrete_Trigger (  14  DisableTrigger ( 6 ))
					Discrete_Trigger (  14	StartLoopRelease ( 1	File ( "x_squeal.wav" -1 )
								SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  54	ReleaseLoopReleasewithJump () )
					Variable_Trigger ( Speed_Dec_Past 0.02	ReleaseLoopReleasewithJump ()	)
					Discrete_Trigger (  54	ReleaseLoopRelease () )
					Discrete_Trigger (  14  Delay_Min_Max ( 1.0 1.0 ) EnableTrigger ( 4 ))				
					Discrete_Trigger (  14  Delay_Min_Max ( 1.0 1.0 ) EnableTrigger ( 6 ))
					Variable_Trigger ( Speed_Inc_Past 0.5  ReleaseLoopReleasewithJump ()  )				

				)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5
						  -3.0		11000
						   -1.0		11400
						   0.0		12000
						1.0			11400
						   3.0		11000
						)
					Granularity ( 100 )
				)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 11
						  -50.0		0.0
						  -3.1		0.0
						  -3.0		0.67
						  -1.0		0.8
						  -0.05		1.0
						   0.0		0.0
						   0.05		1.0
						   1.0		0.8
						   3.0		0.67
						   3.1		0.0
						 50.0			0.0
					)
					Granularity ( 0.05 )
				)				
			)
			Stream (
				Skip ( **** Brake Squeal **** )				
				Priority ( 6 )			
				Triggers ( 11
					Discrete_Trigger (  14  DisableTrigger ( 6 ))
					Discrete_Trigger (  14  DisableTrigger ( 8 ))
					Discrete_Trigger (  14  SetStreamVolume ( 1.0 ))
					Discrete_Trigger (  14 EnableTrigger ( 5 ))
					Variable_Trigger (  Speed_Dec_Past 2.5 PlayOneShot ( 1	File ( "x_frenata1.wav" -1 )
								SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  54	SetStreamVolume ( 0.0 ) )
					Variable_Trigger ( Speed_Dec_Past 0.02	SetStreamVolume ( 0.0 )	)
					Discrete_Trigger (  54	SetStreamVolume  ( 0.0 ) )
					Discrete_Trigger (  14  Delay_Min_Max ( 1.0 1.0 ) EnableTrigger ( 6 ))				
					Discrete_Trigger (  14  Delay_Min_Max ( 1.0 1.0 ) EnableTrigger ( 8 ))
					Variable_Trigger ( Speed_Inc_Past 0.5  SetStreamVolume ( 0.0 )  )				

				)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5
						  -3.0		11000
						   -1.0		11400
						   0.0		12000
						1.0			11400
						   3.0		11000
						)
					Granularity ( 100 )
				)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 11
						  -50.0		0.0
						  -3.1		0.0
						  -3.0		0.9
						  -1.0		0.9
						  -0.05		1.0
						   0.0		0.0
						   0.05		1.0
						   1.0		0.9
						   3.0		0.9
						   3.1		0.0
						 50.0			0.0
					)
					Granularity ( 0.05 )
				)				
			)

			Stream (
				Skip ( **** This stream starts and stops pantograph and presses converters start **** )
				Priority ( 6 )
				Triggers ( 4
					Discrete_Trigger ( 45 PlayOneShot ( 1
							File ( "x_Pantosu.wav" -1 )
							SelectionMethod (SequentialSelection)))
					Discrete_Trigger ( 46 PlayOneShot ( 1	
							File ( "x_Giupanto.wav" -1 )
							SelectionMethod (SequentialSelection)))
					Discrete_Trigger ( 66 PlayOneShot ( 1
							File ( "x_Pantosu.wav" -1 )
							SelectionMethod (SequentialSelection)))
					Discrete_Trigger ( 67 PlayOneShot ( 1	
							File ( "x_Giupanto.wav" -1 )
							SelectionMethod (SequentialSelection)))
							)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						  -100.0		11025
						   0.0		11025
						   100.0		11025
						)
					Granularity ( 100 )
				)

					)
			Stream (
			  Skip ( *** Algoritmo compressore per gentile concessione di David Vasica *** )
			  Skip ( **** Kompresor	**** )
			  Skip ( **** Rozbehne se po odbrzdeni pri stani nebo po odbrzdeni a naslednem zastaveni 	**** )
			  Skip ( **** Rozbeh po odbrzdeni za jizdy neni umoznen, protoze napr. po 5 odbrzdenich 	**** )
      		  Skip ( **** tesne po sobe by pak bezel 5krat, coz neni zrovna idealni **** )
				Priority ( 6 )
				Volume (0.4)
				Triggers ( 30
			  Skip ( Spusteni odbrzdenim nebo odbrzdenim a naslednym zastavenim )
					
					Discrete_Trigger ( 53  	PlayOneShot ( 1 File ( "x_Compressore_E402.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger ( 54  	PlayOneShot ( 1 File ( "x_Compressore_E402.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
					Variable_Trigger ( Speed_Dec_Past 0.1 PlayOneShot ( 1 File ( "x_Compressore_E402.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )

			  Skip ( Znemozneni vicenasobneho spousteni [to by potom bezel jeste nekolikrat pri jizde] )

					Discrete_Trigger ( 53  	DisableTrigger( 1 ) )
					Discrete_Trigger ( 54  	DisableTrigger( 2 ) )

					Discrete_Trigger ( 53  	DisableTrigger( 3 ) )
					Discrete_Trigger ( 54  	DisableTrigger( 3 ) )
					Variable_Trigger ( Speed_Dec_Past 0.1 DisableTrigger( 3 ) )

			  Skip ( Povoleni/znemozneni spusteni pri zastaveni/po rozjeti [aby pri kazdem odbrzdeni za jizdy nebezel]	)

					Variable_Trigger ( Speed_Dec_Past 0.1 EnableTrigger( 1 ) )
					Variable_Trigger ( Speed_Dec_Past 0.1 EnableTrigger( 2 ) )

					Variable_Trigger ( Speed_Inc_Past 0.1 DisableTrigger( 1 ) )
					Variable_Trigger ( Speed_Inc_Past 0.1 DisableTrigger( 2 ) )
					Variable_Trigger ( Speed_Inc_Past 0.1 DisableTrigger( 3 ) )

			  Skip ( Povoleni spusteni po odbrzdeni a naslednem zastaveni [navazuje na predchozi trigger] )

					Discrete_Trigger ( 53  	EnableTrigger( 3 ) )
					Discrete_Trigger ( 54  	EnableTrigger( 3 ) )

			  Skip ( Povoleni/znemozneni spusteni pri zvednuti/spusteni sberace )

					Discrete_Trigger ( 45  	EnableTrigger( 1 ) )
					Discrete_Trigger ( 45  	EnableTrigger( 2 ) )
					Discrete_Trigger ( 45  	EnableTrigger( 3 ) )
					Discrete_Trigger ( 45  	EnableTrigger( 9 ) )
					Discrete_Trigger ( 45  	EnableTrigger( 10 ) )
					Discrete_Trigger ( 45  	EnableTrigger( 14 ) )
					Discrete_Trigger ( 45  	EnableTrigger( 15 ) )

					Discrete_Trigger ( 46  	DisableTrigger( 1 ) )
					Discrete_Trigger ( 46  	DisableTrigger( 2 ) )
					Discrete_Trigger ( 46  	DisableTrigger( 3 ) )
					Discrete_Trigger ( 46  	DisableTrigger( 9 ) )
					Discrete_Trigger ( 46  	DisableTrigger( 10 ) )
					Discrete_Trigger ( 46  	DisableTrigger( 14 ) )
					Discrete_Trigger ( 46  	DisableTrigger( 15 ) )

					Discrete_Trigger ( 14   DisableTrigger( 3 ) )
				)
			)	




			Stream (
				Skip ( **** This stream starts and stops converters with V command **** )
				Priority ( 6 )
				Triggers ( 5
					Initial_Trigger ( Disable_Trigger ( 4 ) )
					Discrete_Trigger ( 45 Enable_Trigger ( 4 ) )
					Discrete_Trigger ( 6 StartLoopRelease ( 1	
							File ( "x_LoopGS.wav" -1 )
							SelectionMethod (SequentialSelection)))
					Discrete_Trigger ( 7 ReleaseLoopReleaseWithJump ()	)
					Discrete_Trigger ( 46 ReleaseLoopReleaseWithJump ()	)
							)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						  -100.0		11025
						   0.0		11025
						   100.0		11025
						)
					Granularity ( 100 )
				)
					VolumeCurve(
					SpeedControlled
					CurvePoints ( 3
						-100.0	1.9
					 	  0.0		1.9
						100.0		1.9
					)
					Granularity ( 0.05 )
				)	

					)
			
						 
			Stream (
				Skip ( **** This stream allows the horn to be played at the same time  	**** )
				Priority ( 6 )
				Triggers ( 9
					Initial_Trigger ( DisableTrigger ( 8 ) )
					Variable_Trigger ( Speed_Inc_Past 20.0 DisableTrigger ( 6 ) )			
					Variable_Trigger ( Speed_Inc_Past 20.0 EnableTrigger ( 8 ) )
					Variable_Trigger ( Speed_Dec_Past 20.0 DisableTrigger ( 8 ) )			
					Variable_Trigger ( Speed_Dec_Past 20.0 EnableTrigger ( 6 ) )
					Discrete_Trigger ( 8	StartLoopRelease ( 1	File ( "x_Trcentro.wav" -1 )	SelectionMethod ( RandomSelection )	)	)
Discrete_Trigger ( 9	ReleaseLoopReleaseWithJump ()	) 				
					Discrete_Trigger ( 8	StartLoopRelease ( 1	File ( "x_E646_trombaincorsa.wav" -1 )	SelectionMethod ( RandomSelection )	)	)
Discrete_Trigger ( 9	ReleaseLoopReleaseWithJump ()	) 				)
	
			)
			Stream (
				Skip ( **** This stream allows the horn to be played at the same time  	**** )
				Priority ( 6 )
				Triggers ( 2
					Discrete_Trigger ( 10	StartLoopRelease ( 1	
													File ( "x_ficentro_chpitch.wav" -1 )	
													SelectionMethod ( SequentialSelection ) 
												)
								)

					Discrete_Trigger ( 11 	ReleaseLoopReleaseWithJump ()	)
				)
			)
			Stream (
				Skip ( **** This stream allows the Sander to be played at the same time  	**** )
				Priority ( 5 )			
				Triggers ( 2				
					Discrete_Trigger (  4	StartLoopRelease ( 1	File ( "..\\..\\HHP\\SOUND\\x_hhp_sand.wav" -1 )	SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  5	ReleaseLoopRelease () )	
				)
			)
			Stream (
				Volume (0.70)
				Skip ( **** This stream allows the Train Brake to be played at the same time  	**** )
				Priority ( 5 )
				Triggers ( 1				
					Skip ( **** Brake Normal Apply	**** )
					Discrete_Trigger (  14	
						PlayOneShot ( 1	
							File ( "x_Scarica freno.wav" -1 )	
							SelectionMethod ( RandomSelection ) 
								)
								)

				) 
			
			)
			Stream (
				Priority ( 6 )
				Volume ( 0.5 )
				Triggers ( 6
					Discrete_Trigger ( 58 PlayOneShot ( 1 	File ( "x_couple_chain1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 59 PlayOneShot ( 1 	File ( "x_couple_chain2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 60 PlayOneShot ( 1 	File ( "x_couple_chain3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 61 PlayOneShot ( 1 	File ( "x_uncouple_chain1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 62 PlayOneShot ( 1 	File ( "x_uncouple_chain2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 63 PlayOneShot ( 1 	File ( "x_uncouple_chain3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
				)
			)
Stream (
				Skip (**** Vento***************************************)
				Priority ( 6 )
				Volume ( 1.0 )
				Triggers ( 2
				Variable_Trigger  ( Speed_Inc_Past 8.0 StartLoop   ( 1 File ( "x_whoosh.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  8.0 ReleaseLoopRelease () )
				

				)
				FrequencyCurve (
					SpeedControlled
					CurvePoints ( 5
						-60.0		13000
						-8.0		11025
						0.0		11025
						8.0		11025
						60.0		13000
						)
					Granularity ( 10 )
							)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 9 
						 -60.0		1.0 
						-15.0			0.53
						 -8.0			0.2
						-6.0			0.0
                                    0			0.0
						6.0			0.0
                                       8.0             0.2
                                    15.0			0.53
						60.0            1.0
					)
					Granularity ( 0.1 )					
				)				
			)

		)
	)


	Skip( **** ******************************************* **** )
	Skip( **** Copy of Generic Electric SMS Used for SL 0  **** )
	Skip( **** ******************************************* **** )

	ScalabiltyGroup( 0
		Activation (	ExternalCam ()	CabCam() PassengerCam	() Distance    	(500)	)
		Deactivation (				Distance    	(500)	)
		Streams ( 9
		Stream (
				Skip (**** Ventilatori***************************************)
				Volume ( 1.0 )
				Priority ( 6 )
				Triggers ( 2
				Variable_Trigger  ( Speed_Inc_Past 0.05 StartLoopRelease   ( 1 File ( "x_ventilatori.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  0.05 ReleaseLoopReleaseWithJump () )
			

				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		11025
						0.000		11025
					10.0		11025
					
					)
					Granularity ( 1 )		
				)
			)

		Stream (
				Skip (**** Suonipartenza***************************************)
				Volume ( 0.8 )
				Priority ( 6 )
				Triggers ( 2
				Variable_Trigger  ( Speed_Inc_Past 0.05 StartLoop   ( 1 File ( "x_Inizio partenza_2_fil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  0.05 ReleaseLoopRelease () )
			

				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		11025
						0.000		11025
					10.0		11025
					
					)
					Granularity ( 1 )		
				)
			)
		Stream (
				Skip (**** Suonipartenza***************************************)
				Volume ( 0.8 )
				Priority ( 6 )
				Triggers ( 6
				Variable_Trigger  ( Speed_Inc_Past 0.5 StartLoop   ( 1 File ( "x_Inverter E464.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Inc_Past  8.333 ReleaseLoopRelease () )
				Variable_Trigger  ( Speed_Inc_Past 8.333 StartLoopRelease   ( 1 File ( "x_Inverter_sali_e_stai.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  8.333 ReleaseLoopRelease () )
				Variable_Trigger  ( Speed_Dec_Past 8.333 StartLoop   ( 1 File ( "x_Inverter E464.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  0.05 ReleaseLoopRelease () )
			

				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		44100
						0.000		44100
					10.0		44100
					
					)
					Granularity ( 1 )		
				)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 5
						 -30.0		0.55
						 -10.0		1.0
						   0.0		1.0
						  10.0		1.0
						  30.0		0.55
					)
 					Granularity ( 0.05 )					
				)				

			)


			Stream (
				Priority ( 4 )
				Triggers ( 4
						Variable_Trigger  ( Speed_Inc_Past 0.5 StartLoop   ( 
								1 File ( "x_Elec2fil.wav" -1 )
							      SelectionMethod ( SequentialSelection ) ) )
						Variable_Trigger ( Speed_Inc_Past  10.0 ReleaseLoopRelease () )

Variable_Trigger  ( Speed_Dec_Past 10.0 StartLoop   ( 1 File ( "x_Elec2fil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )							
Variable_Trigger ( Speed_Dec_Past  0.5 ReleaseLoopRelease () )
	
				)
	
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 3
						
						-10.0		44100
						0.000		11025
					10.0		44100
					
					)
					Granularity ( 1 )
)

				VolumeCurve(
					SpeedControlled
					CurvePoints ( 3
						 -100.0		0.2
						 0			0.2
                                    100.0            0.2
					)
 					Granularity ( 0.05 )					
				)				
			)
			Stream (
			Skip (****Motorihigh***************************************)
				Priority ( 4 )
				Triggers ( 2
				Variable_Trigger  ( Speed_Inc_Past 10.0 StartLoop   ( 1 File ( "x_Elec2highfil.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )

Variable_Trigger ( Speed_Dec_Past  10.0 ReleaseLoopRelease () )
				
	
				)
				
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5	
-64.000	44100
						-10.0		11025
						0.000		9000
					10.0		11025
					64.000	44100
					)
					Granularity ( 1 )
)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 3
						 -100.0		0.2
						 0			0.2
                                    100.0            0.20

					)
 					Granularity ( 0.05 )					
				)				
			)
	
	Stream (
Priority ( 7 )
Triggers ( 1
Variable_Trigger ( Distance_Dec_Past 70 PlayOneShot ( 3
File ("x_trcentro_loud_long.wav" -1 )
File ("x_silence_short.wav" -1 )
File ("x_trcentro_loud.wav" -1 )
SelectionMethod ( RandomSelection ) ) )
)
VolumeCurve(
SpeedControlled
CurvePoints ( 5
-100.0 1.0
-2.0 1.0

0 0.0
2.0 1.0
100.0 1.0
)
Granularity ( 0.1 )
)
)
Stream (
	Priority ( 7 )
	Triggers ( 3
				Variable_Trigger ( Speed_Dec_Past  2.50  StartLoopRelease ( 1	File ( "x_squeal.wav" -1 )
								SelectionMethod ( SequentialSelection ) ) )
					Variable_Trigger ( Speed_Dec_Past 0.1	ReleaseLoopRelease ()	)
					Variable_Trigger ( Speed_Inc_Past 0.5  ReleaseLoopRelease ()  )				
				)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5
						  -3.0		11000
						   -1.0		11400
						   0.0		12000
						1.0			11400
						   3.0		11000
						)
					Granularity ( 100 )
				)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 11
						  -50.0		0.0
						  -3.1		0.0
						  -3.0		1.0
						  -1.0		1.0
						  -0.05		1.0
						   0.0		0.0
						   0.05		1.0
						   1.0		1.0
						   3.0		1.0
						   3.1		0.0
						 50.0			0.0
					)
					Granularity ( 0.05 )
				)				
			)


Stream (
				Skip (**** Vento***************************************)
				Priority ( 6 )
				Volume ( 1.0 )
				Triggers ( 2
				Variable_Trigger  ( Speed_Inc_Past 8.0 StartLoop   ( 1 File ( "x_whoosh.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
				Variable_Trigger ( Speed_Dec_Past  8.0 ReleaseLoopRelease () )
				

				)
				FrequencyCurve (
					SpeedControlled
					CurvePoints ( 5
						-60.0		13000
						-8.0		11025
						0.0		11025
						8.0		11025
						60.0		13000
						)
					Granularity ( 10 )
							)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 9 
						 -60.0		1.0 
						-15.0			0.53
						 -8.0			0.2
						-6.0			0.0
                                    0			0.0
						6.0			0.0
                                       8.0             0.2
                                    15.0			0.53
						60.0            1.0
					)
					Granularity ( 0.1 )					
				)				
			)
	
			Stream (
				
				Skip(********************Suoni da fermo********************************)
				Priority ( 4 )
				Triggers ( 1
					Initial_Trigger (StartLoop   ( 1 File ( "x_Circuiti di trazione E464.wav" -1 )
					   SelectionMethod ( SequentialSelection ) ))
						)
					VolumeCurve(
					SpeedControlled
					CurvePoints ( 3
					 	  0.0		0.80
						 10.0		0.80
						100.0		0.80
					)
					Granularity ( 0.05 )
				)				
			)
		)
	)
)


