Sustain point not working in-game

Hi,

I have an event with a sustain point to run a snapshot (reduces music volume) while the voice is playing.

When I play it with FMOD Studio, this works fine: The cursor stops at the sustain point until the voice finishes playing, then it continues, and the short debug event plays and the snapshot fades out.

When I deploy that on my Raspberry Pi, playback just ignores the sustain point for any audio file in the programmer instrument (and yes, I tested the same files).

I tried to profile it to see what the Voiceover Hint parameter is doing, but it does not show up anywhere in the profiler:

This used to work for years until some weeks ago when I updated FMOD API to a newer version (2.02.18 to 2.03.05 I think). I’m not sure if that caused the sustain point to stop, I might also have changed other things, but it is an option.

Anyway, how do I get it to work again?

This is my parameter configuration:

Thanks a lot for your help,
Simon

I’m guessing that’s because it’s a local parameter. The values of local parameters are event instance-specific, so to see them in the profiler you must first select the specific event instance whose parameter value you want to see by clicking on that event instance’s lifespan in the profiler. Doing so will cause that event instance’s parameter values to be displayed in both the deck and the overview pane of the profiler window. (In your screenshot, for example, you appear to have selected instance B of the “Büro” event, which has a local parameter called “Progress Buero.”)

Since the parameter and sustain point work as expected when you audition the event in FMOD Studio, and FMOD Studio uses the same version of the FMOD Engine under-the-hood that your game does, it is likely that the parameter and sustain point are working correctly in your game as well, but that the value of the parameter is for some reason not being set correctly. The first step to make it work correctly is therefore to work out how and when the parameter’s value is being set. You can check the value of a local parameter by viewing it in the profiler as I described above, or by calling Studio::EventInstance::getParameterByName or Studio::EventInstance::getParameterByID.

Wow! The lines in the lifespan graph are clickable! That absolutely makes so much sense!

So, here I can see that Voiceover Hint remains at 0.

When I audition today in FMOD Studio, I actually have the same effect, Voiceover Hint remains at 0. So there must be something wrong with it. The Volume sidechain is connected to Voiceover Hint, what else can be wrong for that not to work?

Thanks a lot for your help, joseph – I appreciate that a lot!

I briefly tested it by running the FMOD API service locally and connecting to it, same result, the parameter remains at 0. So I tried with a new parameter. I followed these steps:

  1. Add parameter sheet on the effect to give me a local parameter
  2. Click on the voiceover track so I can see the effect list on the bottom, then Add Sidechain > New Sidechain
  3. In the Parameters Browser, select the effect, right-click on the volume box, and Add Modulation > Sidechain
  4. Back in the effect list, right-click on the Sidechain effect area (not on one of the controls though) and Connect to Modulator > Parameter: Volume Voiceover New

According to my notes, that should do it. However, the new parameter still does not change with input volume. I also added a test track in the screenshot to make sure it is not the programmer instrument which causes the issue.

Looking at your screenshot, the modulator’s “amount” property is set to 0. The “amount” property represents the maximum amount of adjustment the modulator can apply to the modulated property. An “amount” of 0 will therefore result in the modulator never adjusting the modulated property.

However, that only explains the behavior of the modulator in your new screenshot, not that of the original event that started this thread, whose “Amount” property was set to 1 in the screenshot you posted.

When I try and recreate the behavior you describe here, I fail; the value of the parameter changes as expected. I must therefore be doing something differently to you. Are you able to upload a project that exhibits this issue to the uploads tab of your profile page? Being able to see your project in person may help me work out what’s causing the problem.

Hi Joseph,

I tested setting Amount to 1, it does not make a difference though.

Can I PM you to give you access to the project directly?

Our forum’s DM system isn’t well-equipped to handle large file transfers and isn’t integrated with our support ticketing system, so uploading projects to the uploads tab of your profile page is generally a better way of giving us access to your content.

Thanks – uploaded!

I can observe something else that is very confusing. After making sure that amount and threshold are correct in the parameter:

it works locally. When I deploy it and profile it, it does not work. Also, the recorded value of the parameter stays at 0 until I start observing it:2.

  1. I start the event
  2. In the profiler, I hurry to select the event instance and then select “Show Graph” for the Volume Voiceover New parameter
  3. From that point on, the value of the parameter looks correct, but until that, it stays at 0

If I then move the sustain point a bit so I can start tracing the Voiceover parameter before it is hit, it also works on the deployed version. If I don’t trace the Voiceover parameter, the sustain point is ignored.

This looks like a Schrödinger effect. If I observe what is going on, it works, if I don’t observe, it fails.

edit: I exported the trace and also uploaded it on my profile.

edit 2: On 2.02, it works normally (just reverted banks and API to an older version), so something broke in 2.03.

After examining your project, I’ve been able to determine that this behavior is caused by a bug that was introduced in FMOD Studio version 2.03.02 and fixed in FMOD Studio version 2.03.08. You should be able to get the behavior you want both in the FMOD Engine and FMOD Studio by updating to the lastest versions.

Alternatively, if you’d prefer not to update your FMOD version, a variety of other possible workarounds are available.

The bug you observed is actually not specific to sidechain modulators; rather, it affects all modulators on any parameter instance that meets this specific combination of conditions:

  • The parameter’s initial value must be 0.
  • The parameter must be subject to modulation.
  • The parameter must not be subject to any automation.
  • The parameter instance’s value must not have been set by game code since the parameter instance was created.

If the parameter ceases to meet any of these conditions, modulators on that parameter will start working. This means that possible workarounds for this issue include the following:

  • Set the affected parameters’ initial values to anything other than 0. Setting them to 0.0001 will work, for example.
  • Automate the parameter’s value on at least one other parameter. It doesn’t matter if the automation curve is just a flat line.
  • Use your game’s code to set the value of the parameter immediately after creating the instance of the event.

In any case, you should now be able to get the behaviour you want. Please let us know if you run into any further troubles.

Thanks joseph for this detailed investigation and for the fix! I can update to 2.03.08, just tested it today (with a new, non-migrated project), and it works fine!