Distance parameter sets to max on pause

I’ve been having this issue for a while (FMOD Studio 2.02.17) using the in-built Distance parameter. If I preview an event, whenever the event stops by either hitting spacebar or reaching the right edge of the last instrument the distance parameter is then set to whatever the Max Distance value is. So if I quickly need to listen to the event again I have to manually set the distance parameter to 0. Otherwise all the attenuation and LPF effects I have in the master are applied to the event.

Is there any way to fix this?

Thanks

I haven’t been able to reproduce this behavior; when I test here, the distance parameter’s value doesn’t change when an event pauses or reaches a natural end. I must therefore be missing some important part of the steps required to reproduce this issue.

Could you describe the contents of your event and your process for auditioning it in more detail? Does the event contain any command instruments, and are you adjusting the position of the emitter in the 3D preview widget while auditioning?

I think I may have found the culprit! This was happening in events with a chain FX preset so I detached the whole chain and started deleting effects to try and narrow it down. I think its the Distance (Normalised) parameter. The only things I have in this event now is a MB EQ with a Distance parameter (Built-in: Distance) automating a LPF freequency, and a Gain effect with Distance Normalised automating the volume. The regular Distance parameter is still resetting to the max distance when pausing until I delete that Gain effect, therefore removing the parameter from the event entirely.

To answer your questions:
-No command instruments present
-Not adjusting the position of in the 3D preview
-When resetting the Distance to preview the event I click and drag the Distance parameter at the top back to 0.

Interesting. What’s the range of the non-normalized distance parameter, and what are the min and max distance values of the event?

0-100 for the normal distance parameter.

The min max values are more complicated. I’ve just tried debugging this so i’ll give you examples of what I found:

Min/Max 25/75

If I hit play when the distance param is being previewed…:

-below 25 it jumps up to 25 when paused.
-between 25 and 75 and pause nothing changes.
-above the max distance of 75 it’ll jump down to 75 when paused.

Min/Max: 0/50

Only happens if the distance param is above 50.

Min/Max: 50/50

Parameter resets to 50 at any value.

Managed to replicate this behaviour by making a new event with no content and 2 gain effects automated by distance and distance (norm) respectively. I changed the min/max distances up a bunch too and it seems to follow the same behaviour described above.

Thanks for the clarifying information!

I’ve been able to reproduce the behavior you described, and I think I understand what’s happening: A parameter’s value is clamped to its range, so setting one distance parameter’s value to anything outside of that range will cause it to clamp to the closest value within its range. Since the distance and distance (normalized) parameters both measure distance from the listener, setting the value of either will set the value of the other.

What I don’t understand is why this is happening when the event finally stops after receiving a stop command. An event’s stopping shouldn’t set any of its parameter values, and so shouldn’t trigger the clamping behavior; its happening when the event is stopped is almost certainly a bug. Plus, the clamping behavior should only affect the parameter with the higher max/lower min distance when the other parameter is the one being set, but here it seems to affect both parameters as if they were each setting the other in immediate succession, and that definitely shouldn’t be happening.

I’ve added the issue to our bug tracker, so it should be fixed in an upcoming release of FMOD Studio.

In the mean time, I can only suggest working around this issue. Fortunately, since it only affects events whose multiple distance parameters have different ranges, and only affects event instances at the moment when they finally stop, it’s unlikely to affect in-game behavior under normal circumstances and should be fairly easy to work around in the rare cases when it does.

Yep! Thats what our programmer thought it might be. Its not a big issue to be honest and it hasn’t affected anything in-game as far as we can tell. Just a minor annoyance when previewing.
Thanks for looking into it!