Navigation
API > API/Plugins > API/Plugins/MetasoundFrontend
FTrigger supports sample accurate triggering, sample accurate internal tracking, and a convenient interface for running trigger-aligned audio signal processing routines on buffers..
FTriggers are triggered using FTrigger::TriggerTime or FTrigger::TriggerFrame. FTriggers track time internally by calling FTrigger::Advance. Executing audio signal processing on buffers can be performed by calling FTrigger::ExecuteBlock or FTrigger::LookAhead.
| Name | FTrigger |
| Type | class |
| Header File | /Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundTrigger.h |
| Include Path | #include "MetasoundTrigger.h" |
Syntax
class FTrigger
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTrigger
(
const FOperatorSettings& InSettings |
FTrigger constructor. By default it is not triggered. | MetasoundTrigger.h | |
FTrigger
(
const FOperatorSettings& InSettings, |
FTrigger constructor. | MetasoundTrigger.h | |
FTrigger
(
const FOperatorSettings& InSettings, |
FTrigger constructor. | MetasoundTrigger.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasAdvanced | bool | MetasoundTrigger.h | ||
| bHasTrigger | bool | MetasoundTrigger.h | ||
| bTriggeredFromInit | bool | MetasoundTrigger.h | ||
| LastTriggerIndexInBlock | int32 | MetasoundTrigger.h | ||
| NumFramesPerBlock | int32 | MetasoundTrigger.h | ||
| SampleRate | FSampleRate | MetasoundTrigger.h | ||
| TriggeredFrames | TArray< int32 > | MetasoundTrigger.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Advance
(
int32 InNumFrames |
Advance internal frame counters by specific frame count. | MetasoundTrigger.h | |
void AdvanceBlock() |
Advance internal frame counters by block size. | MetasoundTrigger.h | |
void AssignRawParameter
(
const void* ParamPackPayload |
For use when a Trigger request is found in a Parameter Pack | MetasoundTrigger.h | |
void ExecuteBlock
(
PreTriggerType InPreTrigger, |
Executes one block of frames and calls underlying InPreTrigger and InOnTrigger functions with frame indices. | MetasoundTrigger.h | |
int32 First() |
Returns frame index for the first trigger in the block. | MetasoundTrigger.h | |
const TArray< int32 > & GetTriggeredFrames() |
MetasoundTrigger.h | ||
bool IsTriggered() |
Returns true if there are any triggered frames. | MetasoundTrigger.h | |
bool IsTriggeredInBlock() |
Returns true there is a trigger in the current block of audio. | MetasoundTrigger.h | |
int32 Last() |
Returns frame index for the last trigger in the block. | MetasoundTrigger.h | |
void LookAhead
(
int32 InNumFrames, |
Executes a desired number of frames and calls underlying InPreTrigger and InOnTrigger functions with frame indices. | MetasoundTrigger.h | |
int32 Num() |
Number of triggered frames. | MetasoundTrigger.h | |
int32 NumTriggeredInBlock() |
Returns true if there is a trigger in the current block of audio | MetasoundTrigger.h | |
void RemoveAfter
(
int32 InFrameIndex |
Removes all triggers which occur after the frame index. | MetasoundTrigger.h | |
void Reset() |
Removes all triggered frames. | MetasoundTrigger.h | |
void TriggerFrame
(
int32 InFrameToTrigger |
Trigger a specific frame in the future. | MetasoundTrigger.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Implicit conversion of FTrigger into bool by calling IsTriggeredInBlock() | MetasoundTrigger.h | |
int32 operator[]
(
int32 InTriggerIndex |
Returns frame index for a given trigger index. | MetasoundTrigger.h |