MetaSound random music looping

Hi there,

I’ve been trying the features of Metasounds for a simple looping music trigger, but cannot seemed to get it to work. I’ve watched livestream videos and other tutorials available online, but I’m mostly finding stuff on the generative side of Metasounds.

I’ve set up a MetaSound Source, where On Play I’m going into a Wave Player with the intro to some music. From On Finished, I’m then using Random Get(WaveAsset:Array) to choose from an array of 2 waves and pass that wave into the Wave Asset of another Wave Player. If I tick loop in the Wave Player, it just plays the same SoundWave over and over again, which I don’t want. After the On Finished of this Wave Player, I want to be able to loop back and get another random wave from the array and supply it to the WavePlayer again. I want to be able to do this until I call another Input for the outro sting, at which point I will play the outro Wave Player and then Stop the looping section on the next beat.

Currently, I am getting a ‘connection causes loop’ popup. I’ve tried to take triggers off to reset and then call everything again, as well as try to put the functionality in a MetaSound and then put it in the main MetaSound Source, but no matter what it will always cause a loop. I feel like I am missing something obvious that I should be doing to make this system work and was hoping someone may be able to provide some insight into this?

Thanks!

SOLVED
I managed to find the question answered on the Unreal Engine Audio Tips & Tricks Facebook page. This post also had a link to another forum post with further descriptions on ways to do it. I’ve linked them below so others can find them easily as well :slight_smile:

Facebook Post - https://www.facebook.com/groups/unrealengineaudio/permalink/1011650866202896/

Other Forum Post - https://forums.unrealengine.com/t/setting-metasounds-variable/508262/18?fbclid=IwAR3Yd1XWqjveeAVOcCdSDlHM1mhP2jrgX7D_Ls_mrKU2NrLtWEZG-m0qBhA

1 Like

For those of us who don’t use Facebook, would you mind posting the actual solution rather than an off-site link to toxic city?

2 Likes

Hey @DragonHeartSong ,

If you use this link I’ve pasted below the Facebook one, it will take you to the original post on the Unreal Engine Forum, that someone linked on the Facebook post. You’ll find the reply from staff lantz.anna_1 details exactly what you will need to do for the looping. Hopefully this helps :slight_smile:

Thank you kindly :>)

Try GetDelayed Node