FAmp

Class which manages scaling audio input and performing panning operations.

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

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

Include

#include "DSP/Amp.h"

Syntax

class FAmp

Remarks

Class which manages scaling audio input and performing panning operations.

Variables

Name Description

Protected variable

bool

 

bChanged

Whether or not something changed since the last time generate was called.

Protected variable

int32

 

CurrentLerpSample

Protected variable

float

 

GainControl

Direct input gain control (i.e. gain slider)

Protected variable

float

 

GainEnv

Gain set from envelope.

Protected variable

FPatchDestinati...

 

GainEnvDest

Protected variable

float

 

GainMax

Protected variable

float

 

GainMin

Min and max output gain, can be changed based on need.

Protected variable

float

 

GainMod

A modulated value of gain, can be used for tremolo or amplitude modulation.

Protected variable

FPatchDestinati...

 

GainPanDest

Protected variable

FPatchDestinati...

 

GainScaleDest

Protected variable

float

 

GainVelocity

Gain due to midi velocity.

Protected variable

float

 

LeftGain

The final left and right output gain values.

Protected variable

FModulationMatr...

 

ModMatrix

Mod matrix.

Protected variable

float

 

Pan

Linear pan value [-1.0, 1.0].

Protected variable

float

 

PanMod

Linear pan modulator.

Protected variable

float

 

RightGain

Protected variable

int32

 

TargetDeltaSamples

Protected variable

float

 

TargetLeftGain

Values used for lerping gain values to avoid zippering.

Protected variable

float

 

TargetLeftSlope

Protected variable

float

 

TargetRightGain

Protected variable

float

 

TargetRightSlope

Protected variable

int32

 

VoiceId

Constructors

Name Description

Public function

FAmp()

Destructors

Name Description

Public function

~FAmp()

Functions

Name Description

Public function

void

 

Generate

(
    float& OutGainLeft,
    float& OutGainRight
)

Generates a new gain value for left and right outputs.

Public function Const

const FPatch...

 

GetModDestGainEnv()

Public function Const

const FPatch...

 

GetModDestGainScale()

Public function Const

const FPatch...

 

GetModDestPan()

Public function

void

 

Init

(
    const int32 InVoiceId,
    FModulationMatrix* ModMatrix
)

Initializes the amp with the mod matrix.

Public function

void

 

ProcessAudio

(
    const float LeftIn,
    float* LeftOutput,
    float* RightOutput
)

Takes mono input and generates stereo output.

Public function

void

 

ProcessAudio

(
    const float LeftIn,
    const float RightIn,
    float* LeftOutput,
    float* RightOutput
)

Takes stereo input and generates stereo output.

Public function

void

 

Reset()

Public function

void

 

SetGain

(
    const float InGainLinear
)

Sets the direct gain in linear.

Public function

void

 

SetGainDb

(
    const float InGainDB
)

Sets the direct gain in decibel.

Public function

void

 

SetGainEnv

(
    const float InGainEnv
)

Sets the gain based on an envelope value.

Public function

void

 

SetGainEnvDb

(
    const float InGainEnvDb
)

Sets the gain based on an envelope value.

Public function

void

 

SetGainMod

(
    const float InBipolarGainModLinear
)

Sets the gain modulation in linear. Expects modulation value to be bipolar (for AM synth, etc)

Public function

void

 

SetGainModDb

(
    const float InGainModDb
)

Sets the gain modulation in decibel.

Public function

void

 

SetGainRange

(
    const float InMin,
    const float InMax
)

Change the allowed range of the gain output.

Public function

void

 

SetPan

(
    const float InPan
)

Sets the pan.

Public function

void

 

SetPanModulator

(
    const float InPanMod
)

Sets the pan modulator.

Public function

void

 

SetVelocity

(
    const float InVelocity
)

Sets the gain using a midi velocity value.

Public function

void

 

Update()

Updates the final output left and right gain based on current settings.

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