unreal.AudioModulationStatics

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

Bases: BlueprintFunctionLibrary

namespace AudioModulation

C++ Source:

  • Plugin: AudioModulation

  • Module: AudioModulation

  • File: AudioModulationStatics.h

classmethod activate_bus(world_context_object, bus) None

SOFT DEPRECATED: Use CreateModulationWatcher and store resulting watcher instead! Manually activates a modulation bus. If called, deactivation will only occur if bus is manually deactivated or destroyed (i.e. will not deactivate when all references become inactive).

Parameters:
classmethod activate_bus_mix(world_context_object, mix) None

Manually activates a bus modulator mix. If called, deactivation will only occur if mix is manually deactivated and not referenced or destroyed (i.e. will not deactivate when all references become inactive).

Parameters:
classmethod activate_generator(world_context_object, generator) None

SOFT DEPRECATED: Use CreateModulationWatcher and store resulting watcher instead! Manually activates a modulation generator. If called, deactivation will only occur if generator is manually deactivated and not referenced or destroyed (i.e. will not deactivate when all references become inactive).

Parameters:
classmethod clear_all_global_bus_mix_values(world_context_object, fade_time=-1.000000) None

Clears all global control bus mix values if set, using the applied fade time to return all to their respective bus’s parameter default value.

Parameters:
  • world_context_object (Object) –

  • fade_time (float) – Fade time to user when interpolating between current value and new values. If non-positive, change is immediate.

classmethod clear_global_bus_mix_value(world_context_object, bus, fade_time=-1.000000) None

Clears global control bus mix if set, using the applied fade time to return to the provided bus’s parameter default value.

Parameters:
  • world_context_object (Object) –

  • bus (SoundControlBus) – Bus associated with mix to update

  • fade_time (float) – Fade time to user when interpolating between current value and new values. If non-positive, change is immediate.

classmethod create_ad_envelope_generator(world_context_object, name, params) SoundModulationGeneratorADEnvelope

Creates a modulation generator based on an Attack/Decay Envelope.

Parameters:
Returns:

Capture this in a Blueprint variable to prevent it from being garbage collected.

Return type:

SoundModulationGeneratorADEnvelope

classmethod create_bus(world_context_object, name, parameter, activate=False) SoundControlBus

Creates a modulation bus with the provided default value.

Parameters:
  • world_context_object (Object) –

  • name (Name) – Name of bus

  • parameter (SoundModulationParameter) – Default value for created bus

  • activate (bool) – (DEPRECATED in 5.4: Use UAudioModulationDestination) Whether or not to activate bus on creation. If true, deactivation will only occur if returned bus is manually deactivated and not referenced or destroyed (i.e. will not deactivate when all references become inactive).

Returns:

ControlBus created. This should be stored (eg. by a Blueprint as a variable) to prevent it from being garbage collected.

Return type:

SoundControlBus

classmethod create_bus_mix(world_context_object, name, stages, activate) SoundControlBusMix

Creates a modulation bus mix, with a bus stage set to the provided target value.

Parameters:
  • world_context_object (Object) –

  • name (Name) – Name of mix.

  • stages (Array[SoundControlBusMixStage]) – Stages mix is responsible for.

  • activate (bool) – Whether or not to activate mix on creation. If true, deactivation will only occur if returned mix is manually deactivated and not referenced or destroyed (i.e. will not deactivate when all references become inactive).

Returns:

Capture this in a Blueprint variable to prevent it from being garbage collected.

Return type:

SoundControlBusMix

classmethod create_bus_mix_from_value(world_context_object, name, buses, value=1.000000, attack_time=0.100000, release_time=0.100000, activate=True) SoundControlBusMix
Create a mix with stages created for each provided bus that are initialized to the supplied value and timing parameters.
Parameters:
  • world_context_object (Object) –

  • name (Name) –

  • buses (Array[SoundControlBus]) – Buses to assign stages within new mix to *

  • value (float) – Initial value for all stages created within the new mix. *

  • attack_time (float) – Fade time to user when mix activates. *

  • release_time (float) – Fade time to user when mix deactivates.

  • activate (bool) –

Return type:

SoundControlBusMix

classmethod create_bus_mix_stage(world_context_object, bus, value, attack_time=0.100000, release_time=0.100000) SoundControlBusMixStage

Creates a stage used to mix a control bus.

Parameters:
  • world_context_object (Object) –

  • bus (SoundControlBus) – Bus stage is in charge of applying mix value to.

  • value (float) – Value for added bus stage to target when mix is active.

  • attack_time (float) – Time in seconds for stage to mix in.

  • release_time (float) – Time in seconds for stage to mix out.

Return type:

SoundControlBusMixStage

classmethod create_envelope_follower_generator(world_context_object, name, params) SoundModulationGeneratorEnvelopeFollower

Creates a modulation generator based on an Envelope Follower with the given parameters.

Parameters:
Returns:

Capture this in a Blueprint variable to prevent it from being garbage collected.

Return type:

SoundModulationGeneratorEnvelopeFollower

classmethod create_lfo_generator(world_context_object, name, params) SoundModulationGeneratorLFO

Creates a modulation generator based on an LFO with the given parameters.

Parameters:
Returns:

Capture this in a Blueprint variable to prevent it from being garbage collected.

Return type:

SoundModulationGeneratorLFO

classmethod create_modulation_destination(world_context_object, name, modulator) AudioModulationDestination

Creates a modulation destination, which activates the given modulator (if not already active) and provides a function to retrieve the last value computed of the given modulator on the modulation processing thread.

