Random array that plays music files with different lengths (on exit cue)

Hi,

I am having a big problem with MetaSounds. I am hoping that there is some node that I am unaware of that will help help me fix this problem. Basically, I am trying to recreate a Wwise random continuous player group using music files with varying lengths.

I have several music files with different lengths. Each file has a resonant tail.

I want to retrigger a random array to at the “exit cue” of whichever file is playing.

In the “paint” picture, the array would retrigger after 24 measures, 16 measures, or 12 measures (depending on which file is playing).

I know how to do this using files of the same length by using two wave players, a trigger sequence, and a trigger counter and compare that retriggers the array after value “b” (see second picture)

To do this with files that vary in length, I have tried exporting the files with cue points (see picture 3), however, I can’t retrigger the array because using the cue point as a trigger creates “connection causes loop error.” The best I can do is using a delayed cue point variable, but after a few cycles, the exit gets completely out of synch. I thought maybe there is something to be done with cue point Ids, but I don’t how to get the trigger compare to read several of them (one for each wave player). Even with only one of the cue point ids connected to “b”, I still get the loop connection error.

Any idea how to do this and if it is possible?

Thank you

Hello!

Not sure if it’ll work with timing, but can you change your “On Cue Point” variable to a graph output and have that retrigger the start via your level blueprint or wherever you trigger this MS to play? So you wouldn’t have a repeat in the MS, but maybe just have it go straight into the random container? Would likely also have to add another input that has an external counter to choose the order if it’s not completely randomized.

Another thing I have done in the past was to get the greatest common factor of the phrases, in your case 4 bars, and then use that as my BPM to Seconds. From there I added some empty sequences to fill in gaps while the longer phrase played out. You couldn’t use “random get” in that sense and might have to manually add all the wave players in a “trigger select” with “random int” or something like that.

Those may not be super clean/professional ways of managing it, but those are 2 things that I thought of, hope it helps!

Yegues

Thanks for the ideas, I will test them out!

I’m not sure that I follow the common factor of phrases method. If you set the bpm to seconds to 4 bars, how do you ensure that the next piece triggers after 12 bars, 16 or 24?

Well, I found that hooking the start of the trigger repeat to on play of the wave players makes this system work more or less well (the transition between the end of one music and the beginning of the other are a tick off, but is that noticeable?). It makes it so that the “metronome” is always aligned with the music (exit at the transition) which makes the system possible to use for musically time stingers and other transitions.

If you set the repeat to every 4 measures:
12 measure phrase = trigger repeat on a sequence 3
16 = seq 4
etc.

Although, now that I type it, you have the same issue unless you wanted to nest it all in a bunch of sequences, but then it’s not random anymore. Sorry haha!

Glad you found a solution! 1 tick might not usually be noticeable depending on how your phrases connect and loop and how much gameplay is covering it. If I were listening to audio only, then I could likely hear some stutter OR the 1 tick will continue to add up, eventually getting far off.

Are you using Quartz? There might be some where you can “subscribe to quantization” to avoid the tick delay? If this is self contained in the MS, maybe test out adjusting the cue point to be 1 beat earlier or something similar to catch that delay?

I’m not using Quartz, but by connecting the wave player’s on play to the start of the trigger repeat, I am synching the metronome to the beginning of each music file, so it avoids the tick off accumulating.

I was thinking of seeing if I can export the file with the cue 1 tick earlier. If it is 1 beats earlier, don’t I have the same problem?