unreal.MusicSourceBlueprintLibrary¶
- class unreal.MusicSourceBlueprintLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryBlueprint function library for creating and managing music sources and clocks.
These factory functions handle creation, connection, and subsystem registration in one call. The source type is determined by the settings struct — new source types can be added by game plugins without modifying this library.
C++ Source:
Plugin: Harmonix
Module: HarmonixMetasound
File: MusicSourceBlueprintLibrary.h
- classmethod create_music_clock(outer, source) MusicClock¶
Create a read-only music clock bound to a source.
The clock holds a weak reference to the source — if the source is destroyed, the clock gracefully reports Stopped. The clock is automatically registered with the update subsystem.
- Parameters:
outer (Object) – Outer object for the new clock (determines GC lifetime).
source (MusicSource) – The music source to observe.
- Returns:
The created music clock, or null if Source is invalid.
- Return type:
- classmethod create_music_source(outer, settings) MusicSource¶
Create a music source from settings.
The settings struct type determines what kind of source is created. The source is automatically registered with the update subsystem.
- Parameters:
outer (Object) – Outer object for the new source (determines GC lifetime).
settings (InstancedStruct) – Configuration determining source type and parameters.
- Returns:
The created music source, or invalid if creation failed.
- Return type: