New Audio Engine: Quick-Start Guide

4.24 New Unreal Audio Engine: Now Defaulted On
Please be advised that as of 4.24, the New Unreal Audio Engine is now on by default, you can disregard activation instructions contained herein.

Please check out the Online Documentation to learn more about the AudioMixer!

Setting up your Editor for audio work:

  • Allowing Background Audio – This will ensure that you can still hear your project when your Editor loses focus:

    • Open the Editor Preferences Window via Edit > Editor Preferences

    • Under Level Editor > Miscellaneous > Sound, set the following:

      • Allow Background Audio to ON

      • Optional: Enable Editor Sounds to **OFF **(I do this so I don’t hear the play stop PIE woosh sounds)

      • https://forums.unrealengine.com/attachment.php?attachmentid=139630&stc=1

  • Avoiding low frame rate while editor is out of focus – this will ensure that your audio logic is still processing when the editor loses focus:

    • Open the Editor Preferences Window via Edit > Editor Preferences

    • Under General > Performance, set the following:

      • Use Less CPU when in Background to **OFF

      • https://forums.unrealengine.com/attachment.php?attachmentid=151981&stc=1
        **

Activating new feature plugins:

Many of our cool new features are put into plugins as part of a more modular directive we’re taking. One of the cool features of the new Audio Engine is its extensibility and we’re really excited by what this means for 3[SUP]rd[/SUP] Party Plugin Developers as well as more diverse or project level implementations for audio systems for users and internally. With that in mind, we’ve placed some of the cool new features (like our Synthesizers) into plugins to be activated as needed on a project-by-project basis.

  • Activate the Sound Utilities Plugin:

    • Open the Plugins Window via Edit > Plugins

    • Under **Audio **locate the Sound Utilities plugin, set the following:

      • **Enabled **to ON

    • If this is the only plugin you’re enabling, **Restart **when prompted

    • https://forums.unrealengine.com/attachment.php?attachmentid=139633&stc=1

  • Activate the Synthesis Plugin:

    • Open the Plugins Window via Edit > Plugins

    • Under **Audio **locate the **Synthesis **plugin, set the following:

      • **Enabled **to ON

    • If this is the only plugin you’re enabling, **Restart **when prompted

    • https://forums.unrealengine.com/attachment.php?attachmentid=139634&stc=1

5 Likes

Getting Started with the Modular Subtractive Synthesizer

As a showcase of the traditional synthesis and DSP library that Aaron has developed, he created a Modular Subtractive Synthesizer.

Subtractive Synthesis is a type of synthesis where you start with a harmonically rich sound source (usually an oscillator or noise generator) and then carve away (like a sculpter) with filters and amplifier modulation.

In the Modular Synthesizer Aaron has designed, there are two oscillators/noise generators which sum into a filter and then an amplifier stage (then into an effects stage including a stereo delay and a chorus effect). A polyphonic voice manager allows multiple voices (effectively multiplying the two oscillators) to allow simultaneous voices at different pitches. There are modulators such as LFOs and a modulation envelope which allow you to shape the tone of your sound. As such, the synth provides a powerful showcase of the new and growing DSP library in the new Audio Engine and a wonderful example of how the more adventurous audio programmers out there might design their own Unreal Engine based synthesizer.

For practical purposes, this is designed as a component which can be added to an Actor and derives from the SoundBase object to allow all the game functional parameters we enjoy with SoundWave and SoundCue objects (such as spatialization and attenuation, sound classification, and our new effects processing section).

Adding a Modular Synth to an Actor

The Modular Synthesizer is a component which can be added to an existing actor or a custom Blueprint Actor.
The fastest way to get started is to do the following:

  1. Type “Modular Synth” in the Add Componet Dropdown menu search prompt to locate the Modular Synth component.
  2. While selected, in the **Details **panel, edit your Sound Base properties as needed.

SubSynth_01.jpg&stc=1

Dynamically Setting Modular Synth Values in Blueprints

