VJ Master Project Structure

How It Works

Audio moves through the plugin in five stages. Each stage lives in its own part of the source, listed further down.

Source

An audio IO captures or plays audio: microphone, loopback, engine submix, a file player or a generated signal.

ST_AudioProcessing / IO
Analysis

Every active IO has its own FFT thread: windowing, FFT, frequency bands, amplitude, pitch and beats.

ST_AudioProcessing / FFT
Delivery

Results return to the game thread and are sent to every registered sampler, as interface events or delegates.

ST_AudioProcessing / Main
Visualisation

Niagara, materials, compute shaders and the post-process chain read the same results. On the GPU they are indexed by the Audio IO Buffer.

ST_AudioVisualisation
Output

LED actors send a material or render target over DMX, OSC or a socket. MIDI is received and sent through the MIDI manager.

ST_AudioControl, ST_AudioVisControl, ST_AudioControlMIDI

Plugin Folders

FolderContents
ST_VJMaster.upluginPlugin descriptor: version, modules, supported platforms and engine plugin dependencies.
Source/The C++ modules, and the third-party MiniAudio and KissFFT source under Thirdparty.
Shaders/Compute, material, Niagara and post-process shaders, mapped to /ST_AudioVisualisation.
Content/Example maps, Blueprints, materials, Niagara systems and data assets.
Config/BaseST_VJMaster.ini: default project settings and class redirects.
ExampleAudio/Audio files used by the playback examples (Creative Commons 0).
Resources/Plugin icon.
TOU/Terms of use.

Modules

ModulePlatformsRole
ST_AudioProcessingWin64, Mac, Linux, Android, iOSCapture, playback and analysis. Every audio IO, the FFT thread and the Blueprint function library. No dependency on the other modules.
ST_AudioVisualisationWin64, Mac, Linux, Android, iOSEverything that draws from the analysis: Niagara data interfaces, material expressions, compute shaders and the post-process chain.
ST_AudioControlWin64, Mac, LinuxThe OSC, DMX and socket managers and the shared LED pipeline.
ST_AudioVisControlWin64, Mac, LinuxThe LED output actors: a material or render target sent over DMX, OSC or a socket.
ST_AudioControlMIDIWin64, Mac, LinuxEverything MIDI: the manager, the control interface and the MIDI-driven material visualiser.
ST_MIDIDeviceLinuxLinuxStand-in for the engine MIDI Device plugin on Linux, built on ALSA raw MIDI.
ST_VJMasterEditorEditorToolbar menu, details panel and settings customisations, and the licence check.

Source Files

Headers are under Public and implementations under Private, in the same sub-folder. Select a module to list its files.

ST_AudioProcessingSource/ST_AudioProcessing25 files

Capture, playback and analysis. Every audio IO, the FFT thread and the Blueprint function library. No dependency on the other modules.

FFT

FileTypePurpose
ST_AudioResultsChannel.hThe newest finished analysis of one audio IO.
ST_FFTThread.h / .cppBackground worker that turns each captured audio period into FFT magnitudes, frequency bands, amplitude, pitch and beat results.

IO/Base

FileTypePurpose
ST_AudioIOBase.h / .cppBase class of every audio IO: activation, sampler registration, device selection and delivery of the analysis results.
ST_AudioIOCaptureBase.h / .cppAbstract base of the MiniAudio-backed capture sources.
ST_AudioIOPlaybackBase.h / .cppAbstract base of the MiniAudio-backed playback sources.

IO/Capture

FileTypePurpose
ST_AudioCaptureEngineSubmix.h / .cppCaptures Unreal's own audio output by listening to the main submix, so it needs no OS loopback support.
ST_AudioCaptureLoopback.h / .cppCaptures the system output mix through MiniAudio's WASAPI loopback backend.
ST_AudioCaptureMicrophone.h / .cppCaptures from a microphone or other input device through MiniAudio.

IO/Playback

FileTypePurpose
ST_AudioPlaybackEnginePlayer.h / .cppPlays the configured audio file on the playback device through a miniaudio engine, and analyses the played audio.
ST_AudioPlaybackNoise.h / .cppPlays miniaudio-generated noise on the playback device and analyses it.
ST_AudioPlaybackPlayer.h / .cppPlays the configured audio file on the playback device through a miniaudio decoder, optionally looping, and analyses the played audio.
ST_AudioPlaybackWaveform.h / .cppPlays a miniaudio-generated waveform on the playback device and analyses it.

Mac

