FBiquadFilter

Biquad filter class which wraps a biquad filter struct Handles multi-channel audio to avoid calculating filter coefficients for multiple channels of audio.

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

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

Include

#include "DSP/Filter.h"

Syntax

class FBiquadFilter

Remarks

Biquad filter class which wraps a biquad filter struct Handles multi-channel audio to avoid calculating filter coefficients for multiple channels of audio.

Variables

Name Description

Protected variable

float

 

Bandwidth

Current bandwidth/resonance of the filter.

Protected variable

bool

 

bEnabled

Whether or not this filter is enabled (will bypass otherwise)

Protected variable

FBiquad *

 

Biquad

Biquad filter objects for each channel.

Protected variable

EBiquadFilter::...

 

FilterType

What kind of filter to use when computing coefficients.

Protected variable

float

 

Frequency

Current frequency of the filter.

Protected variable

float

 

GainDB

The gain of the filter in DB (for filters that use gain)

Protected variable

int32

 

NumChannels

Number of channels in the filter.

Protected variable

float

 

SampleRate

The sample rate of the filter.

Constructors

Name Description

Public function

FBiquadFilter()

Constructor.

Destructors

Name Description

Public function Virtual

~FBiquadFilter()

Destructor.

Functions

Name Description

Protected function

void

 

CalculateBiquadCoefficients()

Function computes biquad coefficients based on current filter settings.

Protected function

float

 

ClampCutoffFrequency

(
    float InCutoffFrequency
)

Function used to clamp the cutoff frequency.

Public function Const

int32

 

GetNumChannels()

Returns number of channels initialized with.

Public function

void

 

Init

(
    const float InSampleRate,
    const int32 InNumChannels,
    const EBiquadFilter::Type InType,
    const float InCutoffFrequency,
    const float InBandwidth,
    const float InGain
)

Initialize the filter.

Public function

void

 

ProcessAudio

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

Process a buffer of audio.

Public function

void

 

ProcessAudioFrame

(
    const float* InFrame,
    float* OutFrame
)

Processes a single frame of audio.

Public function

void

 

Reset()

Resets the filter state.

Public function

void

 

SetBandwidth

(
    const float InBandwidth
)

Sets the bandwidth (octaves) of the filter.

Public function

void

 

SetEnabled

(
    const bool bInEnabled
)

Sets whether or no this filter is enabled (if disabled audio is passed through)

Public function

void

 

SetFrequency

(
    const float InCutoffFrequency
)

Sets the filter frequency.

Public function

void

 

SetGainDB

(
    const float InGainDB
)

Sets the gain of the filter in decibels.

Public function

void

 

SetParams

(
    const EBiquadFilter::Type InFilterT...,
    const float InCutoffFrequency,
    const float InBandwidth,
    const float InGainDB
)

Sets all filter parameters with one function.

Public function

void

 

SetType

(
    const EBiquadFilter::Type InType
)

Sets the type of the filter to use.

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