If you loop a music track in Unreal by ticking Looping on the Sound Wave, the whole file repeats from the top, and the Loop option on a MetaSound Wave Player jumps straight back to the loop start. Either way, any reverb or ringing notes after the loop end get chopped off at the jump, or play as a gap before the restart. Here’s a MetaSound setup that lets the tail keep ringing over the next pass.
The idea is two players taking turns. Each pass plays from the loop start to the very end of the file, tail included, and the next pass starts on top of it exactly one loop length later.
- Export the loop as one WAV that starts at the loop start and runs through the loop end plus the whole tail. If there’s an intro, make it a separate file. Note the loop length in seconds (the length of the loop itself, not counting the tail).
- In a MetaSound Source, add a Wave Player with that file, tick Loop, and set Loop Duration to the loop length. Don’t connect its audio. It’s only a clock: its On Looped output fires once every loop length.
- Add two more Wave Players (A and B) with the same file and Loop unticked.
- Add a Trigger Sequence (2) with Loop ticked and connect the clock’s On Looped to its In. Out 0 plays B. Out 1 plays A, through a Trigger Any (2) whose other input is On Play, so A also plays the first pass.
- Mix A and B (Audio Mixer (Stereo, 2)) into the output. While one voice is ringing out its tail, the other is already playing the next pass.
- If there’s an intro, play it from On Play and start the clock and voice A from the intro’s On Finished instead.
One thing that caught me out: if the game ever turns the music down to 0 or mutes its sound class, Unreal can stop a silent MetaSound for good. Set Virtualization Mode to Play When Silent on the MetaSound and it keeps playing silently and comes back in the right place.
I’m a game composer and I ended up building a Windows tool for this, called Loopsmith. You set the loop points by ear, and the Unreal export writes the files plus an editor Python script that builds this MetaSound for you (Tools > Execute Python Script, with the Python Editor Script Plugin on). It also adds an End trigger for a proper ending, stem layers with gain inputs, and stingers. I tested it in UE 5.8, and it plays the same in a packaged game as in the editor. There’s a free demo (the full app for three of your own tracks) if you want to try it: Loopsmith: Game-ready seamless loops by austinhaynes
If you build the two-player version yourself and something’s off at the seam, post what you’ve got and I’ll take a look.