unreal.MusicClockComponent
¶
- class unreal.MusicClockComponent(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ActorComponent
Music Clock Component
C++ Source:
Plugin: Harmonix
Module: HarmonixMetasound
File: MusicClockComponent.h
Editor Properties: (see get_editor_property/set_editor_property)
asset_user_data
(Array[AssetUserData]): [Read-Write] Array of user data stored with the componentasset_user_data_editor_only
(Array[AssetUserData]): [Read-Write] Array of user data stored with the componentauto_activate
(bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.bar_event
(BarEvent): [Read-Write]beat_event
(BeatEvent): [Read-Write]can_ever_affect_navigation
(bool): [Read-Write] Whether this component can potentially influence navigationcomponent_tags
(Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.current_bar_duration_sec
(float): [Read-Only]current_beat_duration_sec
(float): [Read-Only]current_clock_advance_rate
(float): [Read-Only]current_player_experienced_song_pos
(MidiSongPos): [Read-Write]current_smoothed_audio_render_song_pos
(MidiSongPos): [Read-Write] Don’t let C++ access these directly! They are a blueprint convenience and only work because they specify getter functions!current_video_render_song_pos
(MidiSongPos): [Read-Write]drive_method
(MusicClockDriveMethod): [Read-Write]editable_when_inherited
(bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor classis_editor_only
(bool): [Read-Write] If true, the component will be excluded from non-editor buildsmetasound_output_name
(Name): [Read-Write]metasounds_audio_component
(AudioComponent): [Read-Write]music_clock_connected_event
(MusicClockConnected): [Read-Write]music_clock_disconnected_event
(MusicClockDisconnected): [Read-Write]on_component_activated
(ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reseton_component_deactivated
(ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivatedplay_state_event
(PlayStateEvent): [Read-Write]primary_component_tick
(ActorComponentTickFunction): [Read-Write] Main tick function for the Componentreplicate_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!run_past_music_end
(bool): [Read-Write]section_event
(SectionEvent): [Read-Write]tempo
(float): [Read-Write]tempo_map
(MidiFile): [Read-Write]time_signature_denom
(int32): [Read-Write]time_signature_num
(int32): [Read-Write]timebase_for_bar_and_beat_events
(CalibratedMusicTimebase): [Read-Write]
- connect_to_metasound_on_audio_component(audio_component) bool ¶
Connect to Metasound on Audio Component
- Parameters:
audio_component (AudioComponent) –
- Return type:
- connect_to_wall_clock_for_midi(tempo_map) None ¶
Connect to Wall Clock for Midi
- Parameters:
tempo_map (MidiFile) –
- classmethod create_metasound_driven_music_clock(world_context_object, audio_component, metasound_ouput_pin_name='MIDI Clock', start=True) MusicClockComponent ¶
Create Metasound Driven Music Clock
- Parameters:
world_context_object (Object) –
audio_component (AudioComponent) –
metasound_ouput_pin_name (Name) –
start (bool) –
- Return type:
- classmethod create_music_clock_component(world_context_object: Object, audio_component: AudioComponent, metasound_ouput_pin_name: Name = 'MIDI Clock', start: bool = True) MusicClockComponent ¶
deprecated: ‘create_music_clock_component’ was renamed to ‘create_metasound_driven_music_clock’.
- classmethod create_wall_clock_driven_music_clock(world_context_object, with_tempo_map, start=True) MusicClockComponent ¶
Create Wall Clock Driven Music Clock
- Parameters:
- Return type:
- property current_player_experienced_song_pos: MidiSongPos¶
[Read-Only]
- Type:
- property current_smoothed_audio_render_song_pos: MidiSongPos¶
[Read-Only] Don’t let C++ access these directly! They are a blueprint convenience and only work because they specify getter functions!
- Type:
- property current_song_pos: MidiSongPos¶
‘current_song_pos’ was renamed to ‘current_smoothed_audio_render_song_pos’.
- Type:
deprecated
- property current_video_render_song_pos: MidiSongPos¶
[Read-Only]
- Type:
- get_bars_including_count_in(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Returns the fractional total bars from the beginning of the authored music content. NOTE: INCLUDES time for count-in and pickup bars. Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_beats_including_count_in(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Returns the fractional total beats from the beginning of the authored music content. NOTE: INCLUDES time for count-in and pickup bars. Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_current_player_experienced_song_pos() MidiSongPos ¶
Get Current Player Experienced Song Pos
- Return type:
- get_current_section_index(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) int32 ¶
Returns the index of the current section for the provided time base. [0, Num-1] // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
int32
- get_current_section_length_ms(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Returns the length of the current section in milliseconds // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_current_section_name(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) str ¶
Returns the name of the section that we’re currently in (intro, chorus, outro) // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_current_section_start_ms(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Returns the start time of the current section in milliseconds // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_current_smoothed_audio_render_song_pos() MidiSongPos ¶
Getter functions for the Blueprint properties exposed above…
- Return type:
- get_current_timestamp(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) MusicTimestamp ¶
- Returns the “classic” musical timestamp in the form Bar (int) & Beat (float). In this form…
Bar 1, Beat 1.0 is the “beginning of the song” AFTER count-in/pickups
Bar 0, Beat 1.0 would be one bar BEFORE the “beginning of the song”… eg. a bar of count-in or pickup.
While Bar can be positive or negative, Beat is always >= 1.0 and is read as “beat in the bar”. Again… ‘1’ based!
Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_current_video_render_song_pos() MidiSongPos ¶
Get Current Video Render Song Pos
- Return type:
- get_delta_bar(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_delta_beat(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_distance_from_current_bar(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Gets a value expressed in bars between 0-1 that indicates how much progress we made towards the current bar to the next one. // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_distance_from_current_beat(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Gets a value expressed in beats between 0-1 that indicates how much progress we made in the current beat // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_distance_to_closest_bar(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Gets value expressed in bars between 0-1 that indicates how close we are to the closest bar (current bar or next bar). // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_distance_to_closest_beat(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Gets a value expressed in beats between 0-1 that indicates how close we are to the closest beat (current beat or next beat). // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_distance_to_next_bar(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Gets a value expressed in bars between 0-1 that indicates how close we are to the next bar. // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_distance_to_next_beat(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Gets a value expressed in beats between 0-1 that indicates how close we are to the next beat. // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_num_sections() int32 ¶
Get Num Sections
- Return type:
int32
- get_seconds_from_bar_one(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Time from Bar 1 Beat 1. The classic “start of the song”. NOTE: DOES NOT INCLUDE time for count-in and pickup bars. Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_seconds_including_count_in(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Time from the beginning of the authored music content. NOTE: INCLUDES time for count-in and pickup bars. Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_song_pos(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) MidiSongPos ¶
Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_song_remaining_ms(timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Returns the remaining time until the end of the MIDI in milliseconds based on the timestamp corresponding to the passed Timebase // Note: Not const as it might cause the clock to update from its source.
- Parameters:
timebase (CalibratedMusicTimebase) –
- Return type:
- get_song_remaining_time(timebase: CalibratedMusicTimebase = Ellipsis) float ¶
deprecated: ‘get_song_remaining_time’ was renamed to ‘get_song_remaining_ms’.
- get_song_sections() Array[SongSection] ¶
Get Song Sections
- Return type:
- get_state() MusicClockState ¶
Get State
- Return type:
- measure_span_progress(span, timebase=CalibratedMusicTimebase.VIDEO_RENDER_TIME) float ¶
Note: Not const as it might cause the clock to update from its source.
- Parameters:
span (MusicalTimeSpan) –
timebase (CalibratedMusicTimebase) –
- Return type:
- property metasounds_audio_component: AudioComponent¶
[Read-Write]
- Type:
- property music_clock_connected_event: MusicClockConnected¶
[Read-Write]
- Type:
- property music_clock_disconnected_event: MusicClockDisconnected¶
[Read-Write]
- Type:
- property play_state_event: PlayStateEvent¶
[Read-Write]
- Type:
- property section_event: SectionEvent¶
[Read-Write]
- Type:
- property timebase_for_bar_and_beat_events: CalibratedMusicTimebase¶
[Read-Write]
- Type: