# Capture microphone input detect its loudness

**URL:** <https://qa.fmod.com/t/capture-microphone-input-detect-its-loudness/21292>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [February 27, 2024, 5:43pm UTC](https://qa.fmod.com/t/capture-microphone-input-detect-its-loudness/21292 "2024-02-27T17:43:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zacoriot](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@Zacoriot](https://qa.fmod.com/u/Zacoriot)\
**Post date:** [February 27, 2024, 5:43pm UTC](https://qa.fmod.com/t/capture-microphone-input-detect-its-loudness/21292/1 "2024-02-27T17:43:52Z")

</div>

Hey!

So I am currently working on a project where your characters light source intensity is controlled by how loud you are being in your microphone.

The trouble is, I cannot find anywhere a straight forward answer or tutorial help. I am not a audio guy at all so there are a lot of terms used that I simply do not understand and there for cannot work out how to achieve such a system.

If someone is able to help me write a script that will capture the microphone input and get its loudness that would help me out immensely!

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [February 29, 2024, 12:18am UTC](https://qa.fmod.com/t/capture-microphone-input-detect-its-loudness/21292/2 "2024-02-29T00:18:06Z")

</div>

Hi,

We have two script examples that outline how to do each of these mechanics individually:

- Microphone input: [Unity Integration | Scripting Examples - Record](https://fmod.com/docs/2.02/unity/examples-record.html)
- Loudness value: [Unity Integration | Scripting Examples - DSP capture](https://fmod.com/docs/2.02/unity/examples-dsp-capture.html). You can use the value of `mDataBuffer` as the loudness value.

Hope this helps!
