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**.
- Right-click in the Content Browser and locate the** Sounds** submenu
- Select the Source Effect Preset Chain
- Name your newly created **Source Effect Preset Chain
&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.
- Right-click in the Content Browser and locate the **Sounds **submenu
- **Select **the Source Effect Preset
- From the list of possible processors, select the one you desire
&stc=1
- **Name **your newly created Source Effect Preset
- 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.
- Double-click your Source Effect Preset Chain Asset
- **Add **an array element to your Chain
- **Add **your Source Effect Preset to the **Preset **data member in your Chain element
- **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
**
-
**Access **the **Details **of your **SoundBase **object
-
On SoundWaves, this is done by double-clicking the asset in the browser and opening into the details panel
-
On SoundCues, this is done by opening the** SoundCue editor **and not selecting any specific node
-
On Components, this is done by** selecting the component** and accessing the details panel
-
**Locate **and expand the **Effects **sub-menu
-
**Locate **the Source Effect Chain entry
-
**Add **your Source Effect Chain to that **default **entry
&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.
- Get a reference to your Source Effect Chain Preset
- Place a Set Bypass Source Effect Chain Entry function
- Connect your reference to the Preset Chain input, or **select **your Preset Chain from the drop down
- **Indicate **the desired **Entry Index **value
- **Set **the **Bypassed **boolean variable
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.
- 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)
- **Place **a Set Settings function
- There will be an In Settings data struct pin
- 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
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!
- Create a new **Source Effect Envelope Follower Preset
&stc=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)
- Add your Source Effect Chain to the Sound Source you want to drive parameter data.
**Once you’ve set up the Envelope Follower, then you need to set up the Envelope Follower Listener.
**
- Add an **Envelope Follower Listener Component **to the Actor you want to use the envelope data.
- Then add a reference to your Source Effect Envelope Follower Preset.
- **Place **a **Register Envelope Follower Listener Function **to your Blueprint Graph
- Set your Target Input to the Envelope Follower Source Effect Reference
- 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:
**
- Add to your graph, an On Envelope Follower Update Event that is Assigned to your **Envelope Follower Listener Component
**