> For the complete documentation index, see [llms.txt](https://man572142s-organization.gitbook.io/broaudio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://man572142s-organization.gitbook.io/broaudio/core-features/library-manager/design-the-sound/randomization.md).

# Randomization

## Introduction

To create a game with exceptional immersion and rich, vivid sound effects, using a vast sound library is one option. However, finding suitable and sufficiently varied sounds can be challenging, and employing numerous audio files can significantly increase the game's size. Therefore, the ideal approach is simply to use randomization.

## How To Use?

BroAudio provides numerous randomization methods, all of which can be configured in the [LibraryManager](/broaudio/core-features/library-manager.md) without writing any code.

### Audio Clips

If an AudioEntity has more than one clip. You can set its [PlayMode](/broaudio/core-features/library-manager/design-the-sound.md#playmode) to 'Random'. It will randomly select one AudioClip based on its weight when it's played. Probability is calculated as *<mark style="background-color:green;">Weight/Total sum of all weights.</mark>*

### Volume

Toggle the \[RND] button next to the '[Master Volume](/broaudio/core-features/library-manager/design-the-sound.md#master-volume)' setting in AudioEntity, and set the random range.

### Pitch

Toggle the \[RND] button next to the '[Pitch](/broaudio/core-features/library-manager/design-the-sound.md#pitch)' setting in AudioEntity, and set the random range.
