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_beats_per_minute(world_context_object) float

Get Beats Per Minute

Parameters:

world_context_object (Object) –

Return type:

float

get_current_timestamp(world_context_object) QuartzTransportTimeStamp

Retrieves a timestamp for the clock

Parameters:

world_context_object (Object) –

Return type:

QuartzTransportTimeStamp

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:
Returns:

The duration, in seconds, of a multiplier amount of the Quantization Type, or -1 in the case the clock is invalid

Return type:

float

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

Parameters:

world_context_object (Object) –

Return type:

float

get_milliseconds_per_tick(world_context_object) float

Metronome getters

Parameters:

world_context_object (Object) –

Return type:

float

get_seconds_per_tick(world_context_object) float

Get Seconds Per Tick

Parameters:

world_context_object (Object) –

Return type:

float

get_thirty_second_notes_per_minute(world_context_object) float

Get Thirty Second Notes Per Minute

Parameters:

world_context_object (Object) –

Return type:

float

get_ticks_per_second(world_context_object) float

Get Ticks Per Second

Parameters:

world_context_object (Object) –

Return type:

float

is_clock_running(world_context_object) bool

Is Clock Running

Parameters:

world_context_object (Object) –

Return type:

bool

pause_clock(world_context_object) QuartzClockHandle

Pause Clock

Parameters:

world_context_object (Object) –

Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

reset_transport(world_context_object, delegate) None

Reset Transport

Parameters:
reset_transport_quantized(world_context_object, quantization_boundary, delegate) QuartzClockHandle

Reset Transport Quantized

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

resume_clock(world_context_object) QuartzClockHandle

Resume Clock

Parameters:

world_context_object (Object) –

Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

set_beats_per_minute(world_context_object, quantization_boundary, delegate, beats_per_minute=60.000000) QuartzClockHandle

Set Beats Per Minute

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

set_milliseconds_per_tick(world_context_object, quantization_boundary, delegate, milliseconds_per_tick=100.000000) QuartzClockHandle

Metronome Alteration (setters)

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

set_seconds_per_tick(world_context_object, quantization_boundary, delegate, seconds_per_tick=0.250000) QuartzClockHandle

Set Seconds Per Tick

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

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:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

set_ticks_per_second(world_context_object, quantization_boundary, delegate, ticks_per_second=10.000000) QuartzClockHandle

Set Ticks Per Second

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

start_clock(world_context_object) QuartzClockHandle

Clock manipulation

Parameters:

world_context_object (Object) –

Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

start_other_clock(world_context_object, other_clock_name, quantization_boundary, delegate) None

“other” clock manipulation

Parameters:
stop_clock(world_context_object, cancel_pending_events) QuartzClockHandle

Stop Clock

Parameters:
  • world_context_object (Object) –

  • cancel_pending_events (bool) –

Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

subscribe_to_all_quantization_events(world_context_object, on_quantization_event) QuartzClockHandle

Subscribe to All Quantization Events

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

subscribe_to_quantization_event(world_context_object, quantization_boundary, on_quantization_event) QuartzClockHandle

Metronome subscription

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle

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:

QuartzClockHandle

unsubscribe_from_time_division(world_context_object, quantization_boundary) QuartzClockHandle

Unsubscribe from Time Division

Parameters:
Returns:

clock_handle (QuartzClockHandle):

Return type:

QuartzClockHandle