# How to get the decibel of sound when play sound?

**URL:** <https://qa.fmod.com/t/how-to-get-the-decibel-of-sound-when-play-sound/14376>\
**Category:** FMOD Engine\
**Created:** [February 18, 2019, 3:36am UTC](https://qa.fmod.com/t/how-to-get-the-decibel-of-sound-when-play-sound/14376 "2019-02-18T03:36:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![qq200600](https://avatars.discourse-cdn.com/v4/letter/q/c77e96/32.png) [@qq200600](https://qa.fmod.com/u/qq200600)\
**Post date:** [February 18, 2019, 3:36am UTC](https://qa.fmod.com/t/how-to-get-the-decibel-of-sound-when-play-sound/14376/1 "2019-02-18T03:36:02Z")

</div>

Because I want to make the Sonogram.  
 ![CC4BA8CE-0DCF-4E74-AAC2-632DBE3CBA6B](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/1X/3189ffe8c0d1c4327af7355c6efd419e4f39c9c5.jpeg)

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [February 24, 2019, 10:44pm UTC](https://qa.fmod.com/t/how-to-get-the-decibel-of-sound-when-play-sound/14376/2 "2019-02-24T22:44:00Z")

</div>

You can find an example [here](https://qa.fmod.com/t/getting-spectrum-of-master-channel-in-unity/12579), although the principal is still the same.

You will need to get the [FFT data](https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_DSP_PARAMETER_FFT.html#/) from the sound each time you want to update the values, values inside the FFT data are typically between 0 and 1.0. Then you will need to convert it to decibels to a value between -80 and 0 using:

> db = 20 \* log10(amplitude)

Where amplitude is the value from the FFT data, which is the volume as a percentage.
