UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Audio::FEnvelopeFollower Class Reference

#include <EnvelopeFollower.h>

Public Member Functions

SIGNALPROCESSING_API FEnvelopeFollower ()
 
SIGNALPROCESSING_API FEnvelopeFollower (const FEnvelopeFollowerInitParams &InParams)
 
SIGNALPROCESSING_API void Init (const FEnvelopeFollowerInitParams &InParams)
 
SIGNALPROCESSING_API int32 GetNumChannels () const
 
SIGNALPROCESSING_API float GetSampleRate () const
 
SIGNALPROCESSING_API float GetAttackTimeMsec () const
 
SIGNALPROCESSING_API float GetReleaseTimeMsec () const
 
SIGNALPROCESSING_API bool GetAnalog () const
 
SIGNALPROCESSING_API EPeakMode::Type GetMode () const
 
SIGNALPROCESSING_API void SetNumChannels (int32 InNumChannels)
 
SIGNALPROCESSING_API void SetAnalog (bool bInIsAnalog)
 
SIGNALPROCESSING_API void SetAttackTime (float InAttackTimeMsec)
 
SIGNALPROCESSING_API void SetReleaseTime (float InReleaseTimeMsec)
 
SIGNALPROCESSING_API void SetMode (EPeakMode::Type InMode)
 
SIGNALPROCESSING_API void ProcessAudio (const float *InBuffer, int32 InNumFrames, float *OutBuffer)
 
SIGNALPROCESSING_API void ProcessAudio (const float *InBuffer, int32 InNumFrames)
 
SIGNALPROCESSING_API const TArray< float > & GetEnvelopeValues () const
 
SIGNALPROCESSING_API void Reset ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ FEnvelopeFollower() [1/2]

Audio::FEnvelopeFollower::FEnvelopeFollower ( )

Construct an envelope follower.

◆ FEnvelopeFollower() [2/2]

Audio::FEnvelopeFollower::FEnvelopeFollower ( const FEnvelopeFollowerInitParams InParams)

Construct an envelope follower.

Member Function Documentation

◆ GetAnalog()

bool Audio::FEnvelopeFollower::GetAnalog ( ) const

Returns whether or not to use analog or digital time constants

◆ GetAttackTimeMsec()

float Audio::FEnvelopeFollower::GetAttackTimeMsec ( ) const

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

◆ GetEnvelopeValues()

const TArray< float > & Audio::FEnvelopeFollower::GetEnvelopeValues ( ) const

Retrieve the final values of the envelope for each channel.

◆ GetMode()

EPeakMode::Type Audio::FEnvelopeFollower::GetMode ( ) const

Returns the input mode of the envelope follower

◆ GetNumChannels()

int32 Audio::FEnvelopeFollower::GetNumChannels ( ) const

Returns the number of channels per an input frame

◆ GetReleaseTimeMsec()

float Audio::FEnvelopeFollower::GetReleaseTimeMsec ( ) const

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

◆ GetSampleRate()

float Audio::FEnvelopeFollower::GetSampleRate ( ) const

Returns the number of frames per a second set on initialization

◆ Init()

void Audio::FEnvelopeFollower::Init ( const FEnvelopeFollowerInitParams InParams)

Initialize the envelope follower.

◆ ProcessAudio() [1/2]

void Audio::FEnvelopeFollower::ProcessAudio ( const float InBuffer,
int32  InNumFrames 
)

Calculate envelope

Parameters
InBuffer- Interleaved input data.
InNumFrames- Number of frames in InBuffer.

◆ ProcessAudio() [2/2]

void Audio::FEnvelopeFollower::ProcessAudio ( const float InBuffer,
int32  InNumFrames,
float OutBuffer 
)

Calculate envelope per sample.

Parameters
InBuffer- Interleaved input data.
InNumFrames- Number of frames in InBuffer.
OutBuffer- Output interleaved data. Should be same size as InBuffer.

◆ Reset()

void Audio::FEnvelopeFollower::Reset ( )

Resets the state of the envelope follower

◆ SetAnalog()

void Audio::FEnvelopeFollower::SetAnalog ( bool  bInIsAnalog)

Sets whether or not to use analog or digital time constants

◆ SetAttackTime()

void Audio::FEnvelopeFollower::SetAttackTime ( float  InAttackTimeMsec)

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

◆ SetMode()

void Audio::FEnvelopeFollower::SetMode ( EPeakMode::Type  InMode)

Sets the input mode of the envelope follower

◆ SetNumChannels()

void Audio::FEnvelopeFollower::SetNumChannels ( int32  InNumChannels)

Set the number of channels per an input frame.

◆ SetReleaseTime()

void Audio::FEnvelopeFollower::SetReleaseTime ( float  InReleaseTimeMsec)

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


The documentation for this class was generated from the following files: