Navigation
API > API/Runtime > API/Runtime/SignalProcessing > API/Runtime/SignalProcessing/DSP
References
| Module | SignalProcessing |
| Header | /Engine/Source/Runtime/SignalProcessing/Public/DSP/Envelope.h |
| Include | #include "DSP/Envelope.h" |
Syntax
class FEnvelope
Remarks
Envelope class generates ADSR style envelope.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FEnvData | AttackData | ||
| float | AttackTimeMSec | ||
| uint8: 1 | bBiasInvert | Bias output inversions. | |
| uint8: 1 | bChanged | Whether or not this envelope has changed and needs to have values recomputed. | |
| uint8: 1 | bCurrentCycleIsADOnly | Tracks if the current envelope was started with sustain at 0.0 (avoids bug where sustain being turned up during decay phase makes note hang) | |
| float | BiasDepth | ||
| FPatchSource | BiasedEnvSource | ||
| uint8: 1 | bInvert | Inverts the output. | |
| uint8: 1 | bIsLegatoMode | Whether or not the envelope is reset back to attack when started. | |
| uint8: 1 | bIsRetriggerMode | Whether or not the envelope value is set to zero when finished. | |
| uint8: 1 | bIsSimulatingAnalog | Whether or not we want to simulate analog behavior. | |
| float | CurrentEnvelopeBiasValue | ||
| float | CurrentEnvelopeValue | ||
| EEnvelopeState | CurrentState | ||
| FEnvData | DecayData | ||
| float | DecayTimeMsec | ||
| float | Depth | ||
| FPatchSource | EnvSource | ||
| FModulationMatrix * | ModMatrix | Mod matrix. | |
| float | OutputGain | ||
| FEnvData | ReleaseData | ||
| float | ReleaseTimeMsec | ||
| float | SampleRate | ||
| float | ShutdownDelta | ||
| float | ShutdownTimeMsec | ||
| float | SustainGain | ||
| int32 | VoiceId | The current envelope value, used to compute exponential envelope curves. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FEnvelope () |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~FEnvelope () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| float | Generate
(
float* BiasedOutput |
Generate the next output value of the envelope. | |
| const FPatchSource | |||
| const FPatchSource | Get the envelope's patch nodes. | ||
| EEnvelopeState | GetState () |
||
| void | Init
(
const float InSampleRate, |
Initialize the envelope with the given sample rate. | |
| bool | IsDone () |
Queries if the envelope has finished. | |
| bool | IsRetrigger () |
||
| void | Kill () |
Kills the envelope (will cause discontinuity) | |
| void | Reset () |
Resets the envelope. | |
| void | SetAttackTime
(
const float InAttackTimeMsec |
Sets the envelope attack time in msec. | |
| void | SetBiasDepth
(
const float InDepth |
Sets the depth of the bias output. | |
| void | SetBiasInvert
(
const bool bInBiasInvert |
Inverts the value of the biased envelope output. | |
| void | SetDecayTime
(
const float InDecayTimeMsec |
Sets the envelope decay time in msec. | |
| void | SetDepth
(
const float InDepth |
Sets the envelope depth. | |
| void | SetInvert
(
const bool bInInvert |
Inverts the value of envelope output. | |
| void | SetLegato
(
const bool bInLegatoMode |
Sets whether the envelope is in legato mode. Legato mode doesn't restart the envelope if it's already playing. | |
| void | SetReleaseTime
(
const float InReleaseTimeMsec |
Sets the envelope release time in msec. | |
| void | SetRetrigger
(
const bool bInRetrigger |
Sets whether or not the envelope is zero'd when reset. | |
| void | SetSimulateAnalog
(
const bool bInSimulatingAnalog |
Sets the envelope mode. | |
| void | SetSustainGain
(
const float InSustainGain |
Sets the envelope sustain gain in linear gain values. | |
| void | Shutdown () |
Puts envelope into shutdown mode, which is a much faster cutoff than release, but avoids pops. | |
| void | Start () |
Start the envelope, puts envelope in attack state. | |
| void | StartLegato () |
||
| void | StartLegato
(
const float InNewDepth |
For truly legato envelope logic, we need to know the new sustain gain (if its being changed). | |
| void | Stop () |
Stop the envelope, puts in the release state. Can optionally force to off state. | |
| void | Update () |
Update the state of the envelope. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FEnvData |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EEnvelopeState | States for the envelope state machine. |