Navigation
API > API/Runtime > API/Runtime/SignalProcessing > API/Runtime/SignalProcessing/DSP
Inheritance Hierarchy
References
| Module | SignalProcessing |
| Header | /Engine/Source/Runtime/SignalProcessing/Public/DSP/Osc.h |
| Include | #include "DSP/Osc.h" |
Syntax
class IOscBase
Remarks
Oscillator base class.
Variables
| Type | Name | Description | |
|---|---|---|---|
| float | BaseFreq | The base frequency of the oscillator. | |
| bool | bChanged | ||
| bool | bIsPlaying | Whether or not the oscillator is on or off. | |
| bool | bIsSync | ||
| float | ExternalGainMod | Linear gain modulation of the oscillator (used in amplitude modulation) | |
| IOscBase * | FollowerOsc | Ptr to a follower oscillator that can be triggered to 0 phase if it is synced. | |
| float | Freq | The final frequency of the oscillator after computing all factors contributing to frequency. | |
| FOscFrequencyMod | FreqData | Holds all frequency data. | |
| float | Gain | Linear gain of the oscillator. | |
| FPatchDestination | ModAddDest | ||
| FPatchDestination | ModFrequencyDest | ||
| FPatchDestination | ModGainDest | ||
| FModulationMatrix * | ModMatrix | Modulation matrix to use for this oscillator. | |
| FPatchDestination | ModPulseWidthDest | ||
| FPatchDestination | ModScaleDest | ||
| float | Nyquist | Maximum frequency allowed. | |
| float | Phase | The current phase of oscillator (between 0.0 and 1.0) | |
| float | PhaseInc | How much to increment the phase each update. | |
| float | PulseWidth | The final pulse width. | |
| float | PulseWidthBase | Pulse width used in square LFOs. | |
| float | PulseWidthMod | Pulse width modulator factor. | |
| float | SampleRate | Sample rate of the oscillator. | |
| int32 | VoiceId | The voice ID that this oscillator belongs to. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
IOscBase () |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~IOscBase () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| float | Generate
(
float* AuxOutput |
Generates the next sample of audio, optionally passes out the auxillary output (supported in some oscillators) | |
| float | GetFrequency () |
Returns the frequency of the oscillator. | |
| float | GetGain () |
Returns the frequency of the oscillator. | |
| FPatchDestination | |||
| FPatchDestination | Return patch destinations for various modulatable parameters. | ||
| FPatchDestination | |||
| FPatchDestination | |||
| FPatchDestination | |||
| float | GetPhase () |
Returns the current phase of the oscillator. | |
| float | GetQuadPhase () |
Returns the quadrature phase, wrapped. | |
| void | Init
(
const float InSampleRate, |
Initializes the oscillator. | |
| bool | IsPlaying () |
Returns whether or not this oscillator is playing. | |
| bool | IsSync () |
Returns if this oscillator should be synced to a leader oscillator. | |
| void | Reset () |
Resets the oscillator. | |
| void | ResetPhase () |
Resets the phase of this oscillator to 0.0f. | |
| void | SetCents
(
const float InCents |
||
| void | SetDetune
(
const float InDetune |
||
| void | SetFollowerOsc
(
IOscBase* InFollowerOsc |
Sets the input oscillator as the follower of this oscillator. | |
| void | SetFreqScale
(
const float InFreqScale |
||
| void | SetFrequency
(
const float InFreqBase |
Sets the base frequency of the oscillator. | |
| void | SetFrequencyMod
(
const float InFreqMod |
Sets a frequency modulation value. | |
| void | SetGain
(
const float InGain |
Sets the gain of the oscillator. | |
| void | SetGainMod
(
const float InGainMod |
Sets the gain modulator of the oscillator. | |
| void | SetNote
(
const float InNote |
Sets the base frequency of the oscillator from the midi note number. | |
| void | SetOctave
(
const float InOctave |
||
| void | SetPitchBend
(
const float InPitchBend |
||
| void | SetPulseWidth
(
const float InPulseWidth |
Sets the LFO pulse width for square-wave type oscillators. | |
| void | SetSampleRate
(
const float InSampleRate |
||
| void | SetSemitones
(
const float InSemiTone |
||
| void | SetSync
(
const bool bInSync |
Sets whether or not this oscillator should be synced to a leader oscillator. leader oscillator needs to have set this oscillator as its follower. | |
| void | Start () |
Starts the oscillator. | |
| void | Stop () |
Stops the oscillator. | |
| void | Update () |
Updates oscillator state. | |
| void | UpdatePhase () |
Updates the phase based on the phase increment. | |
| bool | WrapPhase () |
Returns true if there was a phase wrap this update. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | SetSlaveOsc
(
IOscBase* InSlaveOsc |
SetSlaveOsc is deprecated, please use SetFollowerOsc instead. |