160
edits
(add a warning about LEBL) |
(new XML Sound expression support) |
||
Line 8: | Line 8: | ||
<!-- [[#FlightGear v2016.2 released|FlightGear v2016.2 released]]<br> --> | <!-- [[#FlightGear v2016.2 released|FlightGear v2016.2 released]]<br> --> | ||
[[#Revamping TerraSync|Revamping TerraSync]]<br> | [[#Revamping TerraSync|Revamping TerraSync]]<br> | ||
[[#Sound expressions|New Sound expressions]]<br> | |||
{{Newsletter-cover-header|In the hangar}}<br> | {{Newsletter-cover-header|In the hangar}}<br> | ||
[[#c172p|c172p]]<br> | [[#c172p|c172p]]<br> | ||
Line 80: | Line 81: | ||
</ref> | </ref> | ||
<references/> | |||
=== Sound expressions === | |||
New support for expressions was added in the volume and pitch sections of | |||
audio configuration files. | |||
It works as follows: | |||
# If an expression is found in <pitch/> or <volume/> it gets processed and the rest is ignored. | |||
# If an expression was defined in a volume or pitch definition of a sound-section then all other volume or pitch sections containing a property are ignored. | |||
# Sections with <internal/> are always processed so timed sounds are still available. | |||
< | This way you can add volume and/or pitch sections with an expression | ||
before all other sections and keep backward and forward compatibility. | |||
But you could, for example, make the expression section more complex for | |||
newer versions of FlightGear. | |||
An example would be: | |||
<small> | |||
<engine> | |||
<name>engine</name> | |||
<mode>looped</mode> | |||
<path>Aircraft/paraglider/Sounds/wasp.wav</path> | |||
<property>engines/engine/running</property> | |||
<volume version="2.0"> | |||
<expression> | |||
<product> | |||
<min> | |||
<max> | |||
<product> | |||
<property>engines/engine/mp-osi</property> | |||
<value>0.23</value> | |||
</product> | |||
<value>1.0</value> | |||
</max> | |||
<value>0.3</value> | |||
</min> | |||
<min> | |||
<max> | |||
<log> <property>orientation/alpha-deg</property> </log> | |||
<value>1.2</value> | |||
</max> | |||
<value>1.0</value> | |||
</min> | |||
</product> | |||
</expression> | |||
</volume> | |||
<pitch version="2.0"> | |||
<expression> | |||
<min> | |||
<max> | |||
<sum> | |||
<value>0.4</value> | |||
<product> | |||
<property>engines/engine/rpm</property> | |||
<value>0.0001</value> | |||
</product> | |||
</sum> | |||
<value>1.2</value> | |||
</max> | |||
<value>0.4</value> | |||
</min> | |||
</expression> | |||
</pitch> | |||
<!-- backwards compatibility --> | |||
<volume> | |||
<property>engines/engine/mp-osi</property> | |||
<factor>0.23</factor> | |||
<min>0.3</min> | |||
<max>1.0</max> | |||
</volume> | |||
<volume> | |||
<property>orientation/alpha-deg</property> | |||
<type>log</type> | |||
<min>1.0</min> | |||
<max>1.2</max> | |||
</volume> | |||
<pitch> | |||
<property>engines/engine/rpm</property> | |||
<factor>0.0001</factor> | |||
<min>0.4</min> | |||
<max>1.2</max> | |||
<offset>0.4</offset> | |||
</pitch> | |||
<!-- backwards compatibility --> | |||
</engine></small> | |||
== In the hangar == | == In the hangar == |
edits