unreal.MusicTempometerComponent

class unreal.MusicTempometerComponent(outer: Object | None = None, name: Name | str = 'None')

Bases: ActorComponent

UMusicTempometerComponent provides playback properties of a UMusicClockComponent on its actor and optionally updates a UMaterialParameterCollection.

C++ Source:

  • Plugin: Harmonix

  • Module: HarmonixMetasound

  • File: MusicTempometerComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • asset_user_data_editor_only (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.

  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation

  • component_tags (Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • material_parameter_collection (MaterialParameterCollection): [Read-Write]

  • mpc_parameters (MusicTempometerMPCParameters): [Read-Write] Parameter names to use for the values in the material parameter collection.

  • music_clock (MusicClockComponent): [Read-Write] Music whose tempo to detect.

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated

  • previous_frame_song_pos (MidiSongPos): [Read-Write]

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • replicate_using_registered_sub_object_list (bool): [Read-Write] When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

  • song_pos (MidiSongPos): [Read-Write]

get_bar_progress() float

Progress of the current bar [0, 1).

Return type:

float

get_bars_including_count_in() float

Bars from the beginning of the music. Includes all count-in and pickup bars (ie. won’t be negative when the music starts, and bar 1 beat 1 of the music may not be equal to elapsed bar 0.0!

Return type:

float

get_beat_progress() float

Progress of the current beat [0, 1).

Return type:

float

get_beats_including_count_in() float

Beats from the beginning of the music. Includes all count-in and pickup bars/beats (ie. won’t be negative when the music starts, and elapsed beat 0.0 may not equal a timestamp of bar 1 beat 1!

Return type:

float

get_clock_no_mutex() MusicClockComponent

Get Clock No Mutex

Return type:

MusicClockComponent

get_material_parameter_collection() MaterialParameterCollection

Get Material Parameter Collection

Return type:

MaterialParameterCollection

get_previous_frame_song_pos() MidiSongPos

The FSongPos for which the game thread previously issued graphics rendering commands.

Return type:

MidiSongPos

get_seconds_from_bar_one() float

Seconds from Bar 1 Beat 1 of the music. If the music has a count-in or pickup bars this number may be negative when the music starts!

Return type:

float

get_seconds_including_count_in() float

Seconds from the beginning of the entire music authoring. Includes all count-in and pickup bars (ie. won’t be negative when the music starts, and bar 1 beat 1 may not be at 0.0 seconds!

Return type:

float

get_song_pos() MidiSongPos

The FSongPos for which the game thread is currently issuing graphics rendering commands, according to calibration data.

Return type:

MidiSongPos

get_tempo() float

Current tempo (beats per minute).

Return type:

float

get_time_signature_denominator() float

Current time signature denominator (scale from note duration to beat fraction for a simple meter).

Return type:

float

get_time_signature_numerator() float

Current time signature numerator (beats per bar for a simple meter).

Return type:

float

get_timestamp() MusicTimestamp
Current bar & beat in the traditional format, where…
  • bar 1 beat 1 is the beginning of the song.

  • bars BEFORE bar 1 are count-in or “pickup” bars.

  • beat is always 1 or greater.

Return type:

MusicTimestamp

property material_parameter_collection: MaterialParameterCollection

[Read-Write]

Type:

(MaterialParameterCollection)

property music_clock: MusicClockComponent

[Read-Write] Music whose tempo to detect.

Type:

(MusicClockComponent)

property previous_frame_song_pos: MidiSongPos

[Read-Only]

Type:

(MidiSongPos)

set_clock(clock_component) None

SetSongPosInterface allows setting any UObject implementing the ISongPosInterface as the attribute source.

Parameters:

clock_component (MusicClockComponent)

set_clock_from_actor(actor) None

SetSongPosInterfaceFromActor sets the actor or the first of its owned components that implements ISongPosInterface as the attribute source. BeginPlay calls this on the owning actor when the source ISongPosInterface is not set.

Parameters:

actor (Actor)

property song_pos: MidiSongPos

[Read-Only]

Type:

(MidiSongPos)