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.

  • bar_progress_parameter_name (Name): [Read-Write] Progress of the current bar [0, 1]. This is the same as the fractional part of BarsFromCountIn.

  • bars_including_count_in_parameter_name (Name): [Read-Write] 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! NOTE: This Bar, unlike the Bar in the MusicTimestamp structure, is floating point and will include a fractional portion.

  • beat_progress_parameter_name (Name): [Read-Write] Progress of the current beat [0, 1]. This is the same as the fractional part of BeatsFromCountIn;

  • beats_including_count_in_parameter_name (Name): [Read-Write] Total 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!

  • 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]

  • 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

  • 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!

  • seconds_from_bar_one_parameter_name (Name): [Read-Write] 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!

  • seconds_including_count_in_parameter_name (Name): [Read-Write] 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!

  • song_pos (MidiSongPos): [Read-Write]

  • tempo_parameter_name (Name): [Read-Write] Current tempo (beats per minute).

  • time_signature_denominator_parameter_name (Name): [Read-Write] Current time signature denominator (scale from note duration to beat).

  • time_signature_numerator_parameter_name (Name): [Read-Write] Current time signature numerator (beats per bar).

  • timestamp_bar_parameter_name (Name): [Read-Write] This is the bar member of the MusicTimestamp structure which represents a classic “music time” where bar 1 beat 1 is the beginning of the music AFTER count-in and pickups. If the music has a count-in or pickup bars this number may be negative (or zero) until bar 1 beat 1 is reached! NOTE: Unlike “BarsFromCountIn”, Bar here will be an integer! This because it is the bar from the MusicTimestamp structure which also provides a “beat in bar” member to denote a “distance into the bar”.

  • timestamp_beat_in_bar_parameter_name (Name): [Read-Write] This is the beat member of the MusicTimestamp structure which represents a classic “music time” where bar 1 beat 1 is the beginning of the music AFTER count-in and pickups. If the music has a count-in or pickup bars this number may be negative (or zero) until bar 1 beat 1 is reached! NOTE: beat in this context is 1 based! The first beat in a bar is beat 1! Note: This is a floating point number.

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_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)

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)