<?xml version="1.0"?>

<!-- Lockheed 1049 default sounds.

     The gear is not heard inside a real C-121A / L-749A Constellation.

     Low hardware config : 2 engines per sound; otherwise exception in main loop.


     Known problems :
     ==============
     - "once" sound must be both internal/external, otherwise triggers once the view flag toggles.
-->
 
<PropertyList>

<!-- position x/y/z = depth/width/height, from nose (because of VRP) -->

 <fx>
 
<!-- ENGINES 1 & 2 -->

  <crank>
   <name>engstart1</name>
   <path>Sounds/engstart.wav</path>
   <condition>
    <or>
     <property>/engines/engine[0]/cranking</property>
     <property>/engines/engine[1]/cranking</property>
    </or>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <offset>0.4</offset>
   </volume>
  </crank>

  <crank>
   <name>crank1</name>
   <mode>looped</mode>
   <path>Sounds/cranking.wav</path>
   <condition>
    <or>
     <and>
      <property>/engines/engine[0]/cranking</property>
      <not>
       <property>/engines/engine[0]/running</property>
      </not>
     </and>
     <and>
      <property>/engines/engine[1]/cranking</property>
      <not>
       <property>/engines/engine[1]/running</property>
      </not>
     </and>
    </or>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <offset>0.5</offset>
   </volume>
  </crank>

  <crank>
   <name>cough1</name>
   <path>Sounds/coughing.wav</path>
   <condition>
    <or>
     <property>/engines/engine[0]/running</property>
     <property>/engines/engine[1]/running</property>
    </or>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <offset>0.3</offset>
   </volume>
  </crank>

<!-- internal -->

  <engine>
   <name>engine1</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_running.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[0]/running</property>
       <greater-than-equals>
        <property>/engines/engine[0]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
      <and>
       <property>/engines/engine[1]/running</property>
       <greater-than-equals>
        <property>/engines/engine[1]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
     </or>
     <property>/sim/current-view/internal</property>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[0]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.15</max>
    <offset>0.04</offset>
   </volume>
   <volume>
    <property>/engines/engine[1]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.15</max>
    <offset>0.04</offset>
   </volume>
   <pitch>
    <property>/engines/engine[0]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[1]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

  <engine>
   <name>idle1</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_idle.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[0]/running</property>
       <less-than>
        <property>/engines/engine[0]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
      <and>
       <property>/engines/engine[1]/running</property>
       <less-than>
        <property>/engines/engine[1]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
     </or>
     <property>/sim/current-view/internal</property>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[0]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.03</offset>
   </volume>
   <volume>
    <property>/engines/engine[1]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.03</offset>
   </volume>
   <pitch>
    <property>/engines/engine[0]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[1]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

<!-- external -->

  <engine>
   <name>engine1 external</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_running.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[0]/running</property>
       <greater-than-equals>
        <property>/engines/engine[0]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
      <and>
       <property>/engines/engine[1]/running</property>
       <greater-than-equals>
        <property>/engines/engine[1]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
     </or>
     <not>
      <property>/sim/current-view/internal</property>
     </not>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[0]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.02</min>
    <max>0.30</max>
    <offset>0.07</offset>
   </volume>
   <volume>
    <property>/engines/engine[1]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.02</min>
    <max>0.30</max>
    <offset>0.07</offset>
   </volume>
   <pitch>
    <property>/engines/engine[0]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[1]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

  <engine>
   <name>idle1 external</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_idle.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[0]/running</property>
       <less-than>
        <property>/engines/engine[0]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
      <and>
       <property>/engines/engine[1]/running</property>
        <less-than>
        <property>/engines/engine[1]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
     </or>
     <not>
      <property>/sim/current-view/internal</property>
     </not>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>-5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[0]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.08</offset>
   </volume>
   <volume>
    <property>/engines/engine[1]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.08</offset>
   </volume>
   <pitch>
    <property>/engines/engine[0]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[1]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

<!-- ENGINES 3 & 4 -->

  <crank>
   <name>engstart2</name>
   <path>Sounds/engstart.wav</path>
   <condition>
    <or>
     <property>/engines/engine[2]/cranking</property>
     <property>/engines/engine[3]/cranking</property>
    </or>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <offset>0.4</offset>
   </volume>
  </crank>

  <crank>
   <name>crank2</name>
   <mode>looped</mode>
   <path>Sounds/cranking.wav</path>
   <condition>
    <or>
     <and>
      <property>/engines/engine[2]/cranking</property>
      <not>
       <property>/engines/engine[2]/running</property>
      </not>
     </and>
     <and>
      <property>/engines/engine[3]/cranking</property>
      <not>
       <property>/engines/engine[3]/running</property>
      </not>
     </and>
    </or>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <offset>0.5</offset>
   </volume>
  </crank>

  <crank>
   <name>cough2</name>
   <path>Sounds/coughing.wav</path>
   <condition>
    <or>
     <property>/engines/engine[2]/running</property>
     <property>/engines/engine[3]/running</property>
    </or>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <offset>0.0</offset>
   </volume>
  </crank>