Subtractive Synthesizers are parametrically complex—but this complexity allows for an incredible diversity in modulation and sound shaping. You can drive changes to the synth properties via Blueprints as dozens of Set Functions have been implemented to safely pass values to the synthesizer. You can locate them in the Blueprint Function category **Synth > Components > Audio

SubSynth_03.gif&stc=1

**
Playing the Modular Synth in Blueprints

The Modular Synth was created with an nod toward traditional design and as such utilizes familiar MIDI-like Note On and Note Off functions.

  1. Once you’ve initialized your synth with the preset values you want, you can activate the synth with the Note On function.

  2. **Target **your modular synth component

  3. **Note **is the MIDI note value expressed as a float value for inbetweens

  4. Velocity is an implementation of a MIDI style volume scalar expressed as an integer from 0 to 127 (max)

  5. **Duration **is an optional value. When less than 0, it will sustain indefinitely (or until another function stops it), when greater than 0, the note will play for that many seconds.

&stc=1

  1. If you wish to use a Note Off event to dynamically control the timing of the note off, you may do so.

  2. **Target **your modular synth component

  3. **Note **is the MIDI note value you wish to turn off—this must be IDENTICAL to the note you turned on for the voice manager to correctly identify which note to turn off.

  4. All Notes Off will turn all notes off regardless of which note was specified

  5. Kill All Notes is like a MIDI Panic button, where it kills all voices rather than letting them release as normal.

SubSynth_05.jpg&stc=1

Managing Modular Synth Presets in Blueprints

Managing individual parameters on a synth can be a bit finicky, so for establishing initial settings or for allowing a more streamlined approach to editing the synthesizer sounds, there is a Modular Synth Preset data structure encapsulating all of the relevant set data.
As a data structure, you can set all of your relevant synth parameters in a single Set Synth Preset function (and a single data struct input node).
From here you can **Make **or Break ModularSynthPreset data structures. You can create Blueprint variables, serialize them as a public variable, or procedurally set values in one go. It also allows you to store and pass these values in a single data type.[INDENT=2]

&stc=1

&stc=1

[/INDENT]

Creating a Modular Synth Preset Bank

Early on, it seemed apparent that storing and recalling** Modular Synth Presets** would be valuable, so Aaron designed a **Modular Synth Preset Bank **Asset Type that can be created in the content browser.

  1. Right-click in the Content Browser and locate the **Sounds **submenu, then click on the Modular Synth Preset Bank
  2. Give your newly created Modular Synth Preset Bank a name
  3. Double-click on the new Modular Synth Preset Bank asset.
  4. **Add **a Preset Entry Element
  5. Give your preset a name by filling in the** Preset Name **text field
  6. **Edit **your preset by expanding the > Preset data member and editing the values directly

&stc=1

A Modular Synth Preset Bank can have multiple presets and because each preset is accompanied by a name value, you can access Bank elements** by index** (like any other array) or** by name** comparison (via for loop).

Using a Modular Synth Preset Bank in Blueprints

Modular Synth Preset Banks are **Assets **that are essentially an array of Modular Synth Preset Bank Entries.

In order to access your asset from your content browser in your game, you will first need to establish a reference to your asset. The easiest way to do this is to create a Blueprint Variable that is a **Modular Synth Preset Bank Reference **and then access its data members via Blueprint functions.

  1. Add a Blueprint Variable of the type: **Modular Synth Preset Bank Reference

&stc=1

**

  1. **Compile **your **Blueprint **to expose default values
  2. Add your Modular Synth Preset Bank as the Default Value (this can also be set in Blueprint Code)

SubSynth_10.JPG&stc=1

  1. **Add **a reference to your new variable to your Blueprint
  2. Drag a node from the variable and Get Presets
  3. Drag a node from the Presets output array and Get (A Ref)
  4. **Enter **the index number for your desired Preset Entry
  5. **Drag **a node from the Get function into a Break ModularSynthPresetBankEntry
  6. Here you can grab the Preset data structure or you can compare names

