# Fmod volume randomization calculation

**URL:** <https://qa.fmod.com/t/fmod-volume-randomization-calculation/15681>\
**Category:** FMOD Engine\
**Created:** [April 23, 2020, 10:32am UTC](https://qa.fmod.com/t/fmod-volume-randomization-calculation/15681 "2020-04-23T10:32:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siera](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Siera](https://qa.fmod.com/u/Siera)\
**Post date:** [April 23, 2020, 10:32am UTC](https://qa.fmod.com/t/fmod-volume-randomization-calculation/15681/1 "2020-04-23T10:32:53Z")

</div>

Hey,

I’m porting an fmod designer .fdp file and need some clarification an some values.

volume\_randomization:  
Range: -60db -\> 0db

So how does Fmod use this value?

**Example:**  
**Volume: 10db**  
**Volume\_Randomization: -30**

**randomValue = random(0, -30)**  
**volume = Volume + randomValue**

**OR**

**randomValue = random(+30, -30)**  
**volume = volume + randomValue**

The same question also for pitch\_randomization.

Thx alot

---

<div class="post-metadata">

**Author:** ![thuan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/thuan/32/261_2.png) [@thuan](https://qa.fmod.com/u/thuan)\
**Post date:** [April 24, 2020, 4:14am UTC](https://qa.fmod.com/t/fmod-volume-randomization-calculation/15681/2 "2020-04-24T04:14:47Z")

</div>

Hi,

Using the example you provided, the volume would be a value between -20dB to 10dB.

Pitch works differently and uses the second approach. So if the current pitch is 0 semitone with a pitch\_randomization of 5 semitones, the ouput would be a value between -5 semitones (lower pitch) and 5 semitones (higher pitch).
