Music with intro and loop

Hi everyone,
I’m a music composer, new to UE4. Though I’m experienced with FMOD for creating adaptive music, for an upcoming project we thought of using UE4 native audio capabilities, since it’s a simple retro game with simple non-adaptive music.
However, I would like to implement musics with an intro going seamlessly to the looping part. I find it incredibly difficult to find information on how to do that.
In this 1h22 long video, it seems to be some complexe solutions to achieve that. However, I’m confused, this video is catalogued as “legacy” on the learning ressources page. And there don’t seem to be any up-to-date learning ressource about that. All ressources seems to concern audio rather than music.

I mean… come on! Intro + loop should be an absolutely BASIC functionality that shouldn’t require the use of complexe middleware. It has been used in video game music for ages! Think of The Legend of Zelda main theme, implemented in… 1986!

1 Like

Ok, so after a bit of investigating, I found out the “Music System in Blueprints” video was legacy because of the beta TimeSynth. The presentation video of TimeSynth promises to be able to do a simple seamless concatenate between two files (which basically is what I want). However, TimeSynth clips only relies on bars and beats. What if my music hasn’t bars and beats (or has some various and progressive BPM changes in it)?
For instance, one of my musics has a slight ralentendo at the end of the intro part, before the looping part. Isn’t there a way to simply say “after my intro, please play my loop”, without having to calculate the mean BPM of my intro and set BPM changes accordingly?..

1 Like

Go to Unreal online learning site and checkout Ambient and procedural sound design course and Dynamic audio course. Great stuff. Your problem is easily solved with sound cue.

1 Like

No, concatenator in sound cue doesn’t seamlessly transition between files. There’s a little gap.

It does seem to not be something that is easy :frowning: I’m assuming you loop doesn’t fade out/in at the loop point?

I was thinking you could do intro+loop (non looping) then cross fade to just the loop?

My files are exactly cut for a seamless transition, if they would concatenate correctly. It’s a timing problem, so crossfading won’t resolve the problem (a bad timing is still a bad timing with crossfades).
It seems there’s some overcomplicated solutions using Quantz clocks or TimeSynth, but I didn’t figure it out yet (and it always leans on bars and beats, which is irrelevant for my case, I only want a file to follow another).

It’s a SHAME a 1986 chiptune music behavior couldn’t be replicated with native simple tools in 2021…

Yeah it really is, my suggestion was ONLY if you had a fade out before looping. It does suck though.

Instead of concatenator ,use mixer, then from your loop music draw a delay(time it takes to finish intro music (more or less) ). That should work.

1 Like

It does seem to work, thanks! I still have to test if the delay is consistant in runtime.

EDIT: though it works when simulating the cue, it doesn’t work at all in-game. I placed the cue directly in the level, there’s probably a delay before the intro starts to play, so the loop part begins to early. :frowning:

I eventually find a trick: when adding a second delay between the mixer and the output, each part routed to the mixer seem to be cached properly in time. The fun part is that this delay can be set to virtually 0 (like 0.01) for the trick to work, but not 0!

I still have a little pop when transitioning, but that’s not a timing problem anymore, it’s coming from the intro part stopping abruptly (since it’s not a real concatenating). Baking a faded out release tail at the end of the intro should definitively resolve the problem.


are you check the switch?

I have and only cue for oe computer with star loop and Off

Thanks for the idea. Are you sure triggering the switch at 98% will always be perfect?.. Where comes that number from? Trial and error, I guess?

I don’t remember why I put 0.98 :joy:, but I guess you could try 1 first.

Sadly all solutions did not work with our intro and looping music files. So we had to use a different approach, which works a lot better in our view as blend between the files is used (basically sine fading curves, so far I know they are very famous in the audio world). Additionally we used a very small blending time (200ms) as our files where also perfectly cut, this allowed us to smoothly blend the intro and the looping part. And we use two audio components.

Thanks for sharing. Your contribution is very helpful to me, I am wanting to edit a song into a complete ringtone myself.

Thanks for your idea. It helped me a lot.