&stc=1

&stc=1

At this stage, you can pass the **Preset **output into a Set Synth Preset function or you can pass it to another Blueprint for use in another part of your game, or you can break the structure out and query specific preset values.

Advanced Modular Patch Assignments - ADVANCED USERS ONLY -

One of the more advanced setting values is the Modular Patch system which allows you to set up arbitrary pairings between Modulation Sources and Modulation Destinations. Patches are a data structure, so they can be procedurally generated, you can **make **and **break **them in Blueprints, store them, pass them, etc.[INDENT=2]

&stc=1

[/INDENT]

2 Likes

Getting Started with Granular Synthesis

A Granular Synthesizer is a special type of synth that allows for the creative playback of wavetable (or in our case a SoundWave file). It does this by playing (usually) small pieces of the file (called grains) and in many ways is analogous to an audio particle effect. Just like a visual particle effect, you can play grains forward, backward, control pitch, duration, shape, etc. Each grain can have its own settings, so in this way, it’s possible to play back dozens or even hundreds of audio grains from a single file all with different parameters.

Adding a Granular Synth to an Actor

The Granular Synth is a C**omponent **which can be added to an existing Actor or a custom Blueprint Actor.

The fastest way to get started is to do the following:

  1. Type “Granular Synth” in the Add Componet Dropdown menu search prompt to locate the Granular Synth Component.

GranularSynth_01.jpg

  1. While selected, in the **Details **panel, expand the Synth > Preset submenu to expose the default Sound Wave value (if you wish, give it a default Sound Wave)
    SoundWave references are now made using the Set SoundWave Blueprint Function
    .
  2. While selected, in the **Details **panel, edit your Sound Base properties as needed.

Dynamically Setting Granular Synth Values in Blueprints

The Granular Synth does not have as many parameters to control as the Subtractive Synth, but similarly, you can locate Set Functions in the Synth > Components > Audio blueprint categories—it is recommended to set an initial value for these functions before playing the synth. [INDENT=2]

GranularSynth_03.gif
[/INDENT]

Playing the Granular Synth in Blueprints

Similar to the Modular Subtractive Synth, the Granular Synth utilizes MIDI-like playback functions such as Note On and Note Off. **Start **and **Stop **are necessary for full stop and start of the Granular Synth playback functionality. [INDENT=2]


[/INDENT]

2 Likes

Getting Started with Source Effects

Source Effects are processors that affect the audio at the sound source,** pre-distance attenuation** and pre-spatialization. (Think of them like a pre-fader insert) This means that if you add a Source Effect dynamics processor, its thresholds will be acting on the Unity levels of your Source Sound (which may be a SoundWave, a SoundCue, a Synth, etc.) instead of the levels after distance attenuation/spatialization.

An Effect Chain is an** array of Effects** processors which are executed incrementally. So if you have a Source Effect Chain with 3 Source Effects in it, the processing will occur first at 0, then 1, then 2—essentially processing the source sound in an ordered chain. (Much like an insert chain on a channel strip).

Create a Source Effect Preset Chain Asset

A** Source Effect Chain** is an Asset, this empowers you to add the same Source Effect Chain to multiple sound sources in your project and to then edit, bypass, or modulate them** all at once**.

  1. Right-click in the Content Browser and locate the** Sounds** submenu
  2. Select the Source Effect Preset Chain
  3. Name your newly created **Source Effect Preset Chain

SourceEffectPresetChain_01.jpg&stc=1

**

Create a Source Effect Preset Asset

A Source Effect is a superclass for our Source based processors. Currently there are about a dozen and we’re eager to both create more ourselves and also hear what the community will create.

  1. Right-click in the Content Browser and locate the **Sounds **submenu
  2. **Select **the Source Effect Preset
  3. From the list of possible processors, select the one you desire

SourceEffectPreset_01.JPG&stc=1

  1. **Name **your newly created Source Effect Preset
  2. Double-click on your Source Effect Preset to **edit **initial values

