Navigation
API > API/Runtime > API/Runtime/SignalProcessing
A stereo granulator.
| Name | FGranularSynth |
| Type | class |
| Header File | /Engine/Source/Runtime/SignalProcessing/Public/DSP/Granulator.h |
| Include Path | #include "DSP/Granulator.h" |
Syntax
class FGranularSynth
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGranularSynth() |
DSP/Granulator.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FGranularSynth() |
DSP/Granulator.h |
Structs
| Name | Remarks |
|---|---|
| FGrainParam | Current grain azimuth modulation. |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Generate
(
float* OutAudiobuffer, |
Generate the next audio buffer. | DSP/Granulator.h | |
float GetCurrentPlayheadTime() |
Get current playback time (in granular mode) | DSP/Granulator.h | |
int32 GetNumActiveGrains() |
Return the number of currently active grains. | DSP/Granulator.h | |
float GetSampleDuration() |
Returns the duration of the internal loaded sample buffer. | DSP/Granulator.h | |
void Init
(
const int32 InSampleRate, |
DSP/Granulator.h | ||
void LoadSampleBuffer
(
const TSampleBuffer< int16 >& InSampleBuffer |
Loads a sound wave to use for granular synth mode. | DSP/Granulator.h | |
void NoteOff
(
const uint32 InMidiNote, |
Note off, triggers release envelope. | DSP/Granulator.h | |
void NoteOn
(
const uint32 InMidiNote, |
Plays a granular synthesis "Note". | DSP/Granulator.h | |
void SeekTime
(
const float InTimeSec, |
Seeks the loaded buffer used for granulation. Grains will spawn from this location. | DSP/Granulator.h | |
void SetAttackTime
(
const float InAttackTimeMSec |
Sets the granular synth attack time. | DSP/Granulator.h | |
void SetDecayTime
(
const float InDecayTimeMSec |
Sets the granular synth decay time. | DSP/Granulator.h | |
void SetGrainDuration
(
const float InBaseDuration, |
Sets the grain duration. | DSP/Granulator.h | |
void SetGrainDurationScale
(
const float InDurationScale |
Sets the grain duration modulation. | DSP/Granulator.h | |
void SetGrainEnvelopeType
(
const EGrainEnvelopeType InGrainEnvelopeType |
Sets the envelope type to use for new grains. Will instantly switch all grains to this envelope type so may cause discontinuities if switched while playing. | DSP/Granulator.h | |
void SetGrainFrequency
(
const float InFrequency, |
Sets the grain frequency. | DSP/Granulator.h | |
void SetGrainFrequencyModulation
(
const float InFrequencyModulation |
Sets the grain frequency modulation. | DSP/Granulator.h | |
void SetGrainOscType
(
const EOsc::Type InGrainOscType |
Sets the grain oscillator type (for use with granular synthesis mode) | DSP/Granulator.h | |
void SetGrainPan
(
const float InBasePan, |
Sets the grain azimuth (pan) and randomization range. | DSP/Granulator.h | |
void SetGrainPanModulation
(
const float InPanModulation |
Sets the grain azimuth modulation - allows modulating actively playing grain azimuths. | DSP/Granulator.h | |
void SetGrainPitch
(
const float InBasePitch, |
Sets the base grain pitch and randomization range. | DSP/Granulator.h | |
void SetGrainPitchModulation
(
const float InPitchModulation |
Sets the grain pitch modulation allows modulating actively playing grain pitches. | DSP/Granulator.h | |
void SetGrainProbability
(
const float InGrainProbability |
The probability at which a grain will occur when a grain tries to spawn. Allows for sporatic grain generation. | DSP/Granulator.h | |
void SetGrainsPerSecond
(
const float InNumberOfGrainsPerSecond |
The rate at which new grains are attempted to be spawned. | DSP/Granulator.h | |
void SetGrainVolume
(
const float InBaseVolume, |
Sets the base grain volume and randomization range. | DSP/Granulator.h | |
void SetGrainVolumeModulation
(
const float InVolumeModulation |
Sets the grain modulation allows modulating actively playing grain volumes. | DSP/Granulator.h | |
void SetPlaybackSpeed
(
const float InPlaybackSpeed |
Sets how fast the granular play head for granulation is is played (and in what direction) | DSP/Granulator.h | |
void SetReleaseTime
(
const float InReleaseTimeMSec |
Sets the granular synth releas etime. | DSP/Granulator.h | |
void SetScrubMode
(
const bool bIsScrubMode |
Sets whether or not the buffer playback advances on its own or if it just sits in one place. | DSP/Granulator.h | |
void SetSustainGain
(
const float InSustainGain |
Sets the granular synth sustain gain. | DSP/Granulator.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetWrappedPlayheadPosition
(
float PlayheadFrame |
Return wrapped playhead position. | DSP/Granulator.h | |
void SpawnGrain() |
Spawns grains. | DSP/Granulator.h |