<!-- R22 sound config-->
<PropertyList>
    <fx>
	
<!-- 
<crank>
      <name>engstart1</name>
      <path>Sounds/engstart.wav</path>
      <property>/engines/engine/cranking</property>
      <volume>
        <offset>0.4</offset>
      </volume>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </crank>

    <crank>
      <name>crank</name>
      <mode>looped</mode>
      <path>Sounds/cranking.wav</path>
      <condition>
        <property>/engines/engine/cranking</property>
        <not>
          <property>/engines/engine/running</property>
        </not>
      </condition>
      <volume>
        <offset>0.5</offset>
      </volume>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </crank>

    <crank>
      <name>cough</name>
      <path>Sounds/coughing.wav</path>
      <property>/engines/engine/running</property>
      <volume>
        <offset>0.3</offset>
      </volume>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </crank>



    <engine>
      <name>engine</name>
      <mode>looped</mode>
      <path>Sounds/wasp.wav</path>
      <property>/engines/engine/running</property>
      <volume>
        <property>/engines/engine/mp-osi</property>
        <factor>0.0375</factor>
        <min>0.15</min>
        <max>2.5</max>
      </volume>
      <volume>
        <property>/sim/current-view/internal</property>
        <offset>0.5</offset>
        <factor>-0.35</factor>
      </volume>
      <pitch>
        <property>/engines/engine/rpm</property>
        <factor>0.0004</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.15</offset>
      </pitch>
      <position>
        <x> 2.0 </x>
        <y> 0.0 </y>
        <z> 0.1 </z>
      </position>
      <orientation>
        <x> 0 </x>
        <y> 1 </y>
        <z> 0 </z>
        <inner-angle>  50.0 </inner-angle>
        <outer-angle> 180.0 </outer-angle>
        <outer-gain>    0.5 </outer-gain>
      </orientation>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </engine>

var throttin =  getprop("controls/engines/engine[0]/throttle"); 
	var kias = getprop("velocities/airspeed-kt");
	var mag = getprop("controls/engines/engine[0]/magnetos");

<property>/engines/engine/running</property>
        <type>avionics</type>
          
	    <path>Sounds/wasp.wav</path>
	    <path>Aircraft/M-XE/Sounds/eng_run_fast.wav</path>
	     <path>Aircraft/M-XE/Sounds/eng_run_fast.wav</path>
-->
    

    <engine2>
      <name>engineloop2</name>
      <mode>looped</mode>
   <path>Sounds/wasp.wav</path>
      
         <condition>
		<greater-than>
		<property>controls/engines/engine[0]/magnetos</property>
		<value>0</value>
		</greater-than>
            </condition>
	    
      <volume>
                <factor>0.7</factor>
            </volume>
      <pitch>
        <property>/controls/rotors/engine-throttle</property>
        <factor>1.5</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.15</offset>
      </pitch>
      <position>
        <x> 2.0 </x>
        <y> 0.0 </y>
        <z> 0.1 </z>
      </position>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </engine2>
    
    
  <engine>
            <name>engstart</name>
            <mode>once</mode>
            <path>Aircraft/M-XE/Sounds/eng_start.wav</path>
            <condition>
	    
            <and>    
	    
		<greater-than>
		<property>controls/engines/engine[0]/magnetos</property>
		<value>0</value>
		</greater-than>
		
		<not>
		<property>sim/crashed</property>
		</not>
		
	</and>	
	
            </condition>
            <max-dist>4</max-dist>
            <reference-dist>2</reference-dist>
            <volume>
                <factor>1</factor>
            </volume>
            <position>
                <x>-0.7</x>
                <y>0</y>
                <z>-0.1</z>
            </position>
        </engine>
	
	
  <engine>
            <name>engstop</name>
            <mode>once</mode>
            <path>Aircraft/M-XE/Sounds/eng_stop.wav</path>
            <condition>
	    
            <and>    
	    
		<less-than>
		<property>controls/engines/engine[0]/magnetos</property>
		<value>1</value>
		</less-than>
	
		<greater-than>
		<property>rotors/main/rpm</property>
		<value>50</value>
		</greater-than>

		<not>
		<property>sim/crashed</property>
		</not>
		
	</and>	
	
            </condition>
            <max-dist>4</max-dist>
            <reference-dist>2</reference-dist>
            <volume>
                <factor>1</factor>
            </volume>
            <position>
                   <x>-0.7</x>
                <y>0</y>
                <z>-0.1</z>
            </position>
        </engine>

<!--
   Aircraft/M-XE/Sounds/eng_run_fast.wav
   Aircraft/M-XE/Sounds/eng_run_slow.wav
-->

