Navigation
API > API/Runtime > API/Runtime/SignalProcessing
| Name | FGrainDelay |
| Type | class |
| Header File | /Engine/Source/Runtime/SignalProcessing/Public/DSP/GrainDelay.h |
| Include Path | #include "DSP/GrainDelay.h" |
Syntax
class FGrainDelay
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGrainDelay
(
const float InSampleRate, |
DSP/GrainDelay.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FGrainDelay() |
DSP/GrainDelay.h |
Structs
| Name | Remarks |
|---|---|
| FGrain | Simple grain data structure for tracking grain state. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveGrains | TArray< int32 > | Active grain indices in the grain pool. | DSP/GrainDelay.h | |
| DelayPitchShifters | TArray< FTapDelayPitchShifter > | A pitch shifting delay line. | DSP/GrainDelay.h | |
| DynamicsProcessor | FDynamicsProcessor | Dynamics processor for the grain synthesis. | DSP/GrainDelay.h | |
| FeedbackAmount | float | The current feedback amount. | DSP/GrainDelay.h | |
| FreeGrains | TArray< int32 > | Free grain indices in the grain pool. | DSP/GrainDelay.h | |
| GrainDelayLine | FDelay | The shared delay lines per channel. | DSP/GrainDelay.h | |
| GrainEnvelope | Grain::FEnvelope | The shared envelope value. Recomputed when a new envelope is set. | DSP/GrainDelay.h | |
| GrainEnvelopeType | Grain::EEnvelope | DSP/GrainDelay.h | ||
| GrainPool | TArray< FGrain > | The actual grain pool. Reuses tracking memory for grain lifetimes. | DSP/GrainDelay.h | |
| LastFrame | float | Cached value of last rendered frame. Used for feedback. | DSP/GrainDelay.h | |
| MaxDelaySeconds | float | DSP/GrainDelay.h | ||
| MaxGrains | int32 | The maximum grains to have rendering. | DSP/GrainDelay.h | |
| PitchShiftRatioBase | float | The base pitch shift ratio (pitch scale) of all grains in the grain delay. | DSP/GrainDelay.h | |
| SampleRate | float | Sample rate track to easily deal with pitch scale calculations. | DSP/GrainDelay.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetGrainDelayClamped
(
const float InDelay |
Helpers to clamp audio. | DSP/GrainDelay.h | |
float GetGrainDelayRatioClamped
(
const float InGrainDelayRatio |
DSP/GrainDelay.h | ||
float GetGrainDurationClamped
(
const float InDuration |
DSP/GrainDelay.h | ||
float GetGrainPitchShiftClamped
(
const float InPitchShift |
DSP/GrainDelay.h | ||
float GetGrainPitchShiftFrameRatio
(
const float InPitchShift |
DSP/GrainDelay.h | ||
void Reset() |
DSP/GrainDelay.h | ||
void SetFeedbackAmount
(
float InFeedbackAmount |
Sets the feedback amount (how much output grain audio feeds into the delay line) | DSP/GrainDelay.h | |
void SetGrainBasePitchShiftRatio
(
const float InPitchRatioBase |
Sets the base pitch shift ratio of all grains. | DSP/GrainDelay.h | |
void SetGrainEnvelope
(
const Audio::Grain::EEnvelope InGrainEnvelope |
Sets the grain envelope. | DSP/GrainDelay.h | |
void SetMaxGrains
(
const int32 InMaxGrains |
Dynamically sets the max grains. | DSP/GrainDelay.h | |
void SpawnGrain
(
const float InDelay, |
Spawns a new grain with the given parameters. | DSP/GrainDelay.h | |
void SynthesizeAudio
(
const int32 StartFrame, |
Synthesize audio in the given frame range from input audio. Writes to OutAudioBuffer. | DSP/GrainDelay.h |