randomize Sound
Make a new sound similar to the original one but with some variations.
music.randomizeSound(music.createSoundEffect(WaveShape.Sine, 5000, 0, 255, 0, 500, SoundExpressionEffect.None, InterpolationCurve.Linear))
The resulting sound effect will randomize some of the parameters of the original sound effect to create differences from the original sound.
Parameters
- sound: the original sound-effect.
Returns
- a new sound-effect with some differences from the oringal sound.
Example
Randomize and play a sine wave sound effect.
music.play(music.randomizeSound(music.createSoundEffect(WaveShape.Sine, 5000, 0, 255, 0, 500, SoundExpressionEffect.None, InterpolationCurve.Linear)), music.PlaybackMode.UntilDone)