<!--
      <engineloop>
            <name>engloop</name>
            <mode>loop</mode>
            <path>Aircraft/M-XE/Sounds/eng_run_fast.wav</path>
            <condition>
	    
            <and>    
	    
		<greater-than>
		<property>controls/engines/engine[0]/magnetos</property>
		<value>0</value>
		</greater-than>
		
		<greater-than>
		<property>/controls/rotors/engine-throttle</property>
		<value>0.100001</value>
		</greater-than>
		
		
	</and>	
	
            </condition>
	    
	<reference-dist>100</reference-dist>
	<max-dist>1000</max-dist>
            <volume>
                <factor>2</factor>
            </volume>
	    
	<pitch>
		<property>/controls/rotors/engine-throttle</property>
		<factor>1</factor>
	</pitch>
      
            <position>
                  <x>-0.7</x>
                <y>0</y>
                <z>-0.1</z>
            </position>
        </engineloop>
	
	
      <engineloop>
            <name>engloop</name>
            <mode>loop</mode>
            <path>Aircraft/M-XE/Sounds/eng_run_slow.wav</path>
            <condition>
	    
            <and>    
	    
		<greater-than>
		<property>controls/engines/engine[0]/magnetos</property>
		<value>0</value>
		</greater-than>
		
		<less-than>
		<property>/controls/rotors/engine-throttle</property>
		<value>0.1</value>
		</less-than>
		
		
	</and>	
	
            </condition>
	    
	<reference-dist>100</reference-dist>
	<max-dist>1000</max-dist>
            <volume>
                <factor>2</factor>
            </volume>
	    
	<pitch>
		<property>/controls/rotors/engine-throttle</property>
		<factor>1</factor>
	</pitch>
      
            <position>
                  <x>-0.7</x>
                <y>0</y>
                <z>-0.1</z>
            </position>
        </engineloop>
    
      <path>Sounds/wasp.wav</path>
      <path>Aircraft/M-XE/Sounds/eng_run_fast.wav</path>
    -->
    
    

    

    <wind>
      <name>wind</name>
      <mode>looped</mode>
      <path>Sounds/wind.wav</path>
      <property>/velocities/airspeed-kt</property>
      <volume>
        <property>/position/altitude-ft</property>
        <factor>-0.000015</factor>
        <offset>1.0</offset>
        <min>0.1</min>
        <max>1.0</max>
      </volume>
      <volume>
        <property>/velocities/airspeed-kt</property>
        <factor>0.0015</factor>
        <min>0.03</min>
        <max>0.5</max>
      </volume>
      <pitch>
        <property>/velocities/airspeed-kt</property>
        <factor>0.0035</factor>
        <offset>1.25</offset>
      </pitch>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </wind>


 
    <!-- rotor -->
    <rotor>
      <name>rotor</name>
      <mode>looped</mode>
      <path>Sounds/rotor.wav</path> 
      <condition>
        <and>
          <greater-than>
            <property>rotors/main/rpm</property>
            <value>50</value>
          </greater-than>
          <not>
            <property>sim/crashed</property>
          </not>
        </and>
      </condition>
      <volume>
        <property>rotors/main/rpm</property>
        <factor>0.0152</factor>
        <max>0.5</max>
      </volume>
      <pitch>
        <property>rotors/main/rpm</property>
        <factor>0.00142</factor>
        <offset>0</offset>
        <max>1.5</max>
      </pitch>
      <position>
        <x> -0.4 </x>
        <y>  0.0 </y>
        <z>  1.1</z>
      </position>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </rotor>

    <rotor>
      <name>stall</name>
      <mode>looped</mode>
      <path>Sounds/rotor_stall.wav</path>
      <condition>
        <and>
          <greater-than>
            <property>rotors/main/rpm</property>
            <value>50</value>
          </greater-than>
          <not>
            <property>sim/crashed</property>
          </not>
        </and>
      </condition>
      <volume>
        <property>/rotors/main/stall</property>
        <factor>350</factor>
        <max>1.0</max>
      </volume>
      <pitch>
        <property>rotors/main/rpm</property>
        <factor>0.0014</factor>
        <offset>0</offset>
        <max>1.75</max>
      </pitch>
      <position>
        <x> -0.35 </x>
        <y>  0.0 </y>
        <z>  1.1</z>
      </position>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </rotor>
<!--
 <rotor>
      <name>stall</name>
      <mode>looped</mode>
      <path>Sounds/rotor_stall.wav</path>
      <condition>
        <and>
          <greater-than>
            <property>rotors/main/rpm</property>
            <value>50</value>
          </greater-than>
          <not>
            <property>sim/crashed</property>
          </not>
        </and>
      </condition>
      <volume>
        <property>rotors/main/stall-filtered</property>
        <factor>350</factor>
        <max>1.0</max>
      </volume>
      <pitch>
        <property>rotors/main/rpm</property>
        <factor>0.001131</factor>
        <offset>0</offset>
        <max>1.75</max>
      </pitch>
      <position>
        <x> -1.7 </x>
        <y>  0.0 </y>
        <z>  1.1 </z>
      </position>
      <reference-dist>100</reference-dist>
      <max-dist>1000</max-dist>
    </rotor>
-->
    
        <contact>
            <name>ground contact</name>
            <mode>once</mode>
            <path>Sounds/helicopter-skid.wav</path>
            <condition>
                <or>
                    <property>gear/gear[0]/wow</property>
                    <property>gear/gear[1]/wow</property>
                    <property>gear/gear[2]/wow</property>
                    <property>gear/gear[3]/wow</property>
                </or>
            </condition>
            <max-dist>10</max-dist>
            <reference-dist>5</reference-dist>
            <volume>
                <factor>0.8</factor>
            </volume>
            <pitch>
                <factor>0.01</factor>
            </pitch>
            <max-dist>5.0</max-dist>
            <max-dist>10.0</max-dist>
            <position>
                <x>0</x>
                <y>0</y>
                <z>-2</z>
            </position>
        </contact>

        <wind>
            <name>wind</name>
            <mode>looped</mode>
            <path>Sounds/wind.wav</path>
            <condition>
                <and>
                    <property>velocities/airspeed-kt</property>
                    <not>
                        <property>sim/crashed</property>
                    </not>
                </and>
            </condition>
            <max-dist>5</max-dist>
            <reference-dist>2</reference-dist>
            <volume>
                <property>/sim/model/sound/volume1</property>
            </volume>
            <volume>
                <property>position/altitude-ft</property>
                <factor>-0.000015</factor>
                <offset>1.0</offset>
                <min>0.1</min>
                <max>1.0</max>
            </volume>
            <volume>
                <property>velocities/airspeed-kt</property>
                <factor>0.0015</factor>
                <min>0.03</min>
                <max>0.25</max>
            </volume>
            <pitch>
                <property>velocities/airspeed-kt</property>
                <factor>0.01</factor>
                <offset>1.0</offset>
            </pitch>
            <max-dist>10.0</max-dist>
            <position>
                <x>-2.1</x>
                <y>1.5</y>
                <z>-1.05</z>
            </position>
        </wind>

        <crash>
            <name>intense ground contact</name>
            <mode>once</mode>
            <path>Sounds/crash.wav</path>
            <property>sim/crashed</property>
            <max-dist>50</max-dist>
            <reference-dist>20</reference-dist>
            <volume>
                <factor>1</factor>
            </volume>
            <pitch>
                <factor>0.1</factor>
            </pitch>
            <position>
                <x>0</x>
                <y>0</y>
                <z>-1.5</z>
            </position>
        </crash>
<!-- 
overspeed.wav
-->
        <alert>
            <name>rpm warning</name>
            <type>avionics</type>
            <mode>once</mode>
            <path>Sounds/beep.wav</path>
            <condition>
                <less-than>
                    <property>rotors/main/rpm</property>
                    <value>500</value>
                </less-than>
            </condition>
            <max-dist>4</max-dist>
            <reference-dist>2</reference-dist>
            <volume>
                <factor>1</factor>
            </volume>
            <position>
                <x>0</x>
                <y>0</y>
                <z>-1.5</z>
            </position>
        </alert>
<!--
        <click>
            <name>switches on</name>
            <type>avionics</type>
            <mode>once</mode>
            <path>Sounds/click.wav</path>
            <condition>
                <property>sim/sound/click</property>
            </condition>
            <max-dist>2</max-dist>
            <reference-dist>1</reference-dist>
            <volume>
                <property>sim/sound/volume1</property>
            </volume>
            <position>
                <x>1.5</x>
                <y>0</y>
                <z>-1.8</z>
            </position>
        </click>

        <click>
            <name>switches off</name>
            <type>avionics</type>
            <mode>once</mode>
            <path>Sounds/click.wav</path>
            <condition>
                <not>
                    <property>sim/sound/click</property>
                </not>
            </condition>
            <max-dist>2</max-dist>
            <reference-dist>1</reference-dist>
            <volume>
                <property>sim/sound/volume1</property>
            </volume>
            <position>
                <x>1.5</x>
                <y>0</y>
                <z>-1.8</z>
            </position>
        </click>
	
	<property>/velocities/airspeed-kt</property>
	<value>100</value>
-->

		<overspeed>
			<name>overspeed</name>
			<mode>looped</mode>
			<path>Sounds/overspeed.wav</path>
			<condition>
				<and>
				<greater-than>
					<property>/sim/heli-realism-overspeed</property>
					<value>0</value>
				</greater-than>
				<equals>
					<property>/sim/current-view/view-number</property>
					<value>0</value>
				</equals>
					<not>
					<property>/sim/crashed</property>
					</not>
				</and>
			</condition>
			<volume>
				<factor>1.0</factor>
			</volume>
			<pitch>
				<factor>0.1</factor>
			</pitch>
			<reference-dist>1.0</reference-dist>
			<max-dist>2.0</max-dist>
		</overspeed>


    </fx>
</PropertyList>
