unreal.QuartzClockHandle
¶
- class unreal.QuartzClockHandle(outer: Optional[Object] = None, name: Union[Name, str] = 'None')¶
Bases:
Object
- This class is a BP / Game thread wrapper around FQuartzClockProxy
(to talk to the underlying clock)
- …and inherits from FQuartzTickableObject
(to listen to the underlying clock)
It can subscribe to Quantized Event & Metronome delegates to synchronize gameplay & VFX to Quartz events fired from the Audio Engine
C++ Source:
Module: AudioMixer
File: AudioMixerClockHandle.h
- get_current_timestamp(world_context_object) QuartzTransportTimeStamp ¶
Retrieves a timestamp for the clock
- Parameters:
world_context_object (Object) –
- Return type:
- get_duration_of_quantization_type_in_seconds(world_context_object, quantization_type, multiplier=1.000000) float ¶
Returns the duration in seconds of the given Quantization Type
- Parameters:
world_context_object (Object) –
quantization_type (QuartzCommandQuantization) –
multiplier (float) –
- Returns:
The duration, in seconds, of a multiplier amount of the Quantization Type, or -1 in the case the clock is invalid
- Return type:
- get_estimated_run_time(world_context_object) float ¶
Returns the amount of time, in seconds, the clock has been running. Caution: due to latency, this will not be perfectly accurate
- pause_clock(world_context_object) QuartzClockHandle ¶
Pause Clock
- Parameters:
world_context_object (Object) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- reset_transport(world_context_object, delegate) None ¶
Reset Transport
- Parameters:
world_context_object (Object) –
delegate (OnQuartzCommandEventBP) –
- reset_transport_quantized(world_context_object, quantization_boundary, delegate) QuartzClockHandle ¶
Reset Transport Quantized
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- resume_clock(world_context_object) QuartzClockHandle ¶
Resume Clock
- Parameters:
world_context_object (Object) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- set_beats_per_minute(world_context_object, quantization_boundary, delegate, beats_per_minute=60.000000) QuartzClockHandle ¶
Set Beats Per Minute
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
beats_per_minute (float) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- set_milliseconds_per_tick(world_context_object, quantization_boundary, delegate, milliseconds_per_tick=100.000000) QuartzClockHandle ¶
Metronome Alteration (setters)
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
milliseconds_per_tick (float) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- set_seconds_per_tick(world_context_object, quantization_boundary, delegate, seconds_per_tick=0.250000) QuartzClockHandle ¶
Set Seconds Per Tick
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
seconds_per_tick (float) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- set_thirty_second_notes_per_minute(world_context_object, quantization_boundary, delegate, thirty_seconds_notes_per_minute=960.000000) QuartzClockHandle ¶
Set Thirty Second Notes Per Minute
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
thirty_seconds_notes_per_minute (float) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- set_ticks_per_second(world_context_object, quantization_boundary, delegate, ticks_per_second=10.000000) QuartzClockHandle ¶
Set Ticks Per Second
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
ticks_per_second (float) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- start_clock(world_context_object) QuartzClockHandle ¶
Clock manipulation
- Parameters:
world_context_object (Object) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- start_other_clock(world_context_object, other_clock_name, quantization_boundary, delegate) None ¶
“other” clock manipulation
- Parameters:
world_context_object (Object) –
other_clock_name (Name) –
quantization_boundary (QuartzQuantizationBoundary) –
delegate (OnQuartzCommandEventBP) –
- stop_clock(world_context_object, cancel_pending_events) QuartzClockHandle ¶
Stop Clock
- Parameters:
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- subscribe_to_all_quantization_events(world_context_object, on_quantization_event) QuartzClockHandle ¶
Subscribe to All Quantization Events
- Parameters:
world_context_object (Object) –
on_quantization_event (OnQuartzMetronomeEventBP) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- subscribe_to_quantization_event(world_context_object, quantization_boundary, on_quantization_event) QuartzClockHandle ¶
Metronome subscription
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzCommandQuantization) –
on_quantization_event (OnQuartzMetronomeEventBP) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- unsubscribe_from_all_time_divisions(world_context_object) QuartzClockHandle ¶
Unsubscribe from All Time Divisions
- Parameters:
world_context_object (Object) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type:
- unsubscribe_from_time_division(world_context_object, quantization_boundary) QuartzClockHandle ¶
Unsubscribe from Time Division
- Parameters:
world_context_object (Object) –
quantization_boundary (QuartzCommandQuantization) –
- Returns:
clock_handle (QuartzClockHandle):
- Return type: