Delay in activations of instruments after a parameter change

Hello,
I’m having a problem in a project, where I’m using a command instrument to change a parameter which, in turn, is part of a trigger condition. The problem is that the instruments are triggered a bit later than on the beat.
This screenshot shows the setup:


The command instrument increments a parameter in 1, which accounts for the number of passes of the loop. This parameter, in turn, modulates an “intensity” parameter, with values from 0 to 4, which determine which instruments are activated for each pass. Since I want every intensity change precisely at the start of the loop, so instruments play through the end and new instruments are triggered right at the beginning, I’ve placed the command at the very beginning of the transition region.
However, I’ve encountered 2 problems:

  1. An untriggered region that should remain untriggered gets triggered during the green ‘source’ fade out phase. This green region is the tail of the audio file. Maybe this is by design, but somehow I feel this shouldn’t happen (that a green ‘source’ zone shouldn’t trigger the instrument if this wasn’t triggered before entering the transition zone).
  2. The newly triggered instruments at the start of the beat miss some miliseconds. That is, they are not immediately triggered and thus, the first note or transient is lost. The result is awful!

Is there any way to solve these 2 problems?

Thanks!

EDIT: I forgot to say that we’re on 2.02.15. I’m not updating, since our Unity project was already started with that version.

I have not been able to reproduce this issue, and am finding that untriggered instruments stay untriggered during a transition. How does this instrument determine whether it should play (Probability, Condition etc)?

I have also been unable to reproduce this. I see you are using the “Time” option in the time/beats display, so it’s possible that while the timeline appears to be in sync with the beat it is actually a little off. Can you please change to the “Beats” option:
image
Then add a tempo marker set to your asset’s BPM, and double check all of your marker, transitions etc are occurring on the beats you are expecting?

Hello,

Thank you for your answer. Yes, Time option was activated because I was doing some unrelated work before, but assets were actually in sync, as you can see here.


Both problems persists. It looks like the command instrument is taking a lower priority, and takes place some miliseconds afterwards. Thus, for those miliseconds, is like if the “Intensity” parameter were still at its previous value.
Would be possible to share with you privately a project that shows the problem?
Could it be related to the fact of being under 2.02.15?

This is expected behavior. The source region of a timeline (and the destination region, for that matter) represents a track-specific window onto the main timeline. If that section of the main timeline contains the start of an instrument that will be triggered if the timeline playback position enters it, it is entirely normal and expected for the playback position to trigger that instrument.

If you don’t want this to happen, you will have to modify the event to not trigger that instrument while performing a transition. Possible ways to do this include:

  • Giving that instrument trigger conditions such that it does not trigger under specific circumtances.
  • Removing the source region that from that track of the transition timeline.
  • Designing your transition such that there is no instrument on the section of the main timeline that corresponds to the source region of the transition timeline.

This is expected behavior, as it is physically impossible for an instrument to begin playing at the exact same moment that you issue the command for it to play.

The processing required to play a sound takes a non-zero amount of time. As such, any sound that is to be played needs to be scheduled a short time (typically about 40 ms) in advance of when it actually starts playing.

Scheduling delay is usually invisible, since FMOD is able to predict what sounds will soon need to play by looking at what’s ahead of the playback position on the timeline. However, because a game’s code can change a parameter’s value at any time, FMOD can’t predict parameter value changes - and so if you set a parameter less than 40 ms before a sound affected by that parameter’s value plays, FMOD won’t have time take the new parameter value into account before it happens. That’s what’s happening in this case: The command instrument is changing the parameter value at the same moment you want the instrument to start playing, giving FMOD zero time in which to schedule the change in what audio needs to play.

There are a number of ways to solve this issue, but the easiest would be to move the command instrument earlier on the timeline and to set the single instrument’s quantization settings to ensure it begins playing on a specific beat.