Seamlessly loop audio perfectly no gaps please

Hi there, I really need to have a 4 second music sample loop seamlessly, perfectly without any tiny gaps/ pops/ clicks when it loops.

I have tried enabling every looping method I know of:

  • In the wav itself
  • In the wave player within the sound cue by ticking ‘looping’
  • in the sound cue by creating a looping node and plugging it in
  • In the METASOUND by removing the one-shot interface, ticking loop on the wave player and hooking it up as stereo.

The latter solution reduced the loop gap by a lot but there’s still a noticeable click at the end of each loop.

In my DAW the music sample loops seamlessly perfectly without any gaps whatsoever. I made sure to check whether or not my DAW was adding a tiny 0.01 second fade at the start or end of my audio too but it isn’t.

Does anyone here know, please, how to just ensure a piece of sound loops seamlessly without any gaps or pops/ clicks at the end each time it loops back?

I’m totally lost. Please help

Hi Anthony, the trick is to use a “GetDelayed” node to retrigger the loop using “OnNearlyFinished.”

To do this, first create a Trigger type variable, then drag it from the variable list on to your graph while holding shift (for creating a set node) or alt (for creating a get delayed node).

OnNearlyFinished triggers on the next-to-last audio render block of the sound, which allows time for MetaSounds to schedule the loop to retrigger at exactly the end of the loop.

Here are some links for further reading:

See the “Sample-Accurate Concatenation” section:

See sections “Concatenation” and “Trigger Loop Backs”

3 Likes

Thank you for the response, this was well explained. I actually expected this to work too by the logic of it.

There is still a tiny ‘click/pop’ at the end of each loop though. I wonder if it’s something to do with the engine having to reload the sound again?

I just double checked in my DAW (Reaper) and it definitely loops cleanly with no dropout at the end. I also re-imported a newly rendered version back into Reaper to double check and there’s definitely no seams there.

I’m almost 100% certain this is an engine problem.

You might be right—I just remembered a thread from about a month ago here on the forums where someone was noticing the same thing. If this is referring to the same bug, then it appears to have been fixed in 5.1.

Oh dear, I can’t upgrade this project into 5.1 either because Metahumans and DLSS hasn’t been updated for it yet.

Seems I’ll have to figure out another way. Thank you so much for all your help :slight_smile:

2 Likes

Hi! I’m the person that ran into the same bug a few months before.

You might be able to use the workarounds I found here before you’re able to upgrade to 5.1:
https://www.youtube.com/watch?v=pVk_pU0w44s

Basically we should avoid setting the loop duration to -1, as that part of the wave player is bugged.
If we use the wave duration node to get the exact length of your audio clip, and set that as the loop duration, it will loop perfectly.

2 Likes

Hi, I tried these methods here and while it seems to work perfectly for this guy, the metronome is perfectly in sync, mine just isn’t working.

I don’t know if it is actually a delay or anything happening between the loop, it could be an overlap and it’s bugged.

I tried different very small start time changes and the click/pop just changed sound but still happened anyway.

Thanks for trying to help though I really appreciate it :slight_smile:

Hey, I’m hope you’re doing well. I’m facing the same clicking sound problem when retriggering on delayed nearly finished, did you ever find a solution for that? Cheers

I didn’t, I just had to leave it in

Thanks for the reply!
I made a small patch that smooths in at “play” and out at “on nearly finished” with an ADSR with a really small attack and release time. It fixed it!
However I found out later that there’s a built in function for that called switch and ramp :sweat_smile:

2 Likes


The get duration wave gave me this idea, seems to work for me.