# Getting the RMS values for fmod event instances

**URL:** <https://qa.fmod.com/t/getting-the-rms-values-for-fmod-event-instances/22248>\
**Category:** Unreal Engine\
**Created:** [October 31, 2024, 3:19pm UTC](https://qa.fmod.com/t/getting-the-rms-values-for-fmod-event-instances/22248 "2024-10-31T15:19:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luurio](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@Luurio](https://qa.fmod.com/u/Luurio)\
**Post date:** [October 31, 2024, 3:19pm UTC](https://qa.fmod.com/t/getting-the-rms-values-for-fmod-event-instances/22248/1 "2024-10-31T15:19:00Z")

</div>

I have several actors with a FMODAudio component that change size based on the volume of the fmod event. I do this with a custom BP node that takes the FMODAudio component object reference and returns the RMS value. My problem is that all of the actor sizes are changing based on the loudest sound that’s getting played by Fmod, and not by the respected fmod event instance.

```auto
float UFmod_BP_Function_Library::GetFMODInstanceRMS(UFMODAudioComponent* FMODInstance)
{
    
    FMOD::ChannelGroup* ChanGroup = nullptr;
    FMODInstance->StudioInstance->getChannelGroup(&ChanGroup);
    if (ChanGroup)
    {
        FMOD::DSP* ChanDSP = nullptr;
        ChanGroup->getDSP(FMOD_CHANNELCONTROL_DSP_HEAD, &ChanDSP);
        if (ChanDSP)
        {
            ChanDSP->setMeteringEnabled(false, true);
            FMOD_DSP_METERING_INFO Info = {};
            ChanDSP->getMeteringInfo(nullptr, &Info);

            return Info.rmslevel[0];
        }
    }

    return 0;
}

```

---

<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:** [November 7, 2024, 1:13am UTC](https://qa.fmod.com/t/getting-the-rms-values-for-fmod-event-instances/22248/2 "2024-11-07T01:13:05Z")

</div>

I was able to use your code in a static blueprintable function on multiple blueprints, using different events, and have them work independently from each other.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c24b1fbbaa4092e6fd7221e5021e873a069984fd.png)

---

<div class="post-metadata">

**Author:** ![Luurio](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@Luurio](https://qa.fmod.com/u/Luurio)\
**Post date:** [November 8, 2024, 12:58am UTC](https://qa.fmod.com/t/getting-the-rms-values-for-fmod-event-instances/22248/3 "2024-11-08T00:58:08Z")

</div>

Your right. Turns out the issue was with a separate function that processed the outputted rms value. The issue with the other function was that it wasn’t instance independent.
