1
0
Fork 0

docs: XML sound changes

This commit is contained in:
Richard Harrison 2021-10-18 15:28:09 +02:00
parent b5b9568bc7
commit 0dcbfdbf53

View file

@ -152,20 +152,26 @@ Configuration description:
for each <volume> element: for each <volume> element:
(a) Use either <property> or <internal> as the base value (a) if an <expression> is defined:
(b) apply any <type> function to the value and the value/result is >= 0
(c) value = value * factor total_volume = total_volume * expression_value
(d) value = max(value, <max>) process next <volume> element
(e) value = min(value, <min>) (b) Use either <property> or <internal> as the base value
(f) if <factor> was originally negative then use (c) apply any <type> function to the value
offset-mode otherwise use normal mode (d) value = value * abs(factor)
(e) value = max(value, <max>)
(f) value = min(value, <min>)
(g) if <factor> was originally negative then use
subtract-mode otherwise use normal mode
(normal-mode) (normal-mode)
if (value >= 0)
total_offset = total_offset + offset total_offset = total_offset + offset
total_volume = total_volume * value total_volume = total_volume * value
(offset-mode) (subtract-mode)
value = value + offset value = value + offset
if (value >= 0)
total_volume = total_volume * value total_volume = total_volume * value
Then after processing all of the <volume> blocks the total Then after processing all of the <volume> blocks the total
@ -173,6 +179,38 @@ Configuration description:
volume = total_offset + total_volume; volume = total_offset + total_volume;
If volume exceeds 1 it will be clipped to 1.
The pitch elements are processed as follows
total_offset = 0
total_pitch = 1.0
for each <pitch> element:
(a) if an <expression> is defined:
total_pitch = total_pitch * expression_value
process next <pitch> element
(b) Use either <property> or <internal> as the base value
(c) apply any <type> function to the value
(d) value = value * abs(factor)
(e) value = max(value, <max>)
(f) value = min(value, <min>)
(g) if <factor> was originally negative then use
subtract-mode otherwise use normal mode
(normal-mode)
total_offset = total_offset + offset
total_pitch = total_pitch * value
(subtract-mode)
total_pitch = offset - value
Then after processing all of the <pitch> blocks the total
pitch will be determined by
pitch = total_offset + total_pitch;
<expression> <expression>
Defines the AN SGExpression to be used to calculate the volume Defines the AN SGExpression to be used to calculate the volume
or pitch. When an expression is used all other tags in the or pitch. When an expression is used all other tags in the
@ -187,13 +225,13 @@ Configuration description:
Defines the multiplication factor for the property value. Defines the multiplication factor for the property value.
If factor is negative then it will cause the calculation for If factor is negative then it will cause the calculation for
this element to use the offset-mode as defined above. The this element to use the subtract-mode as defined above. The
negative value for the factor will be converted to positive negative value for the factor will be converted to positive
<offset> <offset>
The offset elements will be summed and added to the to the The offset elements will be summed and added to the to the
calculated volume from all of the volume blocks, except when calculated volume from all of the volume blocks, except when
using offset-mode in which case the offset is directly added using subtract-mode in which case the offset is directly added
to the calculated volume within each volume block to the calculated volume within each volume block
<internal> <internal>