Endless Music Variations with MetaSound & Blueprints in UE5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
So, hi Mitch here! Just a quick demo of this layered music system with a randomizer. Gives me the opportunity to work with only four layers of music and have endless combinations all of the time and let the music play for itself. So, the way I'm doing this is with a little blueprint here controlling a meta sound and I'll quickly go through the settings here. So you have a little setup option here enabling the whole thing. Setting up bpm, enabling a metronome, just a little debug feature for myself here and this is where you choose which audio assets to use for the four layers of music. In this case, I have an ambient piece of music here with a layer sounding like this [Music]... choir with some strings and pad sounds, some distortion sounds here and arpeggios coming in and out.. and this one here [Music]. And a beat... [Music] Yeah so just basic stuff but if you combine these in always-changing variations then you can have some interesting music coming out of this and I also included some lfo modulated filters here and delay effects so to give some more complexity to all of this. Right, so these are the four music layers here and let's scroll down to the randomizer section you have some randomizer weighting for each and every layer. So, like if you set this to one then this layer will be playing all of the time and if you set it to zero it will never play and everything in between of course. So i set up the the beat layer here which has quite a high probability to be played and then 0.5 for the other two layers here and the last one the boys choir here a little bit less. And you can choose if you have a fade in and fade out. So, this is kind of an ambient music so it's better to have longer fade in and fade out durations. So, like fade in times like five seconds for each layer here, eight seconds fade out durations for each layer here. So, our randomizer re-trigger times... How often will the randomizer for each layer decide if the layer is going to be played or not and I'm always setting up these differently, so that not all of the layers will change at the same time like every four bars here for layer and every six bars for layer two and so on and so on. And what else do we have here? Ah, yeah... The LFO-modulated filters, so I have a low pass filter for every layer you can activate it or not and then you have a duration time... So, how long is one cycle of modulation for this filter. It's just a simple sine- LFO, sweeping through the filter with fixed frequencies. I could have implemented here the possibility to set up the frequencies, but I want to keep it simple and tried it with different settings and these ones were the ones I liked best. So, level controls, then delay sends and delay return so we can set up the delay send individually for each layer and I guess that's about it. So, let's jump right in and listen... [Music] These colored point lights are just indicators for which layer is active and which layer is not active. Just a visual representation [Music] [Music] [Music] [Music] This could go on and on for hours and there will be always new variations of these four layers [Music] All right, another good thing about it is that you can reuse this system. So, if like for instance I need some combat music then...disabling the ambient layer here and enabling the other blueprint... and this one is 150 bpm with stuff like... Yeah, and stuff like that... [Music] and let's jump in [Music] [Music] [Music] [Music] [Music] Okay, and depending on your settings you can have very different styles of the same music. Just like emphasizing the drum elements or emphasizing the pads and the strings and the choir sounds so you can really have very, very many different variations just by setting up these settings here a little bit differently. Very quick walkthrough so this is the metasound setup here. So, I have the four wave players here, receiving inputs from the blueprint which wave file to play, which asset to play. Then going through the setup for each layer with an envelope this one will be used for fade in and fade out purposes. Also with input coming from from the blueprint for triggering and for the fade out and fade in times. Then here is the filtering with an lfo. The setup accordingly to the beats per minute and a switch. This one lets me enable and disable the filter from the blueprint and this is the same for the four layers.. over here.. one, two, three, four... and then the whole thing goes into, of course, a mixer for the four layers and from down here I have the wave player for the metronome which can also be mixed to the other four layers in here. Then this here is the aux send for the delay effects. So, I'm taking the signal from the filtered or unfiltered signal here and feeding it into this mixer and then I have the delay send level here coming from the blueprint. This is a very simple delay FX, just receiving the bpm from the blueprint and I'll have a simple, very simple ping-pong delay here. This one is mixed together with all the other sounds in this mixer and a master volume here. So, this is really, really straight forward, really simple. And the whole randomizing logic is being triggered here from the blueprint. So, of course I'm using the quartz setup. So everything is really in time and sample accurate. And yeah, here's the simple quartz setup. And here I'm preparing the metasounds to be played quantized. And once it's queued up I'm resuming the clock and so it will start on the first beat. In here, I'm initializing the first randomizing-setup here just when it's, when the event is about to start. And well, once the meta sound is spawned in here I'm initializing all the parameters in the meta sound. So like setting up all the wave assets here and fade out durations... all the parameters here.. And right here, after that, I'm subscribing to all quantization events and well, here I'm taking this event output here just to trigger the metronome, if it is enabled. And the beat output here, I'm using for deciding if the randomizer for a layer is being triggered or not. So, I have a little macro here... and just calculating if it's the randomizer duration.. And if yes, I'll trigger it. If not, I'm passing on the beat event... ...independently for layer 1 2 3 and 4. This is just a little quick check to avoid silence.. So, if all layers are deactivated - that's something that shouldn't happen because we don't want really silence in our game here... then the randomizer is just retriggered. So we roll the dice again if that happens. This is just for debugging features here and i guess that's about it! Yeah, so really simple setup but gives me a lot of variations here with just four layers of music. Okay, thank you! Bye, see you next time! [Music] [Music] [Music] you
Info
Channel: TheTripboxer
Views: 16,742
Rating: undefined out of 5
Keywords: Metasound, Unreal, Unreal Engine, UnrealEngine5, UE5, interactive music, tripbox, game audio, generative music, Metasounds
Id: ZzJVxxDn_f4
Channel Id: undefined
Length: 13min 5sec (785 seconds)
Published: Wed Sep 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.