FileTypePurpose
ST_MacSystemAudioTap.h / .mmExperimental macOS system audio capture through Core Audio process taps.

Main

FileTypePurpose
ST_AudioIOInstanceManager.h / .cppEngine subsystem that owns the additional capture instances (up to 8 extra microphones or loopbacks).
ST_AudioProcessingFunctionLibrary.h / .cppThe Blueprint, material and Niagara facing entry point to the audio module: finds audio IOs, converts between IO types and ids, and lists devices.
ST_AudioProcessingInterface.hInterface a sampler implements to receive frequency band, amplitude, pitch and beat events.
ST_AudioProcessingSettings.hProject settings of the audio module: the IO types, the configuration of each IO and its FFT config asset.
ST_MiniAudioEnumerationContext.hMiniAudio context used to list the playback and capture devices.

Sound

FileTypePurpose
ST_AudioSoundWaveProcedural.h / .cppProcedural sound wave that plays back the audio an IO captures or plays, so the same signal can be heard in-engine.

ThirdParty

FileTypePurpose
ST_KissFFT.cppCompiles the bundled KissFFT source on platforms where the engine does not ship the library.
ST_KissFFTR.cppCompiles the bundled KissFFT real-FFT source on the same platforms.

Module root

FileTypePurpose
ST_AudioProcessing.h / .cppModule entry point; also holds the MiniAudio implementation.
ST_AudioProcessing_IOS_UPL.xmlAdds the microphone permission text to iOS builds.
ST_AudioProcessing_UPL.xmlPackaging additions for Android builds.
ST_AudioProcessing.build.csBuild rules of the module.
ST_AudioVisualisationSource/ST_AudioVisualisation51 files

Everything that draws from the analysis: Niagara data interfaces, material expressions, compute shaders and the post-process chain.

Compute/GraphBuilder

FileTypePurpose
ST_VJ_BoidsGB.h / .cppAdds the reactive boids passes, and the audio upload they read, to a render graph.

Compute/Mesh

FileTypePurpose
ST_VJ_BoidsInstanceWriter.h / .cppDraws the reactive boids as meshes: writes the boids buffer into GPU Scene instances (CS_BoidsWriteInstances.usf).
ST_VJ_GPUInstancedMeshComponent.h / .cppStatic mesh component whose instance transforms are written straight into GPU Scene by a compute shader.
ST_VJ_GPUSceneSupport.hEngine-version checks for GPU Scene and GPU-only instances.
ST_VJ_SpectrumFieldSimulation.h / .cppGPU side of the spectrum field: its state buffer, the step pass and the pass that writes GPU Scene instances.

Compute/Shaders

FileTypePurpose
ST_VJ_BoidsRPCS.h / .cppDeclarations and dispatch of the boids compute shaders.

Compute/Utils

FileTypePurpose
ST_VJ_ComputeFunctionLibrary.h / .cppStructured-buffer helpers for the plugin's RDG compute passes; render thread only, nothing here is Blueprint-facing.
ST_VJ_ManagedRPCSInterface.hInterface a compute visualiser implements to be dispatched by the manager.
ST_VJ_PingPongBuffer.hA pair of pooled GPU buffers a compute pass reads one of and writes the other, swapped after every dispatch.
ST_VJ_RPCSManager.h / .cppDrives every compute visualiser in a world: one registers here and is dispatched each tick.

Compute/Vis

FileTypePurpose
ST_C_VisAudioReactiveBoids.h / .cppA flock of boids simulated on the GPU, steered by the frequency bands, amplitudes, pitches and beats of an audio IO.
ST_C_VisSpectrumField.h / .cppA field of real meshes that is a live 3D spectrogram, batch rendered straight from a compute shader.

Data

FileTypePurpose
ST_AudioIOLib.hC++ side of the Audio IO Buffer layout and the packed audio arrays sent to the GPU.
ST_AudioReactiveBoidsLib.hSettings structs of the reactive boids.
ST_SpectrumFieldLib.hSettings struct and layouts of the spectrum field.

Main

FileTypePurpose
ST_AudioVisFunctionLibrary.h / .cppBuilds the packed audio buffers a visualiser hands to the GPU, and pushes them into Niagara.
ST_AudioVisSettings.hProject settings of the visualisers: material IOs, display colours and the settings of each example.

Main/Base

FileTypePurpose
ST_VisBase.h / .cppBase class for visualisation actors, implementing the audio processing interface.
ST_VisComputeBase.h / .cppBase class for visualisation actors whose simulation runs as a compute shader.
ST_VisMaterialBase.h / .cppBase class for visualisation actors that drive a dynamic material instance from the chosen audio IO.
ST_VisNiagaraBase.h / .cppBase class for visualisation actors that drive a Niagara system from the chosen audio IO.

