unreal.MetasoundGeneratorHandle

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

Bases: Object

Blueprint-facing interface to a FMetasoundGenerator on a UAudioComponent.

C++ Source:

  • Plugin: Metasound

  • Module: MetasoundEngine

  • File: MetasoundGeneratorHandle.h

apply_parameter_pack(pack) bool

Makes a copy of the supplied parameter pack and passes it to the MetaSoundGenerator for asynchronous processing. IT ALSO caches this copy so that if the AudioComponent is virtualized the parameter pack will be sent again when/if the AudioComponent is “unvirtualized”.

Parameters:

pack (MetasoundParameterPack) –

Return type:

bool

classmethod create_meta_sound_generator_handle(on_component) MetasoundGeneratorHandle

Create Meta Sound Generator Handle

Parameters:

on_component (AudioComponent) –

Return type:

MetasoundGeneratorHandle

enable_runtime_render_timing(enable) None

Enable the profiling of the MetaSound render for this playing instance. You must call this before calling “GetRuntimeCPUCoreUtilization” (below) or you will just get 0.0 back for core utilization.

Parameters:

enable (bool) –

get_cpu_core_utilization() double

Get the CPU usage as “fraction of real time” used to render this metasound. NOTE: The MetasoundSource asset MUST have had its EnableRenderTiming function called before the metasound is started!

Return type:

double

update_watchers() None

Update any watched outputs

watch_output(output_name, on_output_value_changed, analyzer_name='None', analyzer_output_name='None') bool

Watch an output value.

Parameters:
  • output_name (Name) – The user-specified name of the output in the Metasound

  • on_output_value_changed (OnMetasoundOutputValueChanged) – The event to fire when the output’s value changes

  • analyzer_name (Name) – (optional) The name of the analyzer to use on the output, defaults to a passthrough

  • analyzer_output_name (Name) – (optional) The name of the output on the analyzer to watch, defaults to the passthrough output

Returns:

true if the watch setup succeeded, false otherwise

Return type:

bool