<!-- internal -->

  <engine>
   <name>engine2</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_running.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[2]/running</property>
       <greater-than-equals>
        <property>/engines/engine[2]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
      <and>
       <property>/engines/engine[3]/running</property>
       <greater-than-equals>
        <property>/engines/engine[3]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
     </or>
     <property>/sim/current-view/internal</property>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[2]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.15</max>
    <offset>0.03</offset>
   </volume>
   <volume>
    <property>/engines/engine[3]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.15</max>
    <offset>0.03</offset>
   </volume>
   <pitch>
    <property>/engines/engine[2]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[3]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

  <engine>
   <name>idle2</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_idle.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[2]/running</property>
       <less-than>
        <property>/engines/engine[2]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
      <and>
       <property>/engines/engine[3]/running</property>
       <less-than>
        <property>/engines/engine[3]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
     </or>
     <property>/sim/current-view/internal</property>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[2]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.03</offset>
   </volume>
   <volume>
    <property>/engines/engine[3]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.03</offset>
   </volume>
   <pitch>
    <property>/engines/engine[2]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[3]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

<!-- external -->

  <engine>
   <name>engine2 external</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_running.wav</path>
   <condition>
    <and>
     <or>
      <and>
       <property>/engines/engine[2]/running</property>
       <greater-than-equals>
        <property>/engines/engine[2]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
      <and>
       <property>/engines/engine[3]/running</property>
       <greater-than-equals>
        <property>/engines/engine[3]/mp-osi</property>
        <value>6.2</value>
       </greater-than-equals>
      </and>
     </or>
     <not>
      <property>/sim/current-view/internal</property>
     </not>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[2]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.02</min>
    <max>0.30</max>
    <offset>0.06</offset>
   </volume>
   <volume>
    <property>/engines/engine[3]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.02</min>
    <max>0.30</max>
    <offset>0.06</offset>
   </volume>
   <pitch>
    <property>/engines/engine[2]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[3]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

  <engine>
   <name>idle2 external</name>
   <mode>looped</mode>
   <path>Aircraft/Lockheed1049/Sounds/engine_idle.wav</path>
   <condition>
    <and>
     <or>
      <and>
        <property>/engines/engine[2]/running</property>
       <less-than>
        <property>/engines/engine[2]/mp-osi</property>
        <value>6.2</value>
       </less-than>
       </and>
      <and>
       <property>/engines/engine[3]/running</property>
       <less-than>
        <property>/engines/engine[3]/mp-osi</property>
        <value>6.2</value>
       </less-than>
      </and>
     </or>
     <not>
      <property>/sim/current-view/internal</property>
     </not>
    </and>
   </condition>
   <position>
    <x>15.0</x>
    <y>5.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/engines/engine[2]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.08</offset>
   </volume>
   <volume>
    <property>/engines/engine[3]/mp-osi</property>
    <factor>0.009</factor>
    <min>0.01</min>
    <max>0.04</max>
    <offset>0.08</offset>
   </volume>
   <pitch>
    <property>/engines/engine[2]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
   <pitch>
    <property>/engines/engine[3]/rpm</property>
    <factor>0.0004</factor>
    <min>0.1</min>
    <max>2.0</max>
    <offset>0.3</offset>
   </pitch>
  </engine>

<!-- COCKPIT -->

  <squeal>
   <name>squeal</name>
   <path>Sounds/squeal.wav</path>
   <condition>
    <or>
     <property>/gear/gear[0]/wow</property>
     <property>/gear/gear[1]/wow</property>
     <property>/gear/gear[2]/wow</property>
    </or>
   </condition>
   <position>
    <x>4.5</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/velocities/speed-down-fps</property>
    <factor>0.05</factor>
   </volume>
   <volume>
    <property>/velocities/airspeed-kt</property>
    <factor>0.01</factor>
   </volume>
   <volume>
    <internal>dt_stop</internal>
    <factor>0.05</factor>
    <max>1.0</max>
   </volume>
   <pitch>
    <property>/velocities/airspeed-kt</property>
    <factor>0.0025</factor>
    <offset>1.2</offset>
   </pitch>
  </squeal>
 
  <flap>
   <name>flaps</name>
   <mode>in-transit</mode>
   <path>Aircraft/Lockheed1049/Sounds/flap_move.wav</path>
   <property>/surface-positions/flap-pos-norm</property>
   <position>
    <x>2.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <factor>0.2</factor>
   </volume>
   <reference-dist>10.0</reference-dist>
   <max-dist>20.0</max-dist>
  </flap>

  <wind>
   <name>wind</name>
   <mode>looped</mode>
   <path>Sounds/wind.wav</path>
   <condition>
    <property>/sim/current-view/internal</property>
   </condition>
   <property>/velocities/airspeed-kt</property>
   <position>
    <x>2.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <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.01</min>
     <max>0.04</max>
   </volume>
   <pitch>
    <property>/velocities/airspeed-kt</property>
    <factor>0.01</factor>
    <offset>1.25</offset>
   </pitch>
  </wind>

<!-- COMMON SOUNDS -->

  <rumble>
   <name>rumble</name>
   <mode>looped</mode>
   <path>Sounds/rumble.wav</path>
   <condition>
    <and>
     <!-- ground vibrations transmitted to the fuselage -->
     <property>/sim/current-view/internal</property>
     <less-than> <!-- BUG : wow not reset, when starting in flight -->
      <property>/position/altitude-agl-ft</property>
      <value>50</value>
     </less-than>
     <greater-than> <!-- only taxi -->
      <property>/velocities/airspeed-kt</property>
      <value>20</value>
     </greater-than>
     <or>
      <property>/gear/gear[0]/wow</property>
      <property>/gear/gear[1]/wow</property>
      <property>/gear/gear[2]/wow</property>
     </or>
    </and>
   </condition>
   <position>
    <x>2.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <property>/velocities/airspeed-kt</property>
    <type>log</type>
    <factor>0.5</factor>
   </volume>
  </rumble>

  <gear>
   <name>gear</name>
   <mode>in-transit</mode>
   <path>Aircraft/Lockheed1049/Sounds/gear_move.wav</path>
   <property>/gear/gear[0]/position-norm</property>
   <condition>
    <and>
     <or>
      <not>
       <property>/sim/current-view/internal</property>
      </not>
      <and>
       <property>/systems/seat/gear-well</property>
       <property>/sim/current-view/internal</property>
      </and>
     </or>
     <greater-than>
      <property>/gear/gear[0]/position-norm</property>
      <value>0.0</value>
     </greater-than>
     <less-than>
      <property>/gear/gear[0]/position-norm</property>
      <value>1.0</value>
     </less-than>
    </and>
   </condition>
   <position>
    <x>18.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <pitch>
    <internal>dt_play</internal>
    <offset>1.0</offset>
    <factor>-0.001</factor>
   </pitch>
   <volume>
    <factor>1.0</factor>
   </volume>
  </gear>
 
  <stall>
   <name>stall</name>
   <path>Aircraft/Lockheed1049/Sounds/stall_horn.wav</path>
   <type>avionics</type>
   <property>/sim/alarms/stall-warning</property>
   <volume>
    <property>/velocities/airspeed-kt</property>
    <min>30.0</min>
   </volume>
   <position>
    <x>2.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <reference-dist>10.0</reference-dist>
   <max-dist>20.0</max-dist>
  </stall>

  <door>
   <name>Crew door</name>
   <path>Sounds/door_close.wav</path>
   <condition>
    <equals>
     <property>/controls/doors/crew/position-norm</property>
     <value>0.0</value>
    </equals>
   </condition>
   <position>
    <x>3.6</x>
    <y>1.3</y>
    <z>0.0</z>
   </position>
   <volume>
    <factor>0.2</factor>
   </volume>
  </door>

  <door>
   <name>Flight station door</name>
   <path>Sounds/door_close.wav</path>
   <condition>
    <equals>
     <property>/controls/doors/flight-station/position-norm</property>
     <value>0.0</value>
    </equals>
   </condition>
   <position>
    <x>3.9</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <factor>0.2</factor>
   </volume>
  </door>

  <door>
   <name>Passenger door</name>
   <path>Sounds/door_close.wav</path>
   <condition>
    <equals>
     <property>/controls/doors/passenger/position-norm</property>
     <value>0.0</value>
    </equals>
   </condition>
   <position>
    <x>4.5</x>
    <y>-1.5</y>
    <z>0.0</z>
   </position>
   <volume>
    <factor>0.2</factor>
   </volume>
  </door>

<!-- cannot disable click in external views, otherwise heard when ctrl-V -->

  <click>
   <name>click on</name>
   <path>Sounds/click.wav</path>
   <type>avionics</type>
   <condition>
    <property>/instrumentation/generic/click</property>
   </condition>
   <position>
    <x>2.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <max>0.2</max>
   </volume>
  </click>

  <click>
   <name>click off</name>
   <path>Sounds/click.wav</path>
   <type>avionics</type>
   <condition>
    <not>
     <property>/instrumentation/generic/click</property>
    </not>
   </condition>
   <position>
    <x>2.0</x>
    <y>0.0</y>
    <z>0.0</z>
   </position>
   <volume>
    <max>0.2</max>
   </volume>
  </click>

</fx>
 
</PropertyList>
