When it comes to audio implementation theres plenty of options out there, plugins like FMOD and Wwise are really powerful and easy to use. But as I started to study a little bit of blueprints and the audio tools of UE4 a simple method to control different tracks occurred to me. It works really well and… it’s free!
SoundCue
First lay out your music into different tracks and connect them to modulators and a mixer.
Then name the volume control of every modulator according to the track it controls, and set the default volume to 0.001.
This will allow us to control de volume of each track later in the process, and the extreme low volume lets us play them all constantly without beign heard, that way they are always in sync.
Level
In this case we wanted the tracks to start playing as the mage progressed through the level. So we set up box triggers with overlaping events.
(It could be any trigger that you want, players health, change in weather, daytime/nightime cycle, etc)
Then drag and drop the music soundcue anywhere on the map and we are ready to go to the next step
Blueprints!
Now for the fun part, first get a reference to the soundcue and get a “Set Float Parameter” from it. Fill the “In Name” with the modulator you want to control.
Then from the event trigger of your choice drag and set a timeline. Create a float graph, think about it as a Fade In.
Connect the float from the timeline to the “In Float” of the “Set Float Parameter”.
And that’s it, the moment the event is activated is will trigger the timeline and change the modulator parameter over time.
That’s it!, until next time.
Rodrigo.