An audio-reactive boids simulation actor that uses a managed compute shader to simulate boid behavior based on audio input. More...
#include <ST_C_VisAudioReactiveBoids.h>
Public Member Functions | |
AST_C_VisAudioReactiveBoids () | |
![]() | |
AST_VisComputeBase () | |
virtual void | Tick (float DeltaTime) override |
![]() | |
AST_VisBase () | |
virtual void | HandleBeginPlay () |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
virtual bool | RegisterToIO (EAudioIOType NewAudioIOType) |
bool | RegisterToIO (int32 NewAudioIOType) |
virtual void | DeregisterFromIO (EAudioIOType CurrAudioIOType) |
void | DeregisterFromIO (int32 CurrAudioIOType) |
![]() | |
void | OnAudioIOStatusChanged (bool bIsActive, FIntPoint IOId) |
Event triggered when the status of an audio I/O device changes. | |
void | OnRawMagnitudesReady (const TArray< float > &RawMagnitudes, FIntPoint IOId) |
Event triggered when raw magnitude data is ready for an audio I/O device. | |
void | OnFrequencyBandsReady (const TArray< float > &FrequencyBands, int32 NumFrequencyBands, FIntPoint IOId) |
Event triggered when frequency band data is ready for an audio I/O device. | |
void | OnAmplitudesReady (const TArray< float > &Amplitudes, FIntPoint IOId) |
Event triggered when amplitude data is ready for an audio I/O device. | |
void | OnPitchesReady (const TArray< float > &Pitches, FIntPoint IOId) |
Event triggered when pitch data is ready for an audio I/O device. | |
void | OnBeatDetected (const TArray< float > &Beats, const TArray< FChannelBeatDetection > &BeatDetectionForChannel, FIntPoint IOId) |
Event triggered when a beat is detected in the audio data for an I/O device. | |
Protected Member Functions | |
virtual void | BeginPlay () override |
virtual void | BeginDestroy () override |
virtual void | InitComputeShader_GameThread () override |
virtual void | InitComputeShader_RenderThread (FRHICommandListImmediate &RHICmdList) override |
virtual void | ExecuteComputeShader_GameThread (float DeltaTime) override |
virtual void | ExecuteComputeShader_RenderThread (FRHICommandListImmediate &RHICmdList) override |
virtual void | DisposeComputeShader_GameThread () override |
virtual void | DisposeComputeShader_RenderThread (FRHICommandListImmediate &RHICmdList) override |
virtual bool | SetConstantParameters () override |
virtual bool | SetDynamicParameters () override |
virtual FString | GetOwnerName () const override |
virtual void | OnAudioIOStatusChanged_Implementation (bool bIsActive, FIntPoint IOId) override |
virtual void | OnFrequencyBandsReady_Implementation (const TArray< float > &FrequencyBands, int32 NumFrequencyBands, FIntPoint IOId) override |
virtual void | OnAmplitudesReady_Implementation (const TArray< float > &Amplitudes, FIntPoint IOId) override |
virtual void | OnPitchesReady_Implementation (const TArray< float > &Pitches, FIntPoint IOId) override |
virtual void | OnBeatDetected_Implementation (const TArray< float > &Beats, const TArray< FChannelBeatDetection > &BeatDetectionForChannelWithBPM, FIntPoint IOId) override |
virtual TSoftObjectPtr< UNiagaraSystem > | GetNiagaraSystem () const |
![]() | |
virtual void | PostInitializeComponents () override |
Protected Attributes | |
FST_VJ_BoidCurrentParameters | BoidCurrentParameters |
FST_VJ_ReactiveBoidDynamicParameters | ReactiveBoidDynamicParameters |
TArray< FST_VJ_BoidItem > | BoidsArray |
UNiagaraComponent * | Niagara = nullptr |
UMaterialInstanceDynamic * | MatiD = nullptr |
FST_VJ_PingPongBuffer | BoidsPingPongBuffer |
FST_VJ_BoidsRDGStateData | BoidsRDGStateData |
FST_AudioIOData_GameThread | ST_AudioIOData_GT |
FST_AudioIOBuffers_RenderThread | ST_AudioIOBuffers_RT |
![]() | |
bool | bDebugSprite = true |
bool | bDebugBounds = true |
bool | bDebugDisplayInRuntime = false |
FST_VJ_BoundsConstantParameters | BoundsConstantParameters |
float | LastDeltaTime = 0.0f |
UST_VJ_RPCSManager * | cachedRPCSManager = nullptr |
![]() | |
USceneComponent * | Root = nullptr |
bool | bCustomBeginPlay = false |
bool | bSamplerActivates = false |
bool | bZeroSamplersDeactivates = false |
int32 | Default_AudioIOs = 0 |
int32 | Registered_AudioIOs = 0 |
Additional Inherited Members | |
![]() | |
static bool | IsPlaying (const UObject *WorldContextObject) |
An audio-reactive boids simulation actor that uses a managed compute shader to simulate boid behavior based on audio input.
AST_C_VisAudioReactiveBoids::AST_C_VisAudioReactiveBoids | ( | ) |
Sets default values for this actor's properties.
|
overrideprotectedvirtual |
Called when the actor is being destroyed.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Called when the game starts or when spawned.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Disposes of compute shader resources on the game thread.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Disposes of compute shader resources on the render thread.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Executes the compute shader on the game thread.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Executes the compute shader on the render thread.
Reimplemented from AST_VisComputeBase.
|
protectedvirtual |
Returns the Niagara system asset used for the boids visualization.
|
inlineoverrideprotectedvirtual |
Returns the owner's name for use in debugging or profiling.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Initializes the compute shader on the game thread.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Initializes the compute shader on the render thread.
Reimplemented from AST_VisComputeBase.
|
overrideprotectedvirtual |
Called when amplitude data is ready from the audio IO.
Amplitudes | Array of amplitude values. |
IOId | The identifier of the audio IO. |
|
overrideprotectedvirtual |
Called when the audio IO system's status changes.
bIsActive | Whether the audio IO system is active. |
IOId | The identifier of the audio IO. |
|
overrideprotectedvirtual |
Called when beats are detected.
Beats | An array of detected beat values. |
BeatDetectionForChannel | An array of channels and if a beat was detected with BPM. |
IOId | The identifier of the I/O operation associated with the beats. |
|
overrideprotectedvirtual |
Called when frequency band data is ready from the audio IO.
FrequencyBands | Array of frequency band values. |
NumFrequencyBands | Number of bands available. |
IOId | The identifier of the audio IO. |
|
overrideprotectedvirtual |
Called when pitch data is ready from the audio IO.
Pitches | Array of pitch values. |
IOId | The identifier of the audio IO. |
|
overrideprotectedvirtual |
Sets constant (non-changing) parameters for the compute shader.
Reimplemented from AST_VisBase.
|
overrideprotectedvirtual |
Sets dynamic (changing per-frame) parameters for the compute shader.
Reimplemented from AST_VisBase.
|
protected |
Current boid simulation parameters.
|
protected |
Array of boid items for simulation and visualization.
|
protected |
Ping-pong buffer for boid simulation data swapping between frames.
|
protected |
RDG state data used by the boids compute shader.
|
protected |
Material Instance Dynamic for colouring the boids.
|
protected |
Niagara component for rendering the boids.
|
protected |
Dynamic parameters that react to audio input.
|
protected |
Audio IO buffers stored on the render thread.
|
protected |
Audio IO data stored on the game thread.