# Fmod and unreal looping but random music

**URL:** <https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892>\
**Category:** FMOD Studio\
**Tags:** ue4\
**Created:** [March 17, 2021, 12:32pm UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892 "2021-03-17T12:32:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabthebeat48](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@gabthebeat48](https://qa.fmod.com/u/gabthebeat48)\
**Post date:** [March 17, 2021, 12:32pm UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/1 "2021-03-17T12:32:54Z")

</div>

So basically I’m working on the music for this game in unreal. The music needs to change according to the round. I think I have a pretty good idea how to do this (set up looping for each range and get set up like a round parameter?) however I would also like to take a couple of different tracks with the round looping mechanics and make them play randomly at the start of the game/match. Any idea how to achieve this?

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [March 17, 2021, 12:55pm UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/2 "2021-03-17T12:55:06Z")

</div>

Hi!  
Once you have created your multi-layer music event, one for each music track, nest all these events in a multi-instrument, for randomly starting one of those.

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [March 18, 2021, 12:07am UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/3 "2021-03-18T00:07:26Z")

</div>

> [@gabthebeat48](#):
>
> I would also like to take a couple of different tracks with the round looping mechanics and make them play randomly at the start of the game/match.

If I understand correctly, you want music that progresses dynamically based on in-game events (much like the “Music/Level 01” and “Music/Level 03” events included in the examples project included in FMOD Studio), but you also want to be able to randomly select from multiple music tracks.

To clarify, do you mean you want to generate a new playlist of songs at the start of each match? Or do you want to select just one song to play at the start of each match?

---

<div class="post-metadata">

**Author:** ![gabthebeat48](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@gabthebeat48](https://qa.fmod.com/u/gabthebeat48)\
**Post date:** [March 18, 2021, 7:23am UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/4 "2021-03-18T07:23:57Z")

</div>

I would like one song to play at the start of the match

---

<div class="post-metadata">

**Author:** ![gabthebeat48](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@gabthebeat48](https://qa.fmod.com/u/gabthebeat48)\
**Post date:** [March 18, 2021, 7:24am UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/5 "2021-03-18T07:24:46Z")

</div>

Hi thanks I didn’t lmow whether you could like reference other events in an event. Thanks so much will try this.

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [March 18, 2021, 8:09am UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/6 "2021-03-18T08:09:14Z")

</div>

Yes, that’s one of the greatest features of FMOD: you can nest events on as many levels as you want.

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [March 18, 2021, 11:02pm UTC](https://qa.fmod.com/t/fmod-and-unreal-looping-but-random-music/16892/7 "2021-03-18T23:02:47Z")

</div>

> [@gabthebeat48](#):
>
> I would like one song to play at the start of the match

In that case, Alcibiade’s suggested solution should work. Just make sure the multi instrument in the parent event isn’t untriggered before the song is supposed to end. This can most easily be achieved by using a loop region or sustain point.
