Sound: fix volume and pitch.

parent ac7b7071
......@@ -58,7 +58,9 @@
<property>/sim/current-view/internal</property>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[0]/n2</property>
</volume>
......@@ -124,7 +126,9 @@
<property>/sim/current-view/internal</property>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[1]/n2</property>
</volume>
......@@ -190,7 +194,9 @@
<property>/sim/current-view/internal</property>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[2]/n2</property>
</volume>
......@@ -256,7 +262,9 @@
<property>/sim/current-view/internal</property>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[3]/n2</property>
</volume>
......
......@@ -70,7 +70,9 @@
</and>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[0]/n2_</property>
</volume>
......@@ -148,7 +150,9 @@
</and>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[1]/n2_</property>
</volume>
......@@ -226,7 +230,9 @@
</and>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[2]/n2_</property>
</volume>
......@@ -304,7 +310,9 @@
</and>
</not>
</condition>
<pitch><offset>1.0</offset></pitch>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[3]/n2_</property>
</volume>
......@@ -338,7 +346,10 @@
<factor>2.0</factor>
<offset>0.0</offset>
</pitch>
<volume><property>engines/engine[0]/n1_</property></volume>
<volume>
<property>engines/engine[0]/n1_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -355,8 +366,13 @@
<condition>
<property>sim/current-view/internal</property>
</condition>
<pitch><offset>1.0</offset></pitch>
<volume><property>engines/engine[0]/n2_</property></volume>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[0]/n2_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -370,9 +386,6 @@
<name>Starter 1</name>
<path>Sounds/turbojet_fan.wav</path>
<mode>looped</mode>
<condition>
<property>engines/engine[0]/starter</property>
</condition>
<pitch>
<property>instrumentation/jsbsim/propulsion/engine[0]/starter-noise-pitch</property>
<factor>0.46</factor>
......@@ -393,11 +406,9 @@
<damage>
<name>Engine 1 explosion</name>
<path>Sounds/crash.wav</path>
<mode>once</mode>
<condition>
<property>sim/multiplay/generic/bool[65]</property>
</condition>
<volume><offset>1.0</offset></volume>
<reference-dist>500.0</reference-dist>
<max-dist>8000.0</max-dist>
<position>
......@@ -420,7 +431,10 @@
<factor>2.0</factor>
<offset>0.0</offset>
</pitch>
<volume><property>engines/engine[1]/n1_</property></volume>
<volume>
<property>engines/engine[1]/n1_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -437,8 +451,13 @@
<condition>
<property>sim/current-view/internal</property>
</condition>
<pitch><offset>1.0</offset></pitch>
<volume><property>engines/engine[1]/n2_</property></volume>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[1]/n2_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -452,9 +471,6 @@
<name>Starter 2</name>
<path>Sounds/turbojet_fan.wav</path>
<mode>looped</mode>
<condition>
<property>engines/engine[1]/starter</property>
</condition>
<pitch>
<property>instrumentation/jsbsim/propulsion/engine[1]/starter-noise-pitch</property>
<factor>0.46</factor>
......@@ -475,11 +491,9 @@
<damage>
<name>Engine 2 explosion</name>
<path>Sounds/crash.wav</path>
<mode>once</mode>
<condition>
<property>sim/multiplay/generic/bool[66]</property>
</condition>
<volume><offset>1.0</offset></volume>
<reference-dist>500.0</reference-dist>
<max-dist>8000.0</max-dist>
<position>
......@@ -502,7 +516,10 @@
<factor>2.0</factor>
<offset>0.0</offset>
</pitch>
<volume><property>engines/engine[2]/n1_</property></volume>
<volume>
<property>engines/engine[2]/n1_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -519,8 +536,13 @@
<condition>
<property>sim/current-view/internal</property>
</condition>
<pitch><offset>1.0</offset></pitch>
<volume><property>engines/engine[2]/n2_</property></volume>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[2]/n2_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -534,9 +556,6 @@
<name>Starter 3</name>
<path>Sounds/turbojet_fan.wav</path>
<mode>looped</mode>
<condition>
<property>engines/engine[2]/starter</property>
</condition>
<pitch>
<property>instrumentation/jsbsim/propulsion/engine[2]/starter-noise-pitch</property>
<factor>0.46</factor>
......@@ -557,11 +576,9 @@
<damage>
<name>Engine 3 explosion</name>
<path>Sounds/crash.wav</path>
<mode>once</mode>
<condition>
<property>sim/multiplay/generic/bool[67]</property>
</condition>
<volume><offset>1.0</offset></volume>
<reference-dist>500.0</reference-dist>
<max-dist>8000.0</max-dist>
<position>
......@@ -584,7 +601,10 @@
<factor>2.0</factor>
<offset>0.0</offset>
</pitch>
<volume><property>engines/engine[3]/n1_</property></volume>
<volume>
<property>engines/engine[3]/n1_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -601,8 +621,13 @@
<condition>
<property>sim/current-view/internal</property>
</condition>
<pitch><offset>1.0</offset></pitch>
<volume><property>engines/engine[3]/n2_</property></volume>
<pitch>
<offset>1.0</offset>
</pitch>
<volume>
<property>engines/engine[3]/n2_</property>
<factor>0.5</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -616,9 +641,6 @@
<name>Starter 4</name>
<path>Sounds/turbojet_fan.wav</path>
<mode>looped</mode>
<condition>
<property>engines/engine[3]/starter</property>
</condition>
<pitch>
<property>instrumentation/jsbsim/propulsion/engine[3]/starter-noise-pitch</property>
<factor>0.46</factor>
......@@ -639,11 +661,9 @@
<damage>
<name>Engine 4 explosion</name>
<path>Sounds/crash.wav</path>
<mode>once</mode>
<condition>
<property>sim/multiplay/generic/bool[68]</property>
</condition>
<volume><offset>1.0</offset></volume>
<reference-dist>500.0</reference-dist>
<max-dist>8000.0</max-dist>
<position>
......@@ -660,18 +680,29 @@
<airflow>
<name>Windshield</name>
<path>Sounds/wind.wav</path>
<mode>looped</mode>
<condition>
<property>sim/current-view/internal</property>
<greater-than><property>surface-positions/wing-fold-pos-norm</property><value>0.01</value></greater-than>
<greater-than>
<property>surface-positions/wing-fold-pos-norm</property>
<value>0.01</value>
</greater-than>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume><property>velocities/airspeed-kt</property><factor>0.0025</factor><max>1.0</max></volume>
<pitch><property>velocities/airspeed-kt</property><factor>0.0025</factor><offset>1.0</offset></pitch>
<reference-dist>0.1</reference-dist>
<max-dist>5.0</max-dist>
<pitch>
<property>velocities/airspeed-kt</property>
<factor>0.0025</factor>
<offset>1.0</offset>
</pitch>
<volume>
<property>velocities/airspeed-kt</property>
<factor>0.0002</factor>
<max>1.0</max>
</volume>
<reference-dist>0.5</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.93</x>
<y>0.0</y>
......@@ -683,18 +714,29 @@
<airflow>
<name>Window 0</name>
<path>Sounds/wind.wav</path>
<mode>looped</mode>
<condition>
<property>sim/current-view/internal</property>
<greater-than>
<property>instrumentation/jsbsim/systems/doors/window[0]/pos-norm</property>
<value>0.11</value>
</greater-than>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume><property>velocities/airspeed-kt</property><factor>0.01</factor><max>4.0</max></volume>
<pitch><property>velocities/airspeed-kt</property><factor>0.0025</factor><offset>1.0</offset></pitch>
<reference-dist>0.25</reference-dist>
<max-dist>2.0</max-dist>
<pitch>
<property>velocities/airspeed-kt</property>
<factor>0.0025</factor>
<offset>1.0</offset>
</pitch>
<volume>
<property>velocities/airspeed-kt</property>
<factor>0.002</factor>
<max>1.0</max>
</volume>
<reference-dist>0.2</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.33</x>
<y>0.98</y>
......@@ -707,12 +749,23 @@
<path>Sounds/engstart.wav</path>
<condition>
<property>sim/current-view/internal</property>
<greater-than><property>instrumentation/jsbsim/systems/doors/window[0]/pos-norm</property><value>0.01</value></greater-than>
<less-than><property>instrumentation/jsbsim/systems/doors/window[0]/pos-norm</property><value>0.1</value></less-than>
<greater-than>
<property>instrumentation/jsbsim/systems/doors/window[0]/pos-norm</property>
<value>0.01</value>
</greater-than>
<less-than>
<property>instrumentation/jsbsim/systems/doors/window[0]/pos-norm</property>
<value>0.1</value>
</less-than>
</condition>
<mode>once</mode>
<reference-dist>0.25</reference-dist>
<max-dist>2.0</max-dist>
<pitch>
<offset>0.75</offset>
</pitch>
<volume>
<offset>-0.9</offset>
</volume>
<reference-dist>0.2</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.33</x>
<y>0.98</y>
......@@ -724,18 +777,30 @@
<airflow>
<name>Window 1</name>
<path>Sounds/wind.wav</path>
<mode>looped</mode>
<condition>
<property>sim/current-view/internal</property>
<greater-than>
<property>instrumentation/jsbsim/systems/doors/window[1]/pos-norm</property>
<value>0.11</value>
</greater-than>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume><property>velocities/airspeed-kt</property><factor>0.01</factor><max>4.0</max></volume>
<pitch><property>velocities/airspeed-kt</property><factor>0.0025</factor><offset>1.0</offset></pitch>
<reference-dist>0.25</reference-dist>
<max-dist>2.0</max-dist>
<pitch>
<property>velocities/airspeed-kt</property>
<factor>0.0025</factor>
<offset>1.0</offset>
</pitch>
<volume>
<property>velocities/airspeed-kt</property>
<factor>0.002</factor>
<offset>0.0</offset>
<max>1.0</max>
</volume>
<reference-dist>0.2</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.33</x>
<y>-0.98</y>
......@@ -748,12 +813,23 @@
<path>Sounds/engstart.wav</path>
<condition>
<property>sim/current-view/internal</property>
<greater-than><property>instrumentation/jsbsim/systems/doors/window[1]/pos-norm</property><value>0.01</value></greater-than>
<less-than><property>instrumentation/jsbsim/systems/doors/window[1]/pos-norm</property><value>0.1</value></less-than>
<greater-than>
<property>instrumentation/jsbsim/systems/doors/window[1]/pos-norm</property>
<value>0.01</value>
</greater-than>
<less-than>
<property>instrumentation/jsbsim/systems/doors/window[1]/pos-norm</property>
<value>0.1</value>
</less-than>
</condition>
<mode>once</mode>
<reference-dist>0.25</reference-dist>
<max-dist>2.0</max-dist>
<pitch>
<offset>0.75</offset>
</pitch>
<volume>
<offset>-0.9</offset>
</volume>
<reference-dist>0.2</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.33</x>
<y>-0.98</y>
......@@ -766,10 +842,21 @@
<name>Gear Front Lock</name>
<path>Sounds/door_close.wav</path>
<condition>
<greater-than><property>gear/gear[0]/position-norm</property><value>0.01</value></greater-than>
<less-than><property>gear/gear[0]/position-norm</property><value>0.04</value></less-than>
<greater-than>
<property>gear/gear[0]/position-norm</property>
<value>0.01</value>
</greater-than>
<less-than>
<property>gear/gear[0]/position-norm</property>
<value>0.04</value>
</less-than>
</condition>
<mode>once</mode>
<pitch>
<offset>-0.4</offset>
</pitch>
<volume>
<offset>-0.5</offset>
</volume>
<reference-dist>10.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -782,20 +869,20 @@
<gear>
<name>Gear Front Rumble</name>
<path>Sounds/rumble.wav</path>
<mode>looped</mode>
<condition>
<property>gear/gear[0]/wow</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<pitch>
<property>gear/gear[0]/rollspeed-ms</property>
<factor>0.00486</factor>
<factor>0.005</factor>
</pitch>
<volume>
<property>gear/gear[0]/rollspeed-ms</property>
<factor>0.0389</factor>
<factor>0.02</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
......@@ -811,10 +898,21 @@
<name>Gear Left Lock</name>
<path>Sounds/door_close.wav</path>
<condition>
<greater-than><property>gear/gear[1]/position-norm</property><value>0.01</value></greater-than>
<less-than><property>gear/gear[1]/position-norm</property><value>0.04</value></less-than>
<greater-than>
<property>gear/gear[1]/position-norm</property>
<value>0.01</value>
</greater-than>
<less-than>
<property>gear/gear[1]/position-norm</property>
<value>0.04</value>
</less-than>
</condition>
<mode>once</mode>
<pitch>
<offset>-0.5</offset>
</pitch>
<volume>
<offset>-0.5</offset>
</volume>
<reference-dist>10.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -827,20 +925,20 @@
<gear>
<name>Gear Left Rumble</name>
<path>Sounds/rumble.wav</path>
<mode>looped</mode>
<condition>
<property>gear/gear[1]/wow</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<pitch>
<property>gear/gear[1]/rollspeed-ms</property>
<factor>0.00486</factor>
<factor>0.005</factor>
</pitch>
<volume>
<property>gear/gear[1]/rollspeed-ms</property>
<factor>0.0389</factor>
<factor>0.02</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
......@@ -856,10 +954,21 @@
<name>Gear Right Lock</name>
<path>Sounds/door_close.wav</path>
<condition>
<greater-than><property>gear/gear[2]/position-norm</property><value>0.01</value></greater-than>
<less-than><property>gear/gear[2]/position-norm</property><value>0.04</value></less-than>
<greater-than>
<property>gear/gear[2]/position-norm</property>
<value>0.01</value>
</greater-than>
<less-than>
<property>gear/gear[2]/position-norm</property>
<value>0.04</value>
</less-than>
</condition>
<mode>once</mode>
<pitch>
<offset>-0.5</offset>
</pitch>
<volume>
<offset>-0.5</offset>
</volume>
<reference-dist>10.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -871,6 +980,7 @@
<gear>
<name>Gear Right Rumble</name>
<mode>looped</mode>
<path>Sounds/rumble.wav</path>
<condition>
<property>gear/gear[2]/wow</property>
......@@ -878,14 +988,13 @@
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<pitch>
<property>gear/gear[2]/rollspeed-ms</property>
<factor>0.00486</factor>
<factor>0.005</factor>
</pitch>
<volume>
<property>gear/gear[2]/rollspeed-ms</property>
<factor>0.0389</factor>
<factor>0.02</factor>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
......@@ -900,8 +1009,11 @@
<cone>
<name>Cone Motors</name>
<path>Sounds/flaps.wav</path>
<property>surface-positions/wing-fold-motor</property>
<mode>looped</mode>
<property>surface-positions/wing-fold-motor</property>
<volume>
<offset>-0.75</offset>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -915,10 +1027,21 @@
<name>Cone Lock</name>
<path>Sounds/door_close.wav</path>
<condition>
<greater-than><property>surface-positions/wing-fold-pos-norm</property><value>0.001</value></greater-than>
<less-than><property>surface-positions/wing-fold-pos-norm</property><value>0.02</value></less-than>
<greater-than>
<property>surface-positions/wing-fold-pos-norm</property>
<value>0.001</value>
</greater-than>
<less-than>
<property>surface-positions/wing-fold-pos-norm</property>
<value>0.02</value>
</less-than>
</condition>
<mode>once</mode>
<pitch>
<offset>-0.3</offset>
</pitch>
<volume>
<offset>-0.5</offset>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -932,8 +1055,11 @@
<canard>
<name>Canard Motors</name>
<path>Sounds/flaps.wav</path>
<property>surface-positions/flap-motor</property>
<mode>looped</mode>
<property>surface-positions/flap-motor</property>
<volume>
<offset>-0.75</offset>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -947,10 +1073,18 @@
<name>Canard Lock</name>
<path>Sounds/door_close.wav</path>
<condition>
<greater-than><property>surface-positions/flap-pos-norm</property><value>0.001</value></greater-than>
<less-than><property>surface-positions/flap-pos-norm</property><value>0.02</value></less-than>
<greater-than>
<property>surface-positions/flap-pos-norm</property>
<value>0.001</value>
</greater-than>
<less-than>
<property>surface-positions/flap-pos-norm</property>
<value>0.02</value>
</less-than>
</condition>
<mode>once</mode>
<volume>
<offset>-0.5</offset>
</volume>
<reference-dist>1.0</reference-dist>
<max-dist>50.0</max-dist>
<position>
......@@ -964,14 +1098,21 @@
<clock>
<name>AChS 0</name>
<path>Sounds/engstart.wav</path>
<mode>looped</mode>
<condition>
<property>/sim/current-view/internal</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume><offset>-0.98</offset></volume>
<reference-dist>1.0</reference-dist>
<max-dist>5.0</max-dist>
<pitch><offset>-0.2</offset></pitch>
<pitch>
<offset>-0.2</offset>
</pitch>
<volume>
<offset>-0.95</offset>
</volume>
<reference-dist>0.08</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.609</x>
<y>0.8</y>
......@@ -982,14 +1123,21 @@
<clock>
<name>AChS 1</name>
<path>Sounds/engstart.wav</path>
<mode>looped</mode>
<condition>
<property>/sim/current-view/internal</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume><offset>-0.98</offset></volume>
<reference-dist>1.0</reference-dist>
<max-dist>5.0</max-dist>
<pitch><offset>-0.2</offset></pitch>
<pitch>
<offset>-0.2</offset>
</pitch>
<volume>
<offset>-0.95</offset>
</volume>
<reference-dist>0.08</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-28.604</x>
<y>-0.84</y>
......@@ -1000,14 +1148,21 @@
<clock>
<name>AChS 2</name>
<path>Sounds/engstart.wav</path>
<mode>looped</mode>
<condition>
<property>/sim/current-view/internal</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume><offset>-0.98</offset></volume>
<reference-dist>1.0</reference-dist>
<max-dist>5.0</max-dist>
<pitch><offset>-0.2</offset></pitch>
<pitch>
<offset>-0.2</offset>
</pitch>
<volume>
<offset>-0.95</offset>
</volume>
<reference-dist>0.08</reference-dist>
<max-dist>7.0</max-dist>
<position>
<x>-25.845</x>
<y>-0.552</y>
......@@ -1019,31 +1174,36 @@
<strain>
<name>Airframe strain</name>
<path>Sounds/rattleroll.wav</path>
<mode>looped</mode>
<condition>
<property>/sim/current-view/internal</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<type>avionics</type>
<mode>looped</mode>
<volume>
<property>instrumentation/jsbsim/systems/airframe/sound/strain-vol</property>
<offset>0.0</offset>
</volume>
<pitch>
<offset>-0.6</offset>
</pitch>
<volume>
<property>instrumentation/jsbsim/systems/airframe/sound/strain-vol</property>
</volume>
</strain>
<elec>
<name>400 Hz power</name>
<path>Sounds/cockpit/elec_400Hz.wav</path>
<mode>looped</mode>
<condition>
<property>/sim/current-view/internal</property>
<not>
<property>sim/multiplay/generic/bool[75]</property>
</not>
</condition>
<mode>looped</mode>
<volume>
<property>instrumentation/jsbsim/systems/elec/sound/hum-vol</property>
<factor>0.0625</factor>
<factor>0.03</factor>
</volume>
<reference-dist>5.0</reference-dist>
<max-dist>50.0</max-dist>
......@@ -1057,15 +1217,17 @@
<warning>
<name>Warning speaker [0]</name>
<path>Sounds/cockpit/speaker.wav</path>
<mode>looped</mode>
<condition>
<property>instrumentation/jsbsim/systems/warning/sound/speaker</property>