Soundscape Volume Control IN REAL TIME | Audio Modulation | Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I'm currently working on a project which I hope to be able to talk about soon but while working on that project I ran into an issue where I needed to be able to control the volume of multiple soundscapes using a single UI slider in real time and after a little bit of trial and error I was able to get this resolved using the audio modulation plug-in and also a huge shout out to Curtis Smith from my Discord server for point me in the right direction speaking of Discord if you'd like to be a part of the sound effects guide Discord server you will find a link in the description below and make sure you hit that subscribe button along with the notification Bell so you don't miss out on any future content so with that being said let's get started alright so before we dive into getting the audio modulation plugin set up let's take a look at the example that we're going to be using just so we have some context so right now I'm just using the the standard first person template I do have and audio asset in here already this is some music that I currently have set to not activate on begin play just a lot of audio to try and talk over but I do have a soundscape setup for our Ambience I've got some footsteps to the character and then we've got the first person rifle firing sound and so when I hit play you can hear that the soundscape is running and I do have a very generic UI setup with a slider for music sound effects and Ambience obviously in the editor it doesn't scale properly but yeah that's whatever now you can get as granular as you want with this you know when it's finished if you want to be able to have a separate slider for footsteps versus the gun firing sound you can most certainly do that but just for this example I'm just going to use three different categories and while I started this video talking specifically about soundscapes once we're finished you'll actually be able to apply this to any type of audio that is in your project so the first thing that we need to do is we need to enable the plug-in which you can do by coming up here and clicking on settings and go to plugins or if you go under edit you'll find the plugins here as well and you can use the search tool to look for audio modulation or you can come under the audio category here and you'll find it right there now like with most plugins in Unreal Engine when you select it you're going to get this notification down here at the bottom that you have to restart the engine and so we're going to go ahead and do that and I'll be right back so now that we have our audio modulation plug-in enabled and our engine restarted inside your content browser I already have a folder set up for modulation you can set your folder hierarchy up however you want but now if you right click inside your content browser and you come under audio you will now see the option for modulation now inside the modulation submenu you're going to see several different options in this video we're specifically going to be taking a look at the control bus and the control bus mix I'm not going to be diving into the generator parameter and patch in this video but if that is something that you'd like to see me cover let me know in the comments and I'd be more than happy to dive a little bit deeper into that but really for now I just want to make sure that I'm that you guys can get up and running with the audio modulation plugin so we're going to start by creating a control bus and the documentation from epic games uh suggest calling this uh CB if I can type underscore Main and to be completely honest for naming conventions I think this is perfect and so what we're going to do is we're going to open up our control bus Main and we've got a couple different options uh one for our mix override and for our generators but what we're looking for right now is the parameter an under parameter we're looking for volume now if you don't see this you may need to click on this little gear icon and show engine content which is off by default so you may get this no results if that's the case again just click on the little gear and show engine content like I said we're looking for volume now we can go ahead and save this and we're going to close out of that window I'm going to move this back out of the way and we're going to come into our project settings over on the left we're looking for audio and for default sound class we have our Master sound class we're going to go ahead and double click on this and in the left details panel here um I've already got mine expanded but you should have this drop down for modulation and an option for volume yours is probably going to start out looking like this uh we just need to check this tick box next to modulate we're going to add an element and that is going to be our control bus Main so now we can go ahead and close that and after we save it and once we've saved that we're also done with our project settings and we can close that window back over in our content folder what we're going to do is we're going to take this control Main and we can do control D to duplicate it and I'm going to call one mus for music duplicate it again and this will be sound effects and one more or are ambience and we can just go ahead and save all of those and now we need to create our control bus mix so again we're going to right click audio modulation and control bus mix when I control all this CB underscore mix you can you can name it whatever you want just so long as we're kind of keeping track uh it's especially important that we keep track of the names that we called our individual control buses because that is something that we're going to be utilizing in just a moment but now that we have our mix set up actually just for the sake of naming I'm going to call this CBM for control bus mix and we're going to go ahead and open it up once our control bus mix is open uh we're going to be taking a look at the mix stages and since I have a control bus for music sound effects and music uh we're gonna go ahead and add three elements here and we can go ahead and expand these I do apologize if you're hearing a bunch of thunder in the background uh here's a thunderstorm going on right now but in our buses we're going to select everything that isn't our main so we've got our ambience we've got our music and we have our sound effects so we can go ahead and save this and I'm just going to move this window out of the way because we are going to come back to it but once we have our control bus mix set up we now have to assign our individual control buses to the actual audio assets themselves now one of the cool things about this is you can apply this to a meta sound a sound queue or an individual wave asset it doesn't matter but the way that we're going to set this up I have meta sounds set up for the soundscape because you'll notice if we come into where I have my soundscapes our soundscape palette we do have the different volumes for the colors the issue that I was initially running into is that while I can adjust these parameters they don't happen in real time instead the adjustment will take place once the next instance of that color is spawned and that and that's not quite what we want so what we're going to do is we're going to I'm going to start with our music and I've Got The Meta sound already for the music and it you'll notice it's just a generic meta sound setup I've Got the Music in here we've got a wave player but if we come up here to the top and we click on source you're going to see the same modulation kind of menu that we saw in our Master sound class now chances are yours probably looks like this with everything set to inherit but under the volume routing what we want to set this to is Union we're going to select the tick box next to modulate and just like we did in our master class we're going to hit the plus to add an element and since we're working with music I want this control bus to be music go ahead and save that and I'll move it back out of the way and we need to do this now this is kind of the tedious part we need to do this for every sound asset that we're going to be using so since I've Got the Music done we can come in here to sound sound effects I've got our footsteps and again with a meta sound another kind of General setup um at first I was using a mono mixer because I was trying to use the slider to adjust just the specific footstep meta sound in real time to be completely honest we actually don't even need that so we can run this straight out and again under our source make sure it's set to Union The modulate Tick box is checked and for this we're going to add it to sound effects now like I mentioned previously we can actually apply this to wave assets themselves so under our content going to our first person weapon your locations may be different but if we use just a regular single sound asset you'll see that we also have the modulation here and we're going to put our gunshot sound under sound effects as well and so even though this is just a single asset whereas our footsteps is a meta sound composed of 10 different footsteps because we have access now to this modulation we'll be able to control both the footsteps and the gunshot sound all on the same fader now last but not least we are going to add this also to our soundscape and as I mentioned the different soundscape colors are actually composed of meta sounds that I created so what we need to do is go into each of the meta sounds and I'm just going to go ahead and open all of these up so we can kind of do them fairly quickly and we're just going to do the exact same thing that we've been doing with all of our other meta sounds now because I'm using the ambient slider for our soundscape I want to make sure that that is the control bus that I'm putting on The Meta sounds used for our soundscape so if we want to hear uh how this sounds and make sure that we are controlling these parameters correctly what we can do is we can hit play [Music] and I've got the soundscape playing I've also got some music playing there aren't any sound effects playing yet because like I said those are all footsteps and the gunshot sounds but what we're what we can do is in our control bus mix if we hit activate mix we can now use these sliders so say I want the music to come down I'm adjusting just the music and under our ambience I can adjust the volume of those as well and as you can hear even though our soundscape was made up of five different colors and five different uh meta sounds we adjusted the volume of all of them at the same time now it is important to note uh that if you come in here and you change things it does throw the little asterisks up there saying that this isn't saved you will want to revert these changes if you're going to be using like a UI menu to allow the user to be able to control these types of effects but otherwise if we were to click save now and then the player started playing the level they wouldn't hear the ambience or the music because in the mix we've saved it as the volume being all the way down so you will want to revert those if you're going to be giving your user access to be able to control volume via like an options menu or something but as I mentioned previously we do want to allow the user interface to be able to control these so there's a little bit of work that we need to do inside our level blueprint now inside the level blueprint I do already have some stuff set up I've got this setup or our menu and I've got some custom events Run for the faders we just don't have them controlling any of the control bus parameters just yet uh the other thing that I have down here is activating our soundscape so the very first thing that we need to do is we need to actually activate the the control bus mix so you can do this however you want to execute it if you want it on the event begin play or if you want the user to be able to control when and when they cannot adjust parameters which probably won't be something that you would want to set up but you know you can if you want I'm just going to go ahead and we're going to drag off of the sequence node that I made and we're going to activate the control bus mix and we want to make sure that we're selecting our control bus mix so that this knows what uh control bus mix we're actually activating you can have multiples if that suits your project but for this one we're just going to be using one now before you guys say anything uh yes I know that activating the control bus mix off of this particular sequencer is going to make sure that it's activated third you can obviously change your workflow and Signal process however you want there's a good chance that this is going to activate before your user is able to get in the menu and start messing around with this stuff so for the example it's fine if you want to kind of refine this in your project again you're more than welcome to do so and so now for our custom events we want to Define which part of the control bus mix where changing the value of based on these custom events which I have set up in the UI to this will trigger anytime a value is changed and so what we want to do is we want to set up the control bus and we're going to set we're looking for set control bus mix by filter and we want to under the mix We want to make sure that we're targeting that control bus mix that we created and we're going to drag off of here and go into the value this is going to pass the value from that slider which I currently have set to from 0 to 1 and then we're going to pass that into the control bus mix and so I'm just going to go ahead and copy and paste these over because we're also going to be here as well and what's going to set these apart so that the the blueprint understands which parameters we're trying to change for which uh control bus we're trying to do this is where the address filter comes in and this is also where it's important that we remember exactly what we named those individual control buses so the one for music I had named that control bus or CB underscore mus the sound effects was CB underscore sfx and for our Ambience I have named that CB underscore a m b so now we can go ahead and compile that save it and uh I mean you're more than welcome to pause this and look at how I have my UI setup I will say one thing of note uh that when I originally set this up I had my P key set to add it to the viewport and when it was pressed again it was removing it from the viewport doing it this way removing it from the viewport will actually reset all of your faders back to whatever their default position is so the mix will stay the same and let's say for example on the music we were playing we pulled the slider down we only wanted it about half volume for our Music close the menu and we reopened it the music would still be at half volume but the slider will have reset back to the default because we had removed it from the parent and now we're re-adding it so instead we always wanted to be active but basically what we're doing is we're setting the visibility and if you don't want to do it this way you will need to figure out a way to kind of pass those values that you set into a variable and then reload those variables when you pull the menu back up not something that I'm going to be going into in this video but just kind of wanted to let you know one of the pitfalls that I found so in case you run into that you can do so there but we do have these all set up now and so our sliders are now activating the control bus mix or it's going to the control bus mix our address filter let's this node know which parameter or which mix stage we're going to be controlling and our float value is what's going to be adjusting this value right here and so we should actually now be all set up so now we can go in here and I'll hit play [Music] and I've got the menu set up to the P key and so now with our music you can bring the music down and our Ambience as well I can now control that I'll hit P again and now all we should here is uh the gun firing and the sound effects for the footsteps now I haven't done any preemptive mixing for these individual assets so that let's say the player kept all the the values at 100 percent I haven't set up a proper mix for that since this is just a tutorial but as you can hear we have the footsteps we've got the gunshots and if we come back in here to our menu and we pull that slider down as well now you can hear that we don't have any of that all right so that is going to wrap things up for this video I do apologize if I've left anything out I'm trying to wrap this video up before the thunderstorm knocks my power out uh but if there is anything that I left out or anything that you want to know more information about please let me know in the comments you know and I'd be more than happy to do my best to try and help you figure that out or again you can join the sound effects guide Discord server using the link in the description below until next time [Music] thank you
Info
Channel: The Sound FX Guy
Views: 2,164
Rating: undefined out of 5
Keywords: TheSoundFXGuy, The Sound FX Guy, The Sound Effects Guy, Soundscape Volume Control IN REAL TIME | Audio Modulation | Unreal Engine 5, Unreal Engine 5, Soundscape, Audio Modulation, Audio Modulation Unreal Engine, Unreal Engine Audio, Game Audio, Unreal Engine 5 Tutorial, MetaSounds, Unreal Engine Real Time Audio, Soundscape volume, Game Audio Implementation, Game Audio Tutorial, Unreal Engine SoundScape, Soundscape tutorial, Audio Modulation Tutorial, Unreal Engine Volume Control
Id: CEq7hGBpKt4
Channel Id: undefined
Length: 23min 0sec (1380 seconds)
Published: Thu Jun 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.