Navigation
API > API/Runtime > API/Runtime/SignalProcessing
FOsc Direct-form sinusoid oscillator. Created with a biquad filter (using only feedback coefficients) with poles directly on unit circle in z-plane. Setting frequency uses current filter state to compute initial conditions to avoid pops when changing frequency. Extremely cheap to run but expensive to set new frequencies. Good for test tones.
| Name | FSineOsc |
| Type | class |
| Header File | /Engine/Source/Runtime/SignalProcessing/Public/DSP/SinOsc.h |
| Include Path | #include "DSP/SinOsc.h" |
Syntax
class FSineOsc
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSineOsc () |
Constructor | DSP/SinOsc.h | |
FSineOsc
(
const int32 InSampleRate, |
Non-default constructor | DSP/SinOsc.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FSineOsc() |
Virtual destructor | DSP/SinOsc.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetFrequency() |
Returns the current frequency. | DSP/SinOsc.h | |
void Init
(
const int32 InSampleRate, |
Initialize the oscillator with a sample rate and new frequency. | DSP/SinOsc.h | |
float ProcessAudio() |
Generates the next sample of the oscillator. | DSP/SinOsc.h | |
void SetAdd
(
const float InAdd |
Sets the scale of the oscillator. | DSP/SinOsc.h | |
void SetFrequency
(
const float InFrequencyHz |
Sets the frequency of the oscillator in Hz (based on sample rate). | DSP/SinOsc.h | |
void SetScale
(
const float InScale |
Sets the scale of the oscillator. | DSP/SinOsc.h |