Built-in parameters

Hi,
I’m experiencing weird behavior with built-in parameters. When I add it to event, altought it applies the automation which is set, it doesen’t update its value either in sandbox or engine (GetParameter() function)!? I tried also with Examples.fspro FMOD project and new UE4 project. The result is identical?

UE4 4.22.3
FMOD plugin 2.00.06

Best, Dino

All my tests so far have been working as expected.
Can you share your steps to reproduce the issue?

Sure,

  1. Create new project.
  2. In FMOD studio create 3D event, add built-in parameter Distance
  3. Add some automation to Distance parameter (I used PitchShifter)
  4. Create new actor class, and add FMODAudio component to it, and set the created event in the component.
  5. Add actor class to scene, and either in class BP or Level BP, in tick call GetParameter(Distance) and PrintString the value.

Result:

  • Although the pitch automation is applied to the event, in the editor the logged value is always 0.
  • The same behavior is happening in the sandbox when you add the event. Distance parameter is always 0 no matter on distance from the listener in the sandbox.

Expected behavior:

  • When you get the parameter in the editor or when you move the event in the sandbox that value of the Distance parameter is updated.

I experienced same behavior on all build in parameters.

Best, Dino

It looks like this is a bug in the integration, I have raised a task to fix this for an upcoming release.

The problem is that FMODAudioComponent::getParameter calls EventInstance::getParameterByName but uses the value and not the finalvalue.

Automatic parameters always return value as 0 since they can never have their value set from the public API.

The final combined value returned in finalvalue combines the user value set using the public API with the result of any automation or modulation. The final combined value is calculated asynchronously when the Studio system updates.