Inconsistent fade envelopes

Why do fade envelopes like these produce inconsistent playback each time I click Play in the Studio app? Is there anything that can be done to fix this? I’m using FMOD 2.02.02, Windows 10.

image

1 Like

When I test here, playback of synchronous single instruments with fade-in curves appears to be consistent from one playback to the next.

Is there any more information you can give us about this issue? For example, exactly how does the instrument’s behavior change from one playback to the next? Are any of the instrument’s properties subject to modulation or automation? What is the instrument’s start offset property set to?

I also always noticed some inconsistencies on the transients at the very beginning after a transition. I first thought if was related to transitions, but as Shredd spotted, it’s probably rather related to the fades I include in the transition timeline.
I just investigated further and it’s quite easy to spot. Here it is: a really short sound, a really short fade in the transition timeline. The sound is never the same, or even don’t play at all.
I should have displayed time rather than beats. For info, the fade is 30 ms duration and the sound 14 ms.

1 Like

Or even with a fade directly on the instrument, that’s obvious too:

1 Like

I think @Alcibiade already nailed it with their videos, thanks! Here’s mine with a kick drum:

So essentially, I think the fade-in length keeps changing randomly. And sometimes it sounds like the very first milliseconds of the transient are let through, too, as if the fade-in curve wasn’t there. Just to be clear, this happens the same way whether I click Play manually every time, or loop it.

I was not using modulation or start offset in this example, nor my earlier screenshot. Just dragged and dropped the sample in and disabled the spatializer.

This is most easily heard when using very short sounds, but it happens regularly with any length of audio clip.

What audio hardware are you using @joseph? I shot the video while I was using just WASAPI drivers, but I tested with my audio interface’s ASIO drivers (SSL+2), and it was the same.

1 Like

All fades and automation in FMOD are basically quantized to the frame rate. If the fades are very short it’s mostly a matter where the steps occur. You can hear the steppiness very clearly if you try fading a pure sine wave tone in and out.

If you increase FMOD’s internal frame rate from the API you get smoother fades and automation but it increases the performance cost.

AFAIK sample-accurate fades and automation are in the FMOD development backlog but these would come at a performance cost as well.

1 Like

Interesting. But frame rate of what, exactly? The FMOD Studio app itself?

The FMOD developers will need to answer that one. Update length steps, mixing blocks, not sure what the exact rate is.

Older thread:

1 Like

Can you describe how you get the playback to be consistent on your end? And what frame rate is FMOD automation quantized to?

1 Like

A frame is the period of time between successive updates of the FMOD Studio system. In synchronous mode, the FMOD Studio system updates when FMOD:Studio::update is called; whereas in asynchronous mode, it updates whenever the asynchronous update thread triggers (which by default is every 20 ms, but can be adjusted).

Kinda similar issue here. I’m trying to loop a multi instrument using a destination marker and a transition marker. The audio pop as the transition cursor hit the destination fade-in, as if it let the transient pass through. Here’s an example:

https://youtu.be/qFAtmXJeCX8

Could it be related to this framerate issue and is it possible to eliminate this poping effect without affecting the performances too much ?

This pop is weird, I’m not able to reproduce it…

By the way, do you know you can do your loop with a loop region? Loop regions now have transition region as well.

I didn’t know that, thanks for the tip ! Unfortunately it didn’t solve the pops problem.

Good news is that since I want each audio file to transition smoothly with the next random one, I didn’t rely on any strong transient to make the event sound the way I want. So, I just had to add a tiny fade-in on each audio assets in my DAW(I use to always cut my files on a silent sample point when I export audio files) to cut any transient.

It works, but it doesn’t solve the weird fmod fade-in behaviour tho.

1 Like

The strange behaviour you are seeing is the same by-product of how quickly the FMOD system updates. Essentially what is happening is the instrument is triggering and playing faster than it realises it has a fade. This is apparent on very short audio files. This can be mitigated at runtime by using a quicker call to System::update() but will have more of a performance hit.

Edit: I’ve been informed by our development team that this isn’t entirely accurate. This is more of an internal issue. If your fade curve is short it might be skipped completely, ramping from 0 to full volume only over 64 samples. We are looking into fixing this behaviour, which will likely come at an increase of CPU usage, for a future release.

2 Likes