<?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.
-->

<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[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>

    <crank>
      <name>cough0</name>
      <path>Sounds/coughing.wav</path>
      <condition>
        <or>
          <property>engines/engine[0]/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>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>1.75</value>
              </greater-than-equals>
            </and>
            <and>
              <property>engines/engine[1]/running</property>
              <greater-than-equals>
                <property>engines/engine[1]/mp-osi</property>
                <value>1.75</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.07</offset>
      </volume>
      <volume>
        <property>engines/engine[1]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.01</min>
        <max>0.15</max>
        <offset>0.07</offset>
      </volume>
      <pitch>
        <property>engines/engine[0]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[1]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
    </engine>

    <engine>
      <name>idle1</name>
      <mode>looped</mode>
      <path>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>13.5</value>
              </less-than>
            </and>
            <and>
              <property>engines/engine[1]/running</property>
              <less-than>
                <property>engines/engine[1]/mp-osi</property>
                <value>13.5</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.11</min>
        <max>0.21</max>
        <offset>0.065</offset>
      </volume>
      <volume>
        <property>engines/engine[1]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.11</min>
        <max>0.21</max>
        <offset>0.065</offset>
      </volume>
      <pitch>
        <property>engines/engine[0]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[1]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</max>
        <offset>0.3</offset>
      </pitch>
    </engine>

    <!-- external -->

    <engine>
      <name>engine1 external</name>
      <mode>looped</mode>
      <path>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>1.75</value>
              </greater-than-equals>
            </and>
            <and>
              <property>engines/engine[1]/running</property>
              <greater-than-equals>
                <property>engines/engine[1]/mp-osi</property>
                <value>1.75</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.08</min>
        <max>0.50</max>
        <offset>0.07</offset>
      </volume>
      <volume>
        <property>engines/engine[1]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.08</min>
        <max>0.50</max>
        <offset>0.07</offset>
      </volume>
      <pitch>
        <property>engines/engine[0]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[1]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
    </engine>

    <engine>
      <name>idle1 external</name>
      <mode>looped</mode>
      <path>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>13.5</value>
              </less-than>
            </and>
            <and>
              <property>engines/engine[1]/running</property>
              <less-than>
                <property>engines/engine[1]/mp-osi</property>
                <value>13.5</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.21</min>
        <max>0.31</max>
        <offset>0.065</offset>
      </volume>
      <volume>
        <property>engines/engine[1]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.21</min>
        <max>0.31</max>
        <offset>0.065</offset>
      </volume>
      <pitch>
        <property>engines/engine[0]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[1]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</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>
        </or>
      </condition>
      <position>
        <x>15.0</x>
        <y>5.0</y>
        <z>0.0</z>
      </position>
      <volume>
        <offset>0.0</offset>
      </volume>
    </crank>

    <crank>
      <name>cough3</name>
      <path>Sounds/coughing.wav</path>
      <condition>
        <or>
          <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>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>1.75</value>
              </greater-than-equals>
            </and>
            <and>
              <property>engines/engine[3]/running</property>
              <greater-than-equals>
                <property>engines/engine[3]/mp-osi</property>
                <value>1.75</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.07</offset>
      </volume>
      <volume>
        <property>engines/engine[3]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.01</min>
        <max>0.15</max>
        <offset>0.07</offset>
      </volume>
      <pitch>
        <property>engines/engine[2]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[3]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
    </engine>

    <engine>
      <name>idle2</name>
      <mode>looped</mode>
      <path>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>13.5</value>
              </less-than>
            </and>
            <and>
              <property>engines/engine[3]/running</property>
              <less-than>
                <property>engines/engine[3]/mp-osi</property>
                <value>13.5</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.11</min>
        <max>0.21</max>
        <offset>0.065</offset>
      </volume>
      <volume>
        <property>engines/engine[3]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.11</min>
        <max>0.21</max>
        <offset>0.065</offset>
      </volume>
      <pitch>
        <property>engines/engine[2]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[3]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</max>
        <offset>0.3</offset>
      </pitch>
    </engine>

    <!-- external -->

    <engine>
      <name>engine2 external</name>
      <mode>looped</mode>
      <path>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>1.75</value>
              </greater-than-equals>
            </and>
            <and>
              <property>engines/engine[3]/running</property>
              <greater-than-equals>
                <property>engines/engine[3]/mp-osi</property>
                <value>1.75</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.08</min>
        <max>0.50</max>
        <offset>0.06</offset>
      </volume>
      <volume>
        <property>engines/engine[3]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.08</min>
        <max>0.50</max>
        <offset>0.06</offset>
      </volume>
      <pitch>
        <property>engines/engine[2]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[3]/rpm</property>
        <factor>0.0003</factor>
        <min>0.1</min>
        <max>2.0</max>
        <offset>0.3</offset>
      </pitch>
    </engine>

    <engine>
      <name>idle2 external</name>
      <mode>looped</mode>
      <path>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>13.5</value>
              </less-than>
            </and>
            <and>
              <property>engines/engine[3]/running</property>
              <less-than>
                <property>engines/engine[3]/mp-osi</property>
                <value>13.5</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.21</min>
        <max>0.31</max>
        <offset>0.065</offset>
      </volume>
      <volume>
        <property>engines/engine[3]/mp-osi</property>
        <factor>0.009</factor>
        <min>0.21</min>
        <max>0.31</max>
        <offset>0.065</offset>
      </volume>
      <pitch>
        <property>engines/engine[2]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</max>
        <offset>0.3</offset>
      </pitch>
      <pitch>
        <property>engines/engine[3]/rpm</property>
        <factor>0.0009</factor>
        <min>0.55</min>
        <max>4.5</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>
      <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>Sounds/flap_move.wav</path>
      <property>surface-positions/flap-pos-norm</property>
      <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>
      <property>velocities/airspeed-kt</property>
      <volume>
        <property>position/altitude-ft</property>
        <factor>-0.000015</factor>
        <offset>0.6</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.08</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>
          <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>
      <volume>
        <property>velocities/airspeed-kt</property>
        <type>log</type>
        <factor>0.5</factor>
      </volume>
    </rumble>

    <gear>
      <name>gear</name>
      <mode>in-transit</mode>
      <path>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>
      <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>Sounds/stall_horn.wav</path>
      <property>sim/alarms/stall-warning</property>
      <volume>
        <property>velocities/airspeed-kt</property>
        <min>30.0</min>
      </volume>
      <reference-dist>10.0</reference-dist>
      <max-dist>20.0</max-dist>
    </stall>

    <horn>
      <name>Mater horn</name>
      <path>Sounds/honk.wav</path>
      <condition>
        <property>controls/switches/horn</property>
      </condition>
      <volume>
        <factor>1.0</factor>
      </volume>
    </horn>

    <ding>
      <name>Command bell</name>
      <path>Sounds/cabinalert.wav</path>
      <condition>
        <property>controls/switches/command-bell</property>
      </condition>
      <volume>
        <factor>0.5</factor>
      </volume>
    </ding>

    <door>
      <name>Crew door</name>
      <path>Sounds/door_close.wav</path>
      <condition>
        <or>
          <equals>
            <property>controls/door-crew/position-norm</property>
            <value>0.0</value>
          </equals>
          <equals>
            <property>controls/door-crew/position-norm</property>
            <value>1.0</value>
          </equals>
        </or>
      </condition>
      <volume>
        <factor>0.5</factor>
      </volume>
    </door>

    <door>
      <name>Passenger door</name>
      <path>Sounds/door_close.wav</path>
      <condition>
        <equals>
          <property>instrumentation/doors/passenger/position-norm</property>
          <value>0.0</value>
        </equals>
      </condition>
      <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>
      <condition>
        <property>instrumentation/generic/click</property>
      </condition>
      <volume>
        <max>0.2</max>
      </volume>
    </click>

    <click>
      <name>click off</name>
      <path>Sounds/click.wav</path>
      <condition>
        <not>
          <property>instrumentation/generic/click</property>
        </not>
      </condition>
      <volume>
        <max>0.2</max>
      </volume>
    </click>

    <wiperhu>
      <name>wiperhu</name>
      <mode>once</mode>
      <path>Sounds/hu.wav</path>
      <condition>
        <less-than>
      	  <property>controls/special/wiper-deg</property>
          <value>-40</value>
        </less-than>
      </condition>
      <volume>
        <property>environment/metar/rain-norm</property>
        <factor>1.00</factor>
        <offset>0.00</offset>
        <min>0.2</min>
        <max>0.6</max>
      </volume>
      <pitch>
        <property>velocities/airspeed-kt</property>
        <factor>0.01</factor>
        <offset>1.0</offset>
      </pitch>
    </wiperhu>

    <wiperho>
      <name>wiperho</name>
      <mode>once</mode>
      <path>Sounds/ho.wav</path>
      <condition>
        <greater-than>
      	  <property>controls/special/wiper-deg</property>
          <value>45</value>
        </greater-than>
      </condition>
      <volume>
        <property>environment/metar/rain-norm</property>
        <factor>1.00</factor>
        <offset>0.00</offset>
        <min>0.2</min>
        <max>0.6</max>
      </volume>
      <pitch>
        <property>velocities/airspeed-kt</property>
        <factor>0.01</factor>
        <offset>1.0</offset>
      </pitch>
    </wiperho>

  </fx>

</PropertyList>
