Time Lagging in Quartz

You don’t query this value, it’s more of a time stamp on the event.

You can track stuff yourself in between events on the gamethread, and query the duration of a musical duration in seconds.

In fact, we use Quartz for automatic weapons in Fortnite (sample-accurate and decouples fire-rate from gameplay frame rate). We had an issue where when the player stops firing, the Quartz-driven audio can stop right away, but the VFX might let another gunshot through (if the VFX already hit the GPU).

So we track (as a percentage of a beat) how close we are to the next “gunshot” (32-nd note) and we have a configurable threshold to decide if we think the VFX lag is going to let another shot through or not. And we use that to decide if we should cancel now, or after the next gunshot is playing.

Quick BP example to show what I’m talking about. You can replace those Play Quantized calls with whatever logic you want.

You’ll also want to tweak the audio project settings (buffer size & number of buffers to queue) to minimize latency more than a regular game would care about.

if UE5 could meet that standard then it will be the first game engine to do so without modification and/or third party addons.

That is the plan :slight_smile: And like I said, if something is lacking to facilitate this, our tech is setup to expose whatever else we need quickly.

2 Likes