Module |
|
Header |
/Engine/Source/Runtime/SignalProcessing/Public/DSP/SinOsc.h |
Include |
#include "DSP/SinOsc.h" |
class FSineOsc
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 | Description | ||
---|---|---|---|
|
float |
Add |
|
|
float |
B1 |
|
|
float |
B2 |
|
|
float |
FrequencyHz |
|
|
SampleRate |
||
|
float |
Scale |
|
|
float |
Yn_1 |
|
|
float |
Yn_2 |
Name | Description | |
---|---|---|
|
FSineOsc() |
Constructor |
|
FSineOsc ( |
Non-default constructor |
Name | Description | |
---|---|---|
|
~FSineOsc() |
Virtual destructor |
Name | Description | ||
---|---|---|---|
|
float |
GetFrequency() |
Returns the current frequency. |
|
Init ( |
Initialize the oscillator with a sample rate and new frequency. |
|
|
float |
ProcessAudio() |
Generates the next sample of the oscillator. |
|
SetFrequency ( |
Sets the frequency of the oscillator in Hz (based on sample rate). |