From 41a158af56f8ebd06b7a09aad0949a86f12bfcc7 Mon Sep 17 00:00:00 2001 From: Ellen Poe Date: Sat, 11 Sep 2021 23:57:09 -0700 Subject: Add AudioStreamRandomizer, replacing AudioStreamRandomPitch Add additional randomization options. --- doc/classes/AudioStreamRandomPitch.xml | 19 ------- doc/classes/AudioStreamRandomizer.xml | 90 ++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 19 deletions(-) delete mode 100644 doc/classes/AudioStreamRandomPitch.xml create mode 100644 doc/classes/AudioStreamRandomizer.xml (limited to 'doc/classes') diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml deleted file mode 100644 index 0f580699e9..0000000000 --- a/doc/classes/AudioStreamRandomPitch.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - Plays audio with random pitch shifting. - - - Randomly varies pitch on each start. - - - - - - The current [AudioStream]. - - - The intensity of random pitch variation. - - - diff --git a/doc/classes/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml new file mode 100644 index 0000000000..90471a033e --- /dev/null +++ b/doc/classes/AudioStreamRandomizer.xml @@ -0,0 +1,90 @@ + + + + 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. + + + + + + + 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 intensity of random pitch variation. A value of 1 means no variation. + + + The intensity of random volume variation. A value of 0 means no variation. + + + 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. + + + Pick a stream at random according to the probability weights chosen for each stream. + + + Play streams in the order they appear in the stream pool. + + + -- cgit v1.2.3