FEnvelopeFollower

A simple utility that returns a smoothed value given audio input using an RC circuit.

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

/Engine/Source/Runtime/SignalProcessing/Public/DSP/EnvelopeFollower.h

Include

#include "DSP/EnvelopeFollower.h"

Syntax

class FEnvelopeFollower

Remarks

A simple utility that returns a smoothed value given audio input using an RC circuit. Used for following the envelope of an audio stream.

Variables

Name Description

Protected variable

float

 

AttackTimeMsec

Protected variable

float

 

AttackTimeSamples

Protected variable

bool

 

bIsAnalog

Protected variable

float

 

CurrentEnvelopeValue

Protected variable

EPeakMode::Type

 

EnvMode

Protected variable

float

 

ReleaseTimeMsec

Protected variable

float

 

ReleaseTimeSamples

Protected variable

float

 

SampleRate

Constructors

Name Description

Public function

FEnvelopeFollower()

Public function

FEnvelopeFollower

(
    const float InSampleRate,
    const float InAttackTimeMsec,
    const float InReleaseTimeMSec,
    const EPeakMode::Type InMode,
    const bool bInIsAnalg
)

Destructors

Name Description

Public function Virtual

~FEnvelopeFollower()

Functions

Name Description

Public function Const

float

 

GetCurrentValue()

Gets the current envelope value.

Public function

void

 

Init

(
    const float InSampleRate,
    const float InAttackTimeMsec,
    const float InReleaseTimeMSec,
    const EPeakMode::Type InMode,
    const bool bInIsAnalg
)

Initialize the envelope follower.

Public function

float

 

ProcessAudio

(
    const float InAudioSample
)

Processes the input audio stream and returns the envelope value.

Public function

int16

 

ProcessAudio

(
    const int16 InAudioSample
)

Process the input audio stream in int16 format.

Public function

float

 

ProcessAudio

(
    const float* InAudioBuffer,
    int32 InNumSamples
)

Process the input audio buffer and returns the last envelope value.

Public function

float

 

ProcessAudio

(
    const float* InAudioBuffer,
    float* OutAudioBuffer,
    int32 InNumSamples
)

Process the input audio buffer and returns the last envelope value.

Public function

float

 

ProcessAudioNonClamped

(
    const float InAudioSample
)

Processes the input audio stream and returns the envelope value.

Public function

void

 

Reset()

Resets the state of the envelope follower.

Public function

void

 

SetAnalog

(
    const bool bInIsAnalog
)

Sets whether or not to use analog or digital time constants.

Public function

void

 

SetAttackTime

(
    const float InAttackTimeMsec
)

Sets the envelope follower attack time (how fast the envelope responds to input)

Public function

void

 

SetMode

(
    const EPeakMode::Type InMode
)

Sets the output mode of the envelope follower.

Public function

void

 

SetReleaseTime

(
    const float InReleaseTimeMsec
)

Sets the envelope follower release time (how slow the envelope dampens from input)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss