Debian Codegraph @

Aircraft/c172p/Systems/sounds.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 Copyright (c) 2015 onox
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 -->
19
20 <PropertyList>
21
22 <params>
23 <doors>
24 <left>/sim/multiplay/generic/float[1]</left>
25 <right>/sim/multiplay/generic/float[0]</right>
26 </doors>
27 <windows>
28 <left>/sim/multiplay/generic/float[3]</left>
29 <right>/sim/multiplay/generic/float[4]</right>
30 </windows>
31 </params>
32
33 <!-- Return a factor (>= 1.0) to boost the volume when one or both
34 doors are open.
35 -->
36 <filter>
37 <name>Volume Boost Doors Factor</name>
38 <type>gain</type>
39 <input>
40 <condition>
41 <property>/sim/current-view/internal</property>
42 </condition>
43 <expression>
44 <sum>
45 <product>
46 <div>
47 <log>
48 <sum>
49 <min>
50 <sum>
51 <!-- Left door fully open is 1.0. Fully closed is 0.0 -->
52 <table>
53 <property alias="/params/doors/left"/>
54 <entry><ind>0.5</ind><dep>0.0</dep></entry>
55 <entry><ind>0.65</ind><dep>0.7</dep></entry>
56 <entry><ind>1.0</ind><dep>1.0</dep></entry>
57 </table>
58
59 <!-- Left window fully open is 1.0. Fully closed is 0.0 -->
60 <table>
61 <property alias="/params/windows/left"/>
62 <entry><ind>0.5</ind><dep>0.0</dep></entry>
63 <entry><ind>0.65</ind><dep>0.7</dep></entry>
64 <entry><ind>1.0</ind><dep>1.0</dep></entry>
65 </table>
66 </sum>
67 <value>1.0</value>
68 </min>
69
70 <min>
71 <sum>
72 <!-- Right door fully open is 1.0. Fully closed is 0.0 -->
73 <table>
74 <property alias="/params/doors/right"/>
75 <entry><ind>0.5</ind><dep>0.0</dep></entry>
76 <entry><ind>0.65</ind><dep>0.7</dep></entry>
77 <entry><ind>1.0</ind><dep>1.0</dep></entry>
78 </table>
79
80 <!-- Right window fully open is 1.0. Fully closed is 0.0 -->
81 <table>
82 <property alias="/params/windows/right"/>
83 <entry><ind>0.5</ind><dep>0.0</dep></entry>
84 <entry><ind>0.65</ind><dep>0.7</dep></entry>
85 <entry><ind>1.0</ind><dep>1.0</dep></entry>
86 </table>
87 </sum>
88 <value>1.0</value>
89 </min>
90
91 <!-- Prevents math domain error because log2
92 requires value >= 1.0.
93 -->
94 <value>1.0</value>
95 </sum>
96 </log>
97 <log>
98 <!-- log(x)/log(2) = log2(x) -->
99 <value>2.0</value>
100 </log>
101 </div>
102
103 <!-- 20 % extra volume if one door is open, 32 % if both -->
104 <value>0.2</value>
105 </product>
106 <value>1.0</value>
107 </sum>
108 </expression>
109 </input>
110 <input>
111 <!-- 40 % extra volume if outside the aircraft -->
112 <value>1.4</value>
113 </input>
114 <output>
115 <property>/sim/model/c172p/sound/volume-boost-doors</property>
116 </output>
117 </filter>
118
119 <filter>
120 <name>Volume Boost Doors plus thunder1</name>
121 <type>gain</type>
122 <input>
123 <expression>
124 <product>
125 <property>/sim/model/c172p/sound/volume-boost-doors</property>
126 <property>/sim/model/c172p/sound/lightning/dist1</property>
127 <value>0.7142857142857143</value>
128 </product>
129 </expression>
130 </input>
131 <output>
132 <property>/sim/model/c172p/sound/volume-boost-doors-thunder1</property>
133 </output>
134 </filter>
135
136 <filter>
137 <name>Volume Boost Doors plus thunder2</name>
138 <type>gain</type>
139 <input>
140 <expression>
141 <product>
142 <property>/sim/model/c172p/sound/volume-boost-doors</property>
143 <property>/sim/model/c172p/sound/lightning/dist2</property>
144 <value>0.7142857142857143</value>
145 </product>
146 </expression>
147 </input>
148 <output>
149 <property>/sim/model/c172p/sound/volume-boost-doors-thunder2</property>
150 </output>
151 </filter>
152
153 <filter>
154 <name>Volume Boost Doors plus thunder3</name>
155 <type>gain</type>
156 <input>
157 <expression>
158 <product>
159 <property>/sim/model/c172p/sound/volume-boost-doors</property>
160 <property>/sim/model/c172p/sound/lightning/dist3</property>
161 <value>0.7142857142857143</value>
162 </product>
163 </expression>
164 </input>
165 <output>
166 <property>/sim/model/c172p/sound/volume-boost-doors-thunder3</property>
167 </output>
168 </filter>
169
170 <!-- Return a factor (>= 1.0) to boost the volume when left door is open -->
171 <filter>
172 <name>Volume Boost Left Door Factor</name>
173 <type>gain</type>
174 <input>
175 <condition>
176 <property>/sim/current-view/internal</property>
177 </condition>
178 <expression>
179 <sum>
180 <product>
181 <div>
182 <log>
183 <sum>
184 <min>
185 <sum>
186 <!-- Left door fully open is 1.0. Fully closed is 0.0 -->
187 <table>
188 <property alias="/params/doors/left"/>
189 <entry><ind>0.5</ind><dep>0.0</dep></entry>
190 <entry><ind>0.65</ind><dep>0.7</dep></entry>
191 <entry><ind>1.0</ind><dep>1.0</dep></entry>
192 </table>
193
194 <!-- Left window fully open is 1.0. Fully closed is 0.0 -->
195 <table>
196 <property alias="/params/windows/left"/>
197 <entry><ind>0.5</ind><dep>0.0</dep></entry>
198 <entry><ind>0.65</ind><dep>0.7</dep></entry>
199 <entry><ind>1.0</ind><dep>1.0</dep></entry>
200 </table>
201 </sum>
202 <value>1.0</value>
203 </min>
204
205 <!-- Prevents math domain error because log2
206 requires value >= 1.0.
207 -->
208 <value>1.0</value>
209 </sum>
210 </log>
211 <log>
212 <!-- log(x)/log(2) = log2(x) -->
213 <value>2.0</value>
214 </log>
215 </div>
216
217 <!-- 20 % extra volume if door is open -->
218 <value>0.2</value>
219 </product>
220 <value>1.0</value>
221 </sum>
222 </expression>
223 </input>
224 <input>
225 <!-- 40 % extra volume if outside the aircraft -->
226 <value>1.4</value>
227 </input>
228 <output>
229 <property>/sim/model/c172p/sound/volume-boost-left-door</property>
230 </output>
231 </filter>
232
233 <!-- Return a factor (>= 1.0) to boost the volume when right door is open -->
234 <filter>
235 <name>Volume Boost Right Door Factor</name>
236 <type>gain</type>
237 <input>
238 <condition>
239 <property>/sim/current-view/internal</property>
240 </condition>
241 <expression>
242 <sum>
243 <product>
244 <div>
245 <log>
246 <sum>
247 <min>
248 <sum>
249 <!-- Right door fully open is 1.0. Fully closed is 0.0 -->
250 <table>
251 <property alias="/params/doors/right"/>
252 <entry><ind>0.5</ind><dep>0.0</dep></entry>
253 <entry><ind>0.65</ind><dep>0.7</dep></entry>
254 <entry><ind>1.0</ind><dep>1.0</dep></entry>
255 </table>
256
257 <!-- Right window fully open is 1.0. Fully closed is 0.0 -->
258 <table>
259 <property alias="/params/windows/right"/>
260 <entry><ind>0.5</ind><dep>0.0</dep></entry>
261 <entry><ind>0.65</ind><dep>0.7</dep></entry>
262 <entry><ind>1.0</ind><dep>1.0</dep></entry>
263 </table>
264 </sum>
265 <value>1.0</value>
266 </min>
267
268 <!-- Prevents math domain error because log2
269 requires value >= 1.0.
270 -->
271 <value>1.0</value>
272 </sum>
273 </log>
274 <log>
275 <!-- log(x)/log(2) = log2(x) -->
276 <value>2.0</value>
277 </log>
278 </div>
279
280 <!-- 20 % extra volume if door is open -->
281 <value>0.2</value>
282 </product>
283 <value>1.0</value>
284 </sum>
285 </expression>
286 </input>
287 <input>
288 <!-- 40 % extra volume if outside the aircraft -->
289 <value>1.4</value>
290 </input>
291 <output>
292 <property>/sim/model/c172p/sound/volume-boost-right-door</property>
293 </output>
294 </filter>
295
296 <filter>
297 <name>Spray Wake Speed</name>
298 <type>noise-spike</type>
299 <input>
300 <property>/fdm/jsbsim/hydro/spray-wake-speed-kt-actual</property>
301 </input>
302 <output>
303 <property>/sim/model/c172p/sound/spray-wake-speed</property>
304 </output>
305
306 <!-- High rate of change to give a quick, but not abrupt cut off
307 of the pontoon wake sounds when the aircraft starts climbing
308 during a takeoff from the water.
309 -->
310 <max-rate-of-change>20.0</max-rate-of-change>
311 </filter>
312
313 <filter>
314 <name>Volume ramp for engine start</name>
315 <type>gain</type>
316 <input>
317 <expression>
318 <min>
319 <max>
320 <product>
321 <property>/engines/active-engine/rpm</property>
322 <value>0.001</value>
323 </product>
324 <value>0.0</value>
325 </max>
326 <value>1.0</value>
327 </min>
328 </expression>
329 </input>
330 <output>
331 <property>/sim/model/c172p/sound/volume-ramp-engine-start</property>
332 </output>
333 </filter>
334
335
336 <filter>
337 <name>Volume fader for idle engine sound</name>
338 <type>gain</type>
339 <input>
340 <expression>
341 <min>
342 <max>
343 <sum>
344 <product>
345 <property>/engines/active-engine/rpm</property>
346 <value>-0.000769231</value>
347 </product>
348 <value>1.923076923</value>
349 </sum>
350 <value>0.0</value>
351 </max>
352 <value>1.0</value>
353 </min>
354 </expression>
355 </input>
356 <output>
357 <property>/sim/model/c172p/sound/volume-fader-engine-idle</property>
358 </output>
359 </filter>
360
361 </PropertyList>