574
edits
(→Configuration tags: added random tag for pitch) |
(→Configuration tags: Volume and pitch tags are now indented) |
||
Line 159: | Line 159: | ||
: Volume final output can range from 0 to 1. 1 represents full volume and 0 is silence. | : Volume final output can range from 0 to 1. 1 represents full volume and 0 is silence. | ||
; <code><expression></code> | :; <code><expression></code> | ||
: Defines an expression, and will replace all other tags in this volume/pitch tag. | :: Defines an expression, and will replace all other tags in this volume/pitch tag. | ||
; <code><property></code> | :; <code><property></code> | ||
: Defines which property supplies the value for the calculation. | :: Defines which property supplies the value for the calculation. | ||
: Either a <property> or an <internal> should be defined. If none is defined, the property reverts to its default. For volume this is 0, meaning the sound will not be audible at all. | :: Either a <property> or an <internal> should be defined. If none is defined, the property reverts to its default. For volume this is 0, meaning the sound will not be audible at all. | ||
: The value is treated as a floating point number. | :: The value is treated as a floating point number. | ||
; <code><internal></code> | :; <code><internal></code> | ||
: Defines which internal variable should be used for the calculation. | :: Defines which internal variable should be used for the calculation. | ||
: The value is treated as a floating point number. | :: The value is treated as a floating point number. | ||
: The following internals are available at this time: | :: The following internals are available at this time: | ||
:; dt_play | ::; dt_play | ||
:: The number of seconds since the sound started playing. | ::: The number of seconds since the sound started playing. | ||
:; dt_stop | ::; dt_stop | ||
:: The number of seconds after the sound has stopped. | ::: The number of seconds after the sound has stopped. | ||
; <code><delay-sec></code> | :; <code><delay-sec></code> | ||
: Delay after which the sound starts playing. | :: Delay after which the sound starts playing. | ||
: This is useful to let a property start two sounds at the same time, where the second is delayed until the first stopped playing. | :: This is useful to let a property start two sounds at the same time, where the second is delayed until the first stopped playing. | ||
; <code><type></code> | :; <code><type></code> | ||
: Defines the function that should be used upon the property before it is used for calculating the net result: | :: Defines the function that should be used upon the property before it is used for calculating the net result: | ||
:; lin | ::; lin | ||
:: Linear handling of the property value. This is the default. | ::: Linear handling of the property value. This is the default. | ||
:; ln | ::; ln | ||
:: Convert the property value to a natural logarithmic value before scaling it. | :: Convert the property value to a natural logarithmic value before scaling it. | ||
:: Anything below 1 will return zero. | ::: Anything below 1 will return zero. | ||
:; log | ::; log | ||
:: convert the property value to a true logarithmic value before scaling it. (log base 10) | ::: convert the property value to a true logarithmic value before scaling it. (log base 10) | ||
:: Anything below 1 will return zero. | ::: Anything below 1 will return zero. | ||
:; inv | ::; inv | ||
:: Inverse linear handling (1/x). | ::: Inverse linear handling (1/x). | ||
:; abs | ::; abs | ||
:: Absolute handling of the value (always positive). | :: Absolute handling of the value (always positive). | ||
:; sqrt | ::; sqrt | ||
:: Calculate the square root of the absolute value before scaling it. | ::: Calculate the square root of the absolute value before scaling it. | ||
; <code><factor></code> | :; <code><factor></code> | ||
: Defines the multiplication factor for the property value. | :: Defines the multiplication factor for the property value. | ||
: A special condition is when scale is defined as a negative value. In this case the result of |<scale>| * <property) will be subtracted from <default> | :: A special condition is when scale is defined as a negative value. In this case the result of |<scale>| * <property) will be subtracted from <default> | ||
; <code><offset></code> | :; <code><offset></code> | ||
: The initial value for this sound. | :: The initial value for this sound. | ||
: This value is also used as an offset value for calculating the end result. | :: This value is also used as an offset value for calculating the end result. | ||
; <code><random></code> | :; <code><random></code> | ||
: Add a bit of randomness to the offset. Only used for pitch. | :: Add a bit of randomness to the offset. Only used for pitch. | ||
; <code><min></code> | :; <code><min></code> | ||
: Minimum allowed value. | :: Minimum allowed value. | ||
: This is useful if sounds start to sound funny. Anything lower will be truncated to this value. | :: This is useful if sounds start to sound funny. Anything lower will be truncated to this value. | ||
; <code><max></code> | :; <code><max></code> | ||
: Maximum allowed value. | :: Maximum allowed value. | ||
: This is useful if sounds gets to loud. Anything higher will be truncated to this value. | :: This is useful if sounds gets to loud. Anything higher will be truncated to this value. | ||
: Keep in mind that min & max are applied first, then offset. So for example if min = 0, max = 0.5 and offset = 1.0, then the resulting values will range 1 to 1.5. | :: Keep in mind that min & max are applied first, then offset. So for example if min = 0, max = 0.5 and offset = 1.0, then the resulting values will range 1 to 1.5. | ||
; <code><position></code> | ; <code><position></code> |
edits