Navigation
API > API/Plugins > API/Plugins/HarmonixMetasound
| Name | UMusicClockComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/Harmonix/Source/HarmonixMetasound/Public/HarmonixMetasound/Components/MusicClockComponent.h |
| Include Path | #include "HarmonixMetasound/Components/MusicClockComponent.h" |
Syntax
UCLASS (MinimalAPI, ClassGroup=(MetaSoundMusic), prioritizeCategories="MusicClock",
Meta=(BlueprintSpawnableComponent, DisplayName="Music Clock", ScriptName=MusicClockComponent))
class UMusicClockComponent :
public UActorComponent ,
public IMusicEnvironmentClockSource
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UMusicClockComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMusicClockComponent() |
Sets default values for this component's properties. | HarmonixMetasound/Components/MusicClockComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AudioRenderMusicTimeDiscontinuityEvent | FMusicTimeDiscontinuityEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| BarEvent | FBarEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| BeatEvent | FBeatEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| DriveMethod | EMusicClockDriveMethod | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| MetasoundOutputName | FName | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| MetasoundsAudioComponent | TObjectPtr< UAudioComponent > | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| MusicClockConnectedEvent | FMusicClockConnected | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| MusicClockDisconnectedEvent | FMusicClockDisconnected | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| MusicClockSettings | TInstancedStruct< FMusicClockSettingsBase > | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| PlayerExperienceMusicTimeDiscontinuityEvent | FMusicTimeDiscontinuityEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| PlayStateEvent | FPlayStateEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| SectionEvent | FSectionEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| TempoMap | TObjectPtr< UMidiFile > | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| TimebaseForBarAndBeatEvents | ECalibratedMusicTimebase | HarmonixMetasound/Components/MusicClockComponent.h |
|
|
| VideoRenderMusicTimeDiscontinuityEvent | FMusicTimeDiscontinuityEvent | HarmonixMetasound/Components/MusicClockComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ClockDriver | TSharedPtr< FMusicClockDriverBase > | HarmonixMetasound/Components/MusicClockComponent.h | ||
| DefaultMaps | FSongMaps | HarmonixMetasound/Components/MusicClockComponent.h | ||
| LastBroadcastBar | int32 | HarmonixMetasound/Components/MusicClockComponent.h | ||
| LastBroadcastBeat | int32 | HarmonixMetasound/Components/MusicClockComponent.h | ||
| LastBroadcastSongSection | FSongSection | HarmonixMetasound/Components/MusicClockComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float BarToMs
(
float Bar |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float BeatToMs
(
float Beat |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
FMidiSongPos CalculateSongPosWithOffset
(
float MsOffset, |
HarmonixMetasound/Components/MusicClockComponent.h | ||
void ConnectToCustomClockWithSettings
(
const MusicClockSettingsType& InMusicClockSettings |
HarmonixMetasound/Components/MusicClockComponent.h | ||
void ConnectToCustomClockWithSettings
(
TInstancedStruct< FMusicClockSettingsBase > InMusicClockSettings |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
bool ConnectToMetasoundOnAudioComponent
(
UAudioComponent* InAudioComponent |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
void ConnectToWallClockForMidi
(
UMidiFile* InTempoMap |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
void Continue() |
Continue the clock from paused | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetBarsIncludingCountIn
(
ECalibratedMusicTimebase Timebase |
Returns the fractional total bars from the beginning of the authored music content. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetBeatInBarAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetBeatsIncludingCountIn
(
ECalibratedMusicTimebase Timebase |
Returns the fractional total beats from the beginning of the authored music content. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCountInSeconds() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetCurrentBarsPerSecond () |
Get The Current Bars per Second. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentBeatsPerMinute () |
Get The Current BPM of the running clock 0 if the clock is stopped This is in units of our Beats, not Quarter notes. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentBeatsPerSecond () |
Get The Current Beats per Second. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentClockAdvanceRate() |
Get The Current Clock advance rate0 if the clock is stopped | HarmonixMetasound/Components/MusicClockComponent.h |
|
FMidiSongPos GetCurrentPlayerExperiencedSongPos() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
FMidiSongPos GetCurrentRawAudioRenderSongPos() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetCurrentSecondsPerBar () |
Get The Current Seconds per Bar Based on the current tempo, advance rate and time signature | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentSecondsPerBeat () |
Get The Current Seconds per Beat Based on the current tempo, advance rate and time signature | HarmonixMetasound/Components/MusicClockComponent.h |
|
int32 GetCurrentSectionIndex
(
ECalibratedMusicTimebase Timebase |
Returns the index of the current section for the provided time base. [0, Num-1] | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentSectionLengthMs
(
ECalibratedMusicTimebase Timebase |
Returns the length of the current section in milliseconds | HarmonixMetasound/Components/MusicClockComponent.h |
|
FString GetCurrentSectionName
(
ECalibratedMusicTimebase Timebase |
Returns the name of the section that we're currently in (intro, chorus, outro) | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentSectionStartMs
(
ECalibratedMusicTimebase Timebase |
Returns the start time of the current section in milliseconds | HarmonixMetasound/Components/MusicClockComponent.h |
|
FMidiSongPos GetCurrentSmoothedAudioRenderSongPos() |
Getter functions for the Blueprint properties exposed above... | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetCurrentTempo () |
Get The Current Tempo of the running clock 0 if the clock is stopped This is Midi Tempo, which is QuarterNotesPerMinute. | HarmonixMetasound/Components/MusicClockComponent.h |
|
void GetCurrentTimeSignature
(
int& OutNumerator, |
Get The Current Time Signature0 if the clock is stopped | HarmonixMetasound/Components/MusicClockComponent.h |
|
FMusicTimestamp GetCurrentTimestamp
(
ECalibratedMusicTimebase Timebase |
Returns the "classic" musical timestamp in the form Bar (int) & Beat (float). | HarmonixMetasound/Components/MusicClockComponent.h |
|
FMidiSongPos GetCurrentVideoRenderSongPos() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetDeltaBar
(
ECalibratedMusicTimebase Timebase |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetDeltaBeat
(
ECalibratedMusicTimebase Timebase |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetDistanceFromCurrentBar
(
ECalibratedMusicTimebase Timebase |
Gets a value expressed in bars between 0-1 that indicates how much progress we made towards the current bar to the next one. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetDistanceFromCurrentBeat
(
ECalibratedMusicTimebase Timebase |
Gets a value expressed in beats between 0-1 that indicates how much progress we made in the current beat | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetDistanceToClosestBar
(
ECalibratedMusicTimebase Timebase |
Gets value expressed in bars between 0-1 that indicates how close we are to the closest bar (current bar or next bar). | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetDistanceToClosestBeat
(
ECalibratedMusicTimebase Timebase |
Gets a value expressed in beats between 0-1 that indicates how close we are to the closest beat (current beat or next beat). | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetDistanceToNextBar
(
ECalibratedMusicTimebase Timebase |
Gets a value expressed in bars between 0-1 that indicates how close we are to the next bar. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetDistanceToNextBeat
(
ECalibratedMusicTimebase Timebase |
Gets a value expressed in beats between 0-1 that indicates how close we are to the next beat. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetMsPerBarAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetMsPerBeatAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetNumBeatsInBarAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
int32 GetNumSections() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
FMidiSongPos GetPreviousPlayerExperiencedSongPos() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
FMidiSongPos GetPreviousSmoothedAudioRenderSongPos() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
const FMidiSongPos & GetPreviousSongPos
(
ECalibratedMusicTimebase Timebase |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
FMidiSongPos GetPreviousVideoRenderSongPos() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
const FMidiSongPos & GetRawUnsmoothedAudioRenderPos() |
HarmonixMetasound/Components/MusicClockComponent.h | ||
bool GetRunPastMusicEnd() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSecondsFromBarOne
(
ECalibratedMusicTimebase Timebase |
Time from Bar 1 Beat 1. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetSecondsIncludingCountIn
(
ECalibratedMusicTimebase Timebase |
Time from the beginning of the authored music content. | HarmonixMetasound/Components/MusicClockComponent.h |
|
float GetSectionEndMsAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSectionLengthMsAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
FString GetSectionNameAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSectionStartMsAtMs
(
float Ms |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSongLengthBars() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSongLengthBeats() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSongLengthMs() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
const ISongMapEvaluator & GetSongMaps() |
HarmonixMetasound/Components/MusicClockComponent.h | ||
const FMidiSongPos & GetSongPos
(
ECalibratedMusicTimebase Timebase |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetSongRemainingMs
(
ECalibratedMusicTimebase Timebase |
Returns the remaining time until the end of the MIDI in milliseconds based on the timestamp corresponding to the passed Timebase | HarmonixMetasound/Components/MusicClockComponent.h |
|
const TArray< FSongSection > & GetSongSections() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
EMusicClockState GetState() |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
float GetTicksFromBarOne
(
ECalibratedMusicTimebase Timebase |
NOTE: Working in ticks is a little risky. | HarmonixMetasound/Components/MusicClockComponent.h | |
float GetTicksIncludingCountIn
(
ECalibratedMusicTimebase Timebase |
HarmonixMetasound/Components/MusicClockComponent.h | ||
bool LoopedThisFrame
(
ECalibratedMusicTimebase Timebase |
Returns true if there was a seek in the specified timebase | HarmonixMetasound/Components/MusicClockComponent.h |
|
float MeasureSpanProgress
(
const FMusicalTimeSpan& Span, |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
void Pause() |
Pause the clock at the current running time | HarmonixMetasound/Components/MusicClockComponent.h |
|
bool SeekedThisFrame
(
ECalibratedMusicTimebase Timebase |
Returns true if there was a seek in the specified timebase | HarmonixMetasound/Components/MusicClockComponent.h |
|
void SetDefaultTempo
(
float TempoBpm |
Set the default tempo, only call when there's no tempo map. | HarmonixMetasound/Components/MusicClockComponent.h | |
void SetDefaultTimeSignatureDenom
(
int Denom |
Set the default time signature denominator, only call when there's no tempo map. | HarmonixMetasound/Components/MusicClockComponent.h | |
void SetDefaultTimeSignatureNum
(
int Num |
Set the default time signature numerator, only call when there's no tempo map. | HarmonixMetasound/Components/MusicClockComponent.h | |
void SetRunPastMusicEnd
(
bool bRunPastMusicEnd |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
void SetTempoMapForWallClock
(
UMidiFile* InTempoMap |
Set the tempo map when running off of wall clock. | HarmonixMetasound/Components/MusicClockComponent.h |
|
void Start() |
Start the clock ticking and tracking music time Same as "Activate" | HarmonixMetasound/Components/MusicClockComponent.h |
|
void Stop() |
Stop this clock ticking and no longer track music time Same as "Deactivate" | HarmonixMetasound/Components/MusicClockComponent.h |
|
void TickComponentInternal() |
HarmonixMetasound/Components/MusicClockComponent.h | ||
float TickToMs
(
float Tick |
HarmonixMetasound/Components/MusicClockComponent.h |
|
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Activate
(
bool bReset |
Start this clock ticking and start tracking music time Same as "Start()" | HarmonixMetasound/Components/MusicClockComponent.h | |
virtual void BeginPlay() |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual void Deactivate() |
Stop this clock ticking and stop tracking music time Same as "Stop()" | HarmonixMetasound/Components/MusicClockComponent.h | |
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual void TickComponent
(
float DeltaTime, |
HarmonixMetasound/Components/MusicClockComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
HarmonixMetasound/Components/MusicClockComponent.h |
Overridden from IMusicEnvironmentClockSource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanAuditionInEditor() |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual int32 GetPositionAbsoluteTick
(
const FMusicalTime& SourceSpaceOffset |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual int32 GetPositionAbsoluteTick () |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual FMusicalTime GetPositionMusicalTime
(
const FMusicalTime& SourceSpaceOOffset |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual FMusicalTime GetPositionMusicalTime () |
HarmonixMetasound/Components/MusicClockComponent.h | ||
virtual float GetPositionSeconds() |
Vvv BEGIN IMusicEnvironmentClockSource Implementation vvv | HarmonixMetasound/Components/MusicClockComponent.h | |
virtual FMusicalTime Quantize
(
const FMusicalTime& MusicalTime, |
HarmonixMetasound/Components/MusicClockComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UMusicClockComponent * CreateMetasoundDrivenMusicClock
(
UObject* WorldContextObject, |
HarmonixMetasound/Components/MusicClockComponent.h |
|
|
static UMusicClockComponent * CreateMusicClockWithSettings
(
UObject* WorldContextObject, |
HarmonixMetasound/Components/MusicClockComponent.h | ||
static UMusicClockComponent * CreateMusicClockWithSettings
(
UObject* WorldContextObject, |
HarmonixMetasound/Components/MusicClockComponent.h | ||
static UMusicClockComponent * CreateWallClockDrivenMusicClock
(
UObject* WorldContextObject, |
HarmonixMetasound/Components/MusicClockComponent.h |
|