Valparaíso, Chile
carlos.ibanez@criticalfailure-studio.com

Adaptative Music using Blueprints

Adaptative Music using Blueprints

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.

it should look something like this.

Remember the parameter names!, we will used them later in the blueprints seccion.

 

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

AudioTriggers example.

 

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.

Timeline graph example

You can use different triggers to remove tracks using the “Reverse” pin on the Timeline node.

 

That’s it!, until next time.

Rodrigo.

Agregar un comentario

Su dirección de correo no se hará público. Los campos requeridos están marcados *