FEnvelopeFollower

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

Choose your operating system:

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.

Constructors

Name Description

Public function

FEnvelopeFollower()

Construct an envelope follower.

Public function

FEnvelopeFollower

(
    const FEnvelopeFollowerInitParams&...
)

Construct an envelope follower.

Functions

Name Description

Public function Const

bool

 

GetAnalog()

Returns whether or not to use analog or digital time constants

Public function Const

float

 

GetAttackTimeMsec()

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

Public function Const

const TArray...

 

GetEnvelopeValues()

Retrieve the final values of the envelope for each channel.

Public function Const

EPeakMode::T...

 

GetMode()

Returns the input mode of the envelope follower

Public function Const

int32

 

GetNumChannels()

Returns the number of channels per an input frame

Public function Const

float

 

GetReleaseTimeMsec()

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

Public function Const

float

 

GetSampleRate()

Returns the number of frames per a second set on initialization

Public function

void

 

Init

(
    const FEnvelopeFollowerInitParams&...
)

Initialize the envelope follower.

Public function

void

 

ProcessAudio

(
    const float* InBuffer,
    int32 InNumFrames,
    float* OutBuffer
)

Calculate envelope per sample.

Public function

void

 

ProcessAudio

(
    const float* InBuffer,
    int32 InNumFrames
)

Calculate envelope

Public function

void

 

Reset()

Resets the state of the envelope follower

Public function

void

 

SetAnalog

(
    bool bInIsAnalog
)

Sets whether or not to use analog or digital time constants

Public function

void

 

SetAttackTime

(
    float InAttackTimeMsec
)

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

Public function

void

 

SetMode

(
    EPeakMode::Type InMode
)

Sets the input mode of the envelope follower

Public function

void

 

SetNumChannels

(
    int32 InNumChannels
)

Set the number of channels per an input frame.

Public function

void

 

SetReleaseTime

(
    float InReleaseTimeMsec
)

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