Mostly Harmless

Difference between revisions of "UE2:ProceduralSound (UT2004)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (volume modifications don't seem to be used, added pitch modification info)
(ProcSound in SoundGroup yes, vice versa no)
 
Line 4: Line 4:
 
| parent2 = Object
 
| parent2 = Object
 
}}
 
}}
Wrapper for other {{cl|Sound}}s or {{cl|SoundGroup}}s to randomize playback pitch within certain limits. Unlike the properties suggest, volume modification doesn't seem to be applied. Pitch modification is calculated as percentage of original pitch, similar to the following expression:
+
Wrapper for other {{cl|Sound}}s to randomize playback pitch within certain limits. Unlike the properties suggest, volume modification doesn't seem to be applied. Pitch modification is calculated as percentage of original pitch, similar to the following expression:
  
 
  1.0 + (PitchModification / 100.0) + ({{tl|FRand||Object static native functions}}() * PitchVariance / 100.0)
 
  1.0 + (PitchModification / 100.0) + ({{tl|FRand||Object static native functions}}() * PitchVariance / 100.0)
 +
 +
Note that wrapping a {{cl|SoundGroup}} in a ProceduralSound doesn't seem to work. If you want to randomize the pitch of sounds in a SoundGroup, you will have to create ProceduralSounds for all sounds in the group and list these in the {{tl|Sounds|SoundGroup}} array.
  
 
==Properties==
 
==Properties==

Latest revision as of 14:31, 24 December 2013

UT2004 Object >> Sound >> ProceduralSound
Package: 
Engine
This class in other games:
UT2003

Wrapper for other Sounds to randomize playback pitch within certain limits. Unlike the properties suggest, volume modification doesn't seem to be applied. Pitch modification is calculated as percentage of original pitch, similar to the following expression:

1.0 + (PitchModification / 100.0) + (FRand() * PitchVariance / 100.0)

Note that wrapping a SoundGroup in a ProceduralSound doesn't seem to work. If you want to randomize the pitch of sounds in a SoundGroup, you will have to create ProceduralSounds for all sounds in the group and list these in the SoundGroup.Sounds array.

Properties[edit]

Property group 'Sound'[edit]

BaseSound[edit]

Type: Sound

The sound to modify.

PitchModification[edit]

Type: float

Base pitch modification in percent of original pitch. Typically this value is a negative whole number with half the absolute value of PitchVariance if the modified pitch should be spread around the original pitch, e.g. -5.

PitchVariance[edit]

Type: float

Pitch randomization in percent of original pitch. Typically this value is a positive whole number with twice the absolute value of PitchModification if the modified pitch should be spread around the original pitch, e.g. 10.

VolumeModification[edit]

Type: float

Unused?

VolumeVariance[edit]

Type: float

Unused?

Internal variables[edit]

RenderedPitchModification[edit]

Type: float

Modifiers: transient

Currently used pitch modification.

RenderedVolumeModification[edit]

Type: float

Modifiers: transient

Unused?