(Each effect has different parameters)

Preset values can be edited in run-time to allow you to **audition **effect chains during gameplay.

Add a Source Effect Preset to a Source Effect Chain Preset

As mentioned before, Source Effects are processed in order as listed by your chain, so take care in how you wish to process the audio.

  1. Double-click your Source Effect Preset Chain Asset
  2. **Add **an array element to your Chain
  3. **Add **your Source Effect Preset to the **Preset **data member in your Chain element

&stc=1

  • **Play Effect Chain Tails **allows the sound to continue playing out using an envelope follower, use responsibly.

You can toggle **Bypass on **or off in runtime to allow auditioning Effect Chains during gameplay.

**Designating a Default Source Effect Chain on your Sound Source
**

  1. **Access **the **Details **of your **SoundBase **object

  2. On SoundWaves, this is done by double-clicking the asset in the browser and opening into the details panel

  3. On SoundCues, this is done by opening the** SoundCue editor **and not selecting any specific node

  4. On Components, this is done by** selecting the component** and accessing the details panel

  5. **Locate **and expand the **Effects **sub-menu

  6. **Locate **the Source Effect Chain entry

  7. **Add **your Source Effect Chain to that **default **entry

SourceEffectPresetChain_03.jpg&stc=1

Dynamically Bypassing Source Effects within a Source Effect Chain in Blueprints

You can bypass source effects during gameplay, this can be useful for creating effects that only occur based on gameplay events (like radio/comm effects when the player is in another room or some distance away from a character).

However, in order to **access **the specific Source Effect Preset Entry you will need to know the Entry Index number.

  1. Get a reference to your Source Effect Chain Preset
  2. Place a Set Bypass Source Effect Chain Entry function
  3. Connect your reference to the Preset Chain input, or **select **your Preset Chain from the drop down
  4. **Indicate **the desired **Entry Index **value
  5. **Set **the **Bypassed **boolean variable

&stc=1

There are other useful functions for dynamically adding or removing entries to the chain.

Dynamically Setting Source Effect Values in Blueprints

You can **modulate **or drive Source Effect properties during gameplay. This can be a powerful way to create an intimate relationship between gameplay events and sound and music processing.

In order to do this, you will need to get a reference to the Preset you wish to modulate.

  1. Get a reference to your Source Effect Preset (you will want to **specify **which specific type of Source Effect Preset Reference if creating a Blueprint Variable)
  2. **Place **a Set Settings function
  3. There will be an In Settings data struct pin
  4. Drag a pin off the In Settings pin and Make SourceEffect______________Settings where the blank would be filled in by your specific type of Source Effect Preset

&stc=1

Setting Up an Envelope Follower Listener Delegate

One of the more interesting Source Effects introduced is the Envelope Follower. An Envelope Follower allows the designer to analyze the amplitude data and create a dynamic, custom curve (envelope) of values that they can use to modulate some other parameter. However, in the case of UE4 through the power of Blueprints, this means you can have the amplitude data from a Source Sound drive the parameters of a game object!

  1. Create a new **Source Effect Envelope Follower Preset

Setting_up_envelope_follower_01.JPG&stc=1

**

  1. Add your new Source Effect Preset to your Source Effect Chain of choice. (Keep in mind that you will want to add it in the order where you wish to analyze the amplitude data)

&stc=1

  1. Add your Source Effect Chain to the Sound Source you want to drive parameter data.

&stc=1

**Once you’ve set up the Envelope Follower, then you need to set up the Envelope Follower Listener.

**

  1. Add an **Envelope Follower Listener Component **to the Actor you want to use the envelope data.
  2. Then add a reference to your Source Effect Envelope Follower Preset.

&stc=1

  1. **Place **a **Register Envelope Follower Listener Function **to your Blueprint Graph
  2. Set your Target Input to the Envelope Follower Source Effect Reference
  3. Attach a reference to your Envelope Follower Listener Component to the **Envelope Follower Listener Input Pin

Once Registered (you’ll note you can Un-Register dynamically with the Unregister function), you can add your delegate event:

**

  1. Add to your graph, an On Envelope Follower Update Event that is Assigned to your **Envelope Follower Listener Component

&stc=1

**

1 Like

Getting Started with Submixes

Submixes are analogous to Summing Busses or Auxiliary Busses. **Submixes **are **multichannel **surround busses that allow processing to occur after distance attenuation and spatialization. In the new Audio Engine, all sound is currently passed through a Master Submix which has an **EQ **and a Master Reverb Send/Return. This allows us to support the legacy approach of just having one EQ and one Reverb while at the same time allowing users the ability to expand their post-attenuation/post-spatialization processing chain.

*In the future we may make exceptions for hardware processed sounds or special hardware accelerated spatialization techniques—please be aware that the final architecture is still being worked out. *

*The following cannot be over emphasized: **Submixes **are for post-attenuation/post-spatialization signal processing, it is recommended for performance sake to avoid overly elaborate Submix Graphs. Currently, Sound Classes (which utilize logical volume modification) is still how you want to manage volume—Submixes are for effects processing.
*

Adding a Submix and Editing in the Submix Graph

Similar to Sound Classes, **Submixes **are managed on a Graph. All Submixes ultimately pass into the Master Submix, whether they are connected or not on the graph.

  • Right-click in the Content Browser

  • **Locate **the Sounds submenu

  • Select Sound Submix

  • **Name **your newly created Sound Submix

  • Double-click the Sound Submix

    • The Submix Graph Editor will open displaying (if any) children Submixes or parent Submixes connected to this particular** Sound Submix**

    • With a Sound Submix selected, you can see an array of children Submixes

    • Also in the **Details **panel, you will see the Submix Effect Chain—similar to the Source Effect Chain

Adding a Submix Effect Preset

Similar to Source Effect Presets, we have Submix Effect Presets. The main differences being that Submix Effects are **multichannel **(7.1 surround) processors intended for post-attenuation/post-spatialization signal processing. Currently there are three available classic submix effects:

**Adding **a new Submix Effect Preset is easy:

  • Right-click in the Content Browser and locate the **Sounds **submenu

  • Select Submix Effect Preset

  • From the subsequent menu, **select **the sub-class of Submix Effect (dynamics, reverb, eq)

  • https://forums.unrealengine.com/attachment.php?attachmentid=139761&stc=1

  • **Name **your newly created Submix Effect Preset

  • Double-click on your Submix Effect Preset

  • **Edit **the desired **values **(these can be edited during gameplay for effective auditioning of values)

Adding and Removing a Master Dynamics Processor to the Master Submix in Blueprints

With the implementation of a Master Submix, it was only practical to include a way to add dynamics to your master output. By default there is already a Master Reverb (separate Send/Return system) and** Master (4-band) EQ**—as a way to keep backward compatibility for people transitioning to the new engine—but you can add additional Master Submix Effects via Blueprints.

To add an additional Submix Effect to the Master Submix:

To **remove **a Submix Effect from the Master Submix:

To remove ALL Master Submix Effects:

Setting up a Submix Destination on your Sound Source

Unless otherwise set or specified, all Sound Sources output to the Master Submix (not visible on graph) by default. However, it will sometimes be desirable to **have **your sound source output into a different Submix.

  • Access the details panel for your sound source

  • **Locate **the **Effects **submenu

  • **Locate **the entry called Sound Submix

Setting up a Submix Send on your Sound Source

One of the powerful aspects to having a Submix graph is being able to **send **portions of your source sound to multiple busses for further post-attenuation/post-spatialization processing. Currently, the most practical use for this is a second or third reverb effect so you can have two simultaneous reverbs (or **parallel **reverbs depending on the source sound)—but obviously, the Submix could include any Submix chain—for example an EQ then a Reverb so that you can control the spectral content of your sound before reverb processing without affecting the direct sound.

Dynamically Managing Submix Send Values in Blueprints

You can **dynamically set **the Submix Send Values on your Sound Source via Blueprints. This allows you to establish Sound Submix Sends in advance and then via gameplay values, drive the send amount.

  • **Get **a **reference **to your sound source

    • For non-synths, you will need to get a subsequent Audio Component reference

  • **Place **a **Set Submix Send **function

  • Connect your reference to the Target input

  • **Locate **the desired Submix you wish to alter send amount for and enter it via dropdown or via pin reference in the **Submix **input

  • **Enter **the desired send level in the **Send Level **input

  • https://forums.unrealengine.com/attachment.php?attachmentid=139770&stc=1

2 Likes

Nice job!

Amazing writeup, great to see such a nice thorough guide on the new features. Looking forward to try these out.

Looking very informative, quick question though. Is there any videos showing these setups in action ?

Will be diging into the setups once I get the chance to see for myself, many thanks for your time and effort !

I did this today, it has several presets(in-game buttons for changing presets coming soon). The blueprint is very rough/elaborate and sorely needs more elegant solutions: https://youtu.be/aumCMQFEFoQ

PS Nice guide! Appreciate it. Many many thanks!

This is awesome… I love the idea of physical systems creating music. In this case a literal physical keyboard being played by rotating physics objects. Very interesting.
https://twitter.com/minuskelvin/status/860541018956902400

Hey folks, I just edited the Sound Source Effect post with steps on how to set up an Envelope Follower Listener.

For macOS different setup . Ive added to MacEngine.ini (Engine or Project …/Config/Mac/):

[Audio]
AudioDeviceModuleName=AudioMixerCoreAudio

And im not sure about :

It need or not? Bcoz audio engine works well w/o dat flag

Now this is an intro documentation :wink:

If you’ve already edited the ini file, you don’t need the flag–but the flag offers people an easy way to A/B the difference between the new and old Audio Engines on existing projects.

As far as CoreAudio, keep us posted on how it goes! We haven’t had a chance to really test out mac! :smiley:

Woot!

Hi guys. Thanks for Synthesis, its great. I have been thinking about procedural sound generation for some time and now i can play with this. Great.

I made a project where i exposed some synth parameters to GUI so i can quickly see how things affect each other. In editor it works fine.

I thought i would share it with others, but packaged project looks like this:

Is problem on my side, or is it 4.16 preview thing? Any ideas?

1 Like

Very cool! I was wondering if it’s possible to set up an envelope follower with sound that’s not heard in the engine. So for example it should play some sound and generate float values for it but not actually be heard. I’m using this for a lipsync system, and you can use it like that even with sound being heard if you use the split audio files (for each phoneme) as is and just play all of the sounds at the same time. It would be nice if you could decouple this for some artistic freedom I guess, playing the original dialogue lines and just using the split audio files for setting morph targets. If you could use an envelope follower with sound not heard in the engine you could also draw curves by hand, if it doesn’t need to sound nice.

Hey, thanks for this awesome documentation.

I follow all the steps and I have a problem with SoundeffectSourcePressetChain. I can add it in my SoundCue, I have Effect Tab. but I can’t *** it to my AudioComponent. I don’t have Effect tab in Details panel. @.?

Hi Bartosz!

Source Effects are applied to Sound Sources via the SoundBase, so you’ll find that your SoundWave will have them! :slight_smile:

Try double clicking on your VO_MD_vs_I005_autopsyroom_02 SoundWave.

In fact, with your implementation so far, you don’t even need a SoundCue. You can loop at the SoundWave level and you can have SoundWaves play on Audio Components. As it is, the SoundCue will add unnecessary ticking to your logic.

It’s best to think of Source Effects as effects at the Source.

Thanks @. for your quick reply.
I want to dynamicaly change treshold of compressor or frequency of EQ. I want to have acces to effect value from BP. Do I need to use follow listener? I don’t get this part. Is it even possible?