Wraps a pool of audio streams with pitch and volume shifting.
Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback.
Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool.
Returns the stream at the specified index.
Returns the probability weight associated with the stream at the given index.
Move a stream from one index to another.
Remove the stream at the specified index.
Set the AudioStream at the specified index.
Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes.
- Controls how this AudioStreamRandomizer picks which AudioStream to play next.
- The largest possible frequency multiplier of the random pitch variation. Pitch will be randomly chosen within a range of [code skip-lint]1.0 / random_pitch[/code] and [code skip-lint]random_pitch[/code]. A value of [code]1.0[/code] means no variation. A value of [code]2.0[/code] means pitch will be randomized between double and half. [b]Note:[/b] Setting this property also sets [member random_pitch_semitones].
- The largest possible distance, in semitones, of the random pitch variation. A value of [code]0.0[/code] means no variation. [b]Note:[/b] Setting this property also sets [member random_pitch].
- The intensity of random volume variation. Volume will be increased or decreased by a random value up to [code skip-lint]random_volume_offset_db[/code]. A value of [code]0.0[/code] means no variation. A value of [code]3.0[/code] means volume will be randomized between [code]-3.0 dB[/code] and [code]+3.0 dB[/code].
- The number of streams in the stream pool.
Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. If only 1 sound is present in the pool, the same sound will always play, effectively allowing repeats to occur.
Pick a stream at random according to the probability weights chosen for each stream. If only 1 sound is present in the pool, the same sound will always play.
Play streams in the order they appear in the stream pool. If only 1 sound is present in the pool, the same sound will always play.