Program a MusicManager for OneShot > Loop Hold

I have a music track I split up by the bar in Audacity. I isolated looping sections so the exported list of wav files is containing 15 one shot sections and 10 looping sections.

I want to play through the one shot sections then hold at the looping sections until a trigger condition is met then finish the looping section and move onto the next oneshot sections.

[One shot section] → [Looping section] → [Next One shot section] → [Next looping section]

This has been the hardest part of my year long solo game dev journey so far. Despite sounding so easy. I thought this would be a standard thing to do in game audio but seems impossible its literally the easiest way of handling music I could think off and no one seems to even understand what I’m trying to do let alone how to do it.

I tried using a BP_MusicManager and quartz. The problem there is because the looping files are marked as looping in the wav asset when the ‘stop play’ call happens on the quantized bar event a millisecond of the start of that looping wav file plays. So I spent daying playing with this to come to the realization this is the wrong approach.

Is meta sounds the right way of doing this? How would I even begin to structure this? It’s very frustrating and there is literally no information anywhere online on how to do this seemingly simple task.

Any help whatsoever would be a blessing.

MusicDirector_StartFirstTrack Function posted by anonymous | blueprintUE | PasteBin For Unreal Engine

MusicDirector_ScheduleHandoffToNext Function posted by anonymous | blueprintUE | PasteBin For Unreal Engine

MusicDirector_EventGraph posted by anonymous | blueprintUE | PasteBin For Unreal Engine

https://drive.google.com/file/d/1-w81JgaKHjmjFwYgpOYPI1NLIHET0Dll/view?usp=sharing

I understand exactly what you mean :slight_smile:

One of the other problems with trying to sync, is that if you kill the boss one second after the loop starts, it has to play to the end before crossing over to the one shot. That’s also going to be ‘not ideal’.

I wonder if cross fading would be a better approach?

I know that Meta is supposed to be able to perfectly sync loops like this, but I’ve never tried it.