FWaveTableOsc

A wave table oscillator class.

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

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

Include

#include "DSP/WaveTableOsc.h"

Syntax

class FWaveTableOsc

Remarks

A wave table oscillator class.

Variables

Name Description

Protected variable

float

 

FrequencyHz

The frequency of the output (given the sample rate)

Protected variable

float

 

NormalPhaseReadIndex

Normal phase read index.

Protected variable

float

 

OutputAdd

Amount to add to the output.

Protected variable

float

 

OutputScale

Amount to scale the output by.

Protected variable

float

 

PhaseIncrement

The phase increment (based on frequency)

Protected variable

float

 

QuadPhaseReadIndex

The quad-phase read index.

Protected variable

float

 

SampleRate

The sample rate of the oscillator.

Protected variable

TArray< float >

 

WaveTableBuffer

The wave table buffer.

Protected variable

EWaveTable::Typ...

 

WaveTableType

The wave table oscillator type.

Constructors

Name Description

Public function

FWaveTableOsc()

Constructor.

Destructors

Name Description

Public function Virtual

~FWaveTableOsc()

Virtual Destructor.

Functions

Name Description

Public function Static

TSharedPtr< ...

 

CreateWaveTable

(
    const EWaveTable::Type WaveTableTyp...,
    const int32 WaveTableSize
)

Creates a wave table using internal factories for standard wave tables or uses custom wave table factor if it exists.

Public function

void

 

Generate

(
    float* OutputNormalPhase,
    float* OutputQuadPhase
)

Processes the wave table, outputs the normal and quad phase (optional) values.

Public function Const

float

 

GetFrequencyHz()

Returns the frequency of the wave table oscillator.

Public function

TArray< floa...

 

GetTable()

Returns the internal table used in the wave table.

Public function Const

const TArray...

 

GetTable()

Returns the internal table used in the wave table.

Public function Const

EWaveTable::...

 

GetType()

Returns the type of the wave table oscillator.

Public function

void

 

Init

(
    const float InSampleRate,
    const float InFrequencyHz
)

Initialize the wave table oscillator.

Public function

void

 

Reset()

Resets the wave table read indices.

Public function

void

 

SetFrequencyHz

(
    const float InFrequencyHz
)

Sets the frequency of the wave table oscillator.

Public function

void

 

SetSampleRate

(
    const float InSampleRate
)

Sets the sample rate of the oscillator.

Public function

void

 

SetScaleAdd

(
    const float InScale,
    const float InAdd
)

Sets the amount to scale and add to the output of the wave table.

Protected function

void

 

UpdateFrequency()

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