Navigation
API > API/Plugins > API/Plugins/HarmonixMetasound
Handles updating low-resolution play cursors associated with a MIDI clock. This now includes both FMidiClock and UMusicClockComponents. MidiClock: Because FMidiClock instances do not have their lifecycle managed by the garbage collector, we need a way to tick them on the game thread while avoiding races. This gives us a way to register clocks to be ticked from within their constructors/destructor, and provides no user-facing API. MusicClockComponent: Because the "current music time" is typically of interest to many game systems, and some of those systems run in parallel in different threads (e.g. TickComponent functions and animation jobs), it is important that the current music time is updated at the beginning of the game frame, and then that same time can be used for all systems for the frame. This subsystem solves for those problems.
| Name | UMidiClockUpdateSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Runtime/Harmonix/Source/HarmonixMetasound/Public/HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
| Include Path | #include "HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UMidiClockUpdateSubsystem :
public UEngineSubsystem ,
public FTickableGameObject
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UMidiClockUpdateSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UDynamicSubsystem → UEngineSubsystem → UMidiClockUpdateSubsystem
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FClockHistoryPtr | TSharedPtr< HarmonixMetasound::Analysis::FMidiClockSongPositionHistory > | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ClockHistories | TMap< uint32, TWeakPtr< HarmonixMetasound::Analysis::FMidiClockSongPositionHistory > > | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | |
| ClockHistoryMapLocker | FCriticalSection | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EngineBeginFrameDelegate | FDelegateHandle | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
| EngineSamplingInputDelegate | FDelegateHandle | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
| TrackedMidiClocksMutex | FCriticalSection | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
| TrackedMusicClockComponents | TArray< TWeakObjectPtr< UMusicClockComponent > > | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void TickForTesting() |
Declare a "tick" method that can be used during automated testing so that the test code doesn't need knowledge of how the low-res clocks are being ticked... | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
Begin USubsystem. | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
Overridden from FTickableObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStatId GetStatId() |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
virtual ETickableTickType GetTickableTickType() |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
virtual bool IsTickable() |
Begin FTickableGameObject. | HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | |
virtual void Tick
(
float DeltaTime |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FClockHistoryPtr GetOrCreateClockHistory
(
const Metasound::Frontend::FAnalyzerAddress& ForAddress |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
static uint32 MakeMidiSongPosAnalyzerAddressHash
(
const Metasound::Frontend::FAnalyzerAddress& ForAddress |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
static void StopTrackingMusicClockComponent
(
UMusicClockComponent* Clock |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h | ||
static void TrackMusicClockComponent
(
UMusicClockComponent* Clock |
HarmonixMetasound/Subsystems/MidiClockUpdateSubsystem.h |