Material/Expressions

FileTypePurpose
ST_AudioAmplitudeExpression.h / .cppMaterial node that exposes the running amplitude history of an audio IO to a material graph.
ST_AudioBeatDetectionExpression.h / .cppMaterial node that exposes the beat-detection history of an audio IO, including its BPM values, to a material graph.
ST_AudioExpressionCommon.h / .cppCode shared by the audio material expressions, including the Data Source option.
ST_AudioFrequencyBandExpression.h / .cppMaterial node that exposes the FFT frequency-band spectrum and its history for an audio IO to a material graph.
ST_AudioPitchExpression.h / .cppMaterial node that exposes the detected pitch history of an audio IO to a material graph.

Material/SUB

FileTypePurpose
ST_AudioScene.h / .cppEngine subsystem that samples the audio IOs for materials and feeds the scene view extension.
ST_AudioSceneUB.h / .cppParameters of the audio scene uniform buffer read by the material shaders.
ST_AudioSceneViewExtension.h / .cppScene view extension that uploads the audio data to the ST_Audio scene uniform buffer and the audio data texture.

Material/Vis

FileTypePurpose
ST_M_VisMPC.h / .cppVisualiser that drives the Material Parameter Collection set in UST_AudioVisSettings (VisMPCData) from audio.

Niagara/DataInterfaces

FileTypePurpose
NiagaraDataInterfaceSTAudio.h / .cppNiagara data interface exposing the analysed audio buffers (frequency bands, amplitudes, pitches, beats) of every audio IO to particle scripts.
NiagaraDataInterfaceSTReactiveBoids.h / .cppNiagara data interface exposing the boid state produced by the reactive boids compute pass to GPU particle scripts.
NiagaraDataInterfaceSTWaveformDisplay.h / .cppNiagara data interface supplying particle colours (solid, random, HSV, mapped) from the waveform display colour settings.

Niagara/Vis

FileTypePurpose
ST_N_VisAmplitude.h / .cppDrives a Niagara system with the amplitude history of the first registered audio IO.
ST_N_VisBeatDetection.h / .cppDrives a Niagara system with beat detection from the first registered audio IO.
ST_N_VisFrequency.h / .cppDrives a Niagara system with the frequency bands of the first registered audio IO, passed as an array.
ST_N_VisFrequencyBuffer.h / .cppDrives a Niagara system through UNiagaraDataInterfaceSTAudio instead of a float array.
ST_N_VisPitch.h / .cppDrives a Niagara system with the pitch history of the first registered audio IO.
ST_N_VisWebcam.h / .cppFeeds the live webcam image and the audio level into a Niagara system's user parameters.

PostFX

FileTypePurpose
ST_PostFXParameters.hSettings of the three post-process passes, the audio drives and the raymarch playlist.
ST_PostFXScene.h / .cppEngine subsystem that owns the ShaderTech post-process chain and feeds it every frame.
ST_PostFXSceneViewExtension.h / .cppScene view extension that draws the raymarch, video layer and feedback passes after tonemapping.
ST_RaymarchPilot.h / .cppFlies the raymarch pass's camera through the inside of the fractal scenes, close to the geometry.
ST_RaymarchSceneAsset.hData asset holding one look of the raymarch pass.
ST_WebcamSource.h / .cppOpens a webcam through the media framework and exposes it as a texture.

PostFX/Vis

FileTypePurpose
ST_PP_VisFeedback.h / .cppDrives the feedback pass: each frame is drawn over a zoomed, rotated, fading copy of the last one.
ST_PP_VisPostFXBase.h / .cppBase of the post-process visualisers: each subclass drives one pass of the chain in UST_PostFXScene.
ST_PP_VisRaymarch.h / .cppDrives the raymarch pass: a tunnel, Mandelbox or Menger sponge traced over the whole screen.
ST_PP_VisVideoLayer.h / .cppDrives the video layer: a webcam or texture composited over the scene.

Module root

FileTypePurpose
ST_AudioVisualisation.h / .cppModule that maps the plugin's shader directory to /ST_AudioVisualisation on startup.
ST_AudioVisualisation.Build.csBuild rules of the module.
ST_AudioControlSource/ST_AudioControl11 files

The OSC, DMX and socket managers and the shared LED pipeline.

DMX

FileTypePurpose
ST_DMXControlInterface.hInterface for objects managed by the DMX manager.
ST_DMXManager.h / .cppSends LED matrix colours and fixed attribute values to DMX fixture patches.

Main

FileTypePurpose
ST_AudioControlFunctionLibrary.h / .cppShared LED pipeline used by every output transport (DMX, OSC, UDP).
ST_AudioControlSettings.hProject settings of the control module: DMX, OSC, socket, MIDI and LED configuration.

Main/Base

FileTypePurpose
ST_AudioControlManagerBase.h / .cppGame-instance subsystem base for the OSC, DMX and socket managers; tracks the items and controllers registered with one transport.

OSC

FileTypePurpose
ST_OSCManager.h / .cppSends LED colour data as OSC blobs through a UOSCClient built from the OSConfig settings.
ST_OSControlInterface.hInterface for objects managed by the OSC manager.

Socket

FileTypePurpose
ST_SocketControlInterface.hInterface for objects managed by the socket manager.
ST_SocketManager.h / .cppSends LED colour data as UDP datagrams to the IP and port in SocketConfig.UDPConfig.

Module root

FileTypePurpose
ST_AudioControl.h / .cppModule entry point for ST_AudioControl, the OSC, DMX and UDP output transports; it holds no startup state.
ST_AudioControl.Build.csBuild rules of the module.
ST_AudioVisControlSource/ST_AudioVisControl9 files

The LED output actors: a material or render target sent over DMX, OSC or a socket.

Control

FileTypePurpose
ST_DMXMatLED.h / .cppMatLED output over DMX (Art-Net).
ST_OSCMatLED.h / .cppMatLED output over OSC, sending the LED colours as one blob to the address in the project's OSC settings.
ST_SocketMatLED.h / .cppMatLED output over a UDP socket, sending the LED colours as one packet per tick.
ST_SocketRTLED.h / .cppScene-capture LED output over a UDP socket.

Control/Base

FileTypePurpose
ST_AudioControlBase.h / .cppAbstract base for actors that send the scene to an external output, with editor-selection hooks.
ST_AudioControlMatLEDBase.h / .cppAbstract LED output that draws a material into a render target and sends it as LED colours.
ST_AudioControlRTLEDBase.h / .cppAbstract LED output that captures the scene with a scene capture component.

Module root

FileTypePurpose
ST_AudioVisControl.h / .cppModule for the LED and lighting output actors (DMX, OSC and UDP socket).
ST_AudioVisControl.Build.csBuild rules of the module.
ST_AudioControlMIDISource/ST_AudioControlMIDI6 files

Everything MIDI: the manager, the control interface and the MIDI-driven material visualiser.

Main

FileTypePurpose
ST_AudioControlMIDIFunctionLibrary.h / .cppBlueprint helpers for listing and looking up MIDI devices by nice name.

Material/Vis

FileTypePurpose
ST_M_VisMIDIControlled.h / .cppMaterial visualiser whose post-process Alpha follows the value of incoming MIDI control changes.

MIDI

FileTypePurpose
ST_MIDIControlInterface.hInterface for objects that receive MIDI events from the MIDI manager.
ST_MIDIManager.h / .cppGame-instance subsystem that opens MIDI devices by name and forwards their events to every registered managed item.

Module root

FileTypePurpose
ST_AudioControlMIDI.h / .cppModule entry point for ST_AudioControlMIDI; startup and shutdown do nothing.
ST_AudioControlMIDI.Build.csBuild rules of the module.
ST_MIDIDeviceLinuxSource/ST_MIDIDeviceLinux8 files

Stand-in for the engine MIDI Device plugin on Linux, built on ALSA raw MIDI.

Module root

FileTypePurpose
MIDIDeviceController.hController type matching the engine MIDI Device plugin.
MIDIDeviceControllerBase.hCommon interface of the Linux stand-in controllers; each one wraps a single ALSA raw MIDI port.
MIDIDeviceInputController.hReceives MIDI events from one device.
MIDIDeviceManager.hFinds MIDI devices and creates controllers, with the same API as the engine plugin.
MIDIDeviceOutputController.hSends MIDI events to one device; opens the ALSA port for output only.
ST_AlsaMidi.h / .cppALSA raw MIDI port wrapper, loaded at runtime.
ST_MIDIDeviceLinux.cppModule entry point.
ST_MIDIDeviceLinux.Build.csBuild rules of the module.
ST_VJMasterEditorSource/ST_VJMasterEditor8 files

Toolbar menu, details panel and settings customisations, and the licence check.

Auth

FileTypePurpose
ST_VJMasterWarden.h / .cppLicence check through Epic’s Plugin Warden.

Customisation

FileTypePurpose
ST_VJMasterDeveloperSettingsCustomisation.h / .cppEditor behaviour of the ST developer settings (audio processing, visualisation, control).
ST_VJMasterEdFunctionLibrary.h / .cppEditor-only actions behind the VJMaster toolbar menu that log the available audio and MIDI devices.
ST_VJMasterFFTConfigCustomisation.h / .cppShows a restart notification when a SessionRestartRequired property of a UFFTConfig changes during a play-in-editor session.
ST_VJMasterGlobalDetailsCustomisation.h / .cppAdds and orders the ShaderTech category in actor details panels.
ST_VJMasterToolbarCustomisation.h / .cppAdds a VJMaster drop-down to the level editor toolbar, after the Play button.

Module root

FileTypePurpose
ST_VJMasterEditor.h / .cppEditor module that registers the ShaderTech details section, the licence check and the editor customisations.
ST_VJMasterEditor.Build.csBuild rules of the module.

Shaders

ShadersShaders/21 files

Private/Compute

FileTypePurpose
CS_BoidsWriteInstances.usfWrites the boids buffer into GPU Scene instance transforms.
CS_ReactiveBoids.usfThe reactive boids simulation: flocking steered by the audio buffers.
CS_SpectrumField.usfSteps the spectrum field, a scrolling spectrogram grid, from the audio buffers.
CS_SpectrumFieldWriteInstances.usfWrites the spectrum field into GPU Scene instance transforms for each layout.
ReactiveBoidsStruct.ushThe boid struct shared by the boids shaders.

Private/Material

FileTypePurpose
MaterialSTAudio.ushAudio accessors for materials, reading the scene uniform buffer.
MaterialSTAudioPatched.ushVariant of the material accessors for an engine patched to expose the scene buffer to post-process materials.
MaterialSTAudioTex.ushAudio accessors for materials, reading the audio data texture.
ST_AudioPostProcess.usfExample post-process pass that reads the audio data texture: brightness follows the amplitude and a spectrum is drawn along the bottom.

Private/Niagara

FileTypePurpose
NiagaraDataInterfaceSTAudio.ushHLSL of the audio buffer data interface.
NiagaraDataInterfaceSTReactiveBoids.ushHLSL of the reactive boids data interface.
NiagaraDataInterfaceSTWaveformDisplay.ushHLSL of the waveform colour data interface.

Private/PostFX

FileTypePurpose
ST_FeedbackPostProcess.usfFrame-buffer feedback pass, drawn by FST_PostFXSceneViewExtension after tonemapping.
ST_PostFXCommon.ushHelpers shared by the post-process passes.
ST_RaymarchPostProcess.usfRaymarched signed-distance pass, drawn by FST_PostFXSceneViewExtension after tonemapping.
ST_WebcamPostProcess.usfVideo layer pass: a webcam or texture composited over the scene, with keying and a kaleidoscope.

Shared/Libs

FileTypePurpose
AudioIOBuffersLib.ushAccessor functions for the audio buffers in compute shaders.
AudioIOLib.ushLayout of the Audio IO Buffer and the audio data texture.
CNoiseLib.ushNoise function used by the boids (from the NoiseShader library).
SDFLib.ushSigned-distance functions and fractal distance estimators for the raymarch pass.
ShaderMathLib.ushGeneral maths helpers.

Content

FolderContents
AudioProcessing/BlueprintsBlueprint samplers: listening to audio events and writing to a Sound Wave Procedural.
AudioProcessing/FFTConfigFFT config data assets: mono and split channels.
AudioProcessing/MapsSampler and Sound Wave Procedural example maps.
AudioVisualisation/BlueprintsBlueprint visualisers for the Niagara and DMX examples.
AudioVisualisation/MapsExample maps, grouped into Niagara, Material, Compute, PostFX and Control.
AudioVisualisation/MaterialsMaterials and material instances of the examples.
AudioVisualisation/VFXNiagara systems, module scripts and dynamic inputs.
AudioVisualisation/PostFX/ScenesRaymarch scene assets: Tunnel, Mandelbox, Menger Sponge and their endless versions.
AudioVisualisation/MeshesMesh used by the compute mesh examples.
AudioVisualisation/TexturesThe audio data texture read by post-process, UI and render target materials.
Misc/MapsEnvironment and lighting sub-levels shared by the example maps.