Parameters:
Return type:

AudioModulationDestination

classmethod deactivate_all_bus_mixes(world_context_object) None

Deactivates all currently active Control Bus Mixes. This includes the Global Control Bus Mixes.

Parameters:

world_context_object (Object) –

classmethod deactivate_bus(world_context_object, bus) None

SOFT DEPRECATED: Use CreateModulationDestination and store resulting destination instead! Deactivates a bus. Does nothing if the provided bus is already inactive.

Parameters:
classmethod deactivate_bus_mix(world_context_object, mix) None

Deactivates a modulation bus mix. Does nothing if an instance of the provided bus mix is already inactive.

Parameters:
classmethod deactivate_generator(world_context_object, generator) None

SOFT DEPRECATED: Use CreateModulationDestination and store resulting destination instead! Deactivates a modulation generator. Does nothing if an instance of the provided generator is already inactive.

Parameters:
classmethod get_modulator_value(world_context_object, modulator) float

Gets the (normalized) value of the given modulator.

Parameters:
Returns:

Value - The current value of the modulator. If the modulator is not active, returns 1.0.

Return type:

float

classmethod get_modulators_from_destination(destination) Set[SoundModulatorBase]

Gets the list of modulators currently applied to a Modulation Destination.

Parameters:

destination (SoundModulationDestinationSettings) – The Modulation Destination.

Returns:

Modulators - The set of Modulators.

Return type:

Set[SoundModulatorBase]

classmethod is_control_bus_mix_active(world_context_object, mix) bool

Returns whether or not a Control Bus Mix is currently active.

Parameters:
Returns:

Whether or not the Bus Mix is currently active.

Return type:

bool

classmethod load_mix_from_profile(world_context_object, mix, activate=True, profile_index=0) Array[SoundControlBusMixStage]

Loads control bus mix from a profile into UObject mix definition, deserialized from an ini file.

Parameters:
  • world_context_object (Object) –

  • mix (SoundControlBusMix) –

  • activate (bool) – If true, activate mix upon loading from profile.

  • profile_index (int32) – Index of profile, allowing multiple profiles to be loaded to single mix object. If <= 0, loads from default profile (no suffix).

Returns:

Stages - Stage values loaded from profile (empty if profile did not exist or had no values serialized).

Return type:

Array[SoundControlBusMixStage]

classmethod save_mix_to_profile(world_context_object, mix, profile_index=0) None

Saves control bus mix to a profile, serialized to an ini file. If mix is loaded, uses current proxy’s state. If not, uses default UObject representation.

Parameters:
  • world_context_object (Object) –

  • mix (SoundControlBusMix) –

  • profile_index (int32) – Index of profile, allowing multiple profiles can be saved for single mix object. If 0, saves to default ini profile (no suffix).

classmethod set_global_bus_mix_value(world_context_object, bus, value, fade_time=-1.000000) None

Sets a Global Control Bus Mix with a single stage associated with the provided Bus to the given float value. This call should be reserved for buses that are to be always active. It is NOT recommended for transient buses, as not calling clear can keep buses active indefinitely.

Parameters:
  • world_context_object (Object) –

  • bus (SoundControlBus) – Bus associated with mix to update

  • value (float) – Value to set global stage to.

  • fade_time (float) – Fade time to user when interpolating between current value and new value. If negative, falls back to last fade time set on stage. If fade time never set on stage, defaults to 100ms.

classmethod update_mix(world_context_object, mix, stages, fade_time=-1.000000) None

Sets a Control Bus Mix with the provided stage data, if the stages are provided in an active instance proxy of the mix. Does not update UObject definition of the mix.

Parameters:
  • world_context_object (Object) –

  • mix (SoundControlBusMix) – Mix to update

  • stages (Array[SoundControlBusMixStage]) – Stages to set. If stage’s bus is not referenced by mix, stage’s update request is ignored.

  • fade_time (float) – Fade time to user when interpolating between current value and new values. If negative, falls back to last fade time set on stage. If fade time never set on stage, uses attack time set on stage in mix asset.

classmethod update_mix_by_filter(world_context_object, mix, address_filter, param_class_filter, param_filter, value=1.000000, fade_time=-1.000000) None

Sets filtered stages of a given class to a provided target value for active instance of mix. Does not update UObject definition of mix.

Parameters:
  • world_context_object (Object) –

  • mix (SoundControlBusMix) – Mix to modify

  • address_filter (str) – (Optional) Address filter to apply to provided mix’s stages.

  • param_class_filter (type(Class)) – (Optional) Filters buses by parameter class.

  • param_filter (SoundModulationParameter) – (Optional) Filters buses by parameter.

  • value (float) – Target value to mix filtered stages to.

  • fade_time (float) – If non-negative, updates the fade time for the resulting bus stages found matching the provided filter.

classmethod update_mix_from_object(world_context_object, mix, fade_time=-1.000000) None

Commits updates from a UObject definition of a bus mix to active instance in audio thread (ignored if mix has not been activated).

Parameters:
  • world_context_object (Object) –

  • mix (SoundControlBusMix) – Mix to update

  • fade_time (float) – Fade time to user when interpolating between current value and new values. If negative, falls back to last fade time set on stage. If fade time never set on stage, uses attack time set on stage in mix asset.

classmethod update_modulator(world_context_object, modulator) None

Commits updates from a UObject definition of a modulator (e.g. Bus, Bus Mix, Generator) to active instance in audio thread (ignored if modulator type has not been activated).

Parameters: