unreal.SoundAttenuationSettings

class unreal.SoundAttenuationSettings(distance_algorithm=AttenuationDistanceModel.LINEAR, attenuation_shape=AttenuationShape.SPHERE, d_b_attenuation_at_max=- 60.0, falloff_mode=NaturalSoundFalloffMode.CONTINUES, attenuation_shape_extents=[400.0, 0.0, 0.0], cone_offset=0.0, falloff_distance=3600.0, custom_attenuation_curve=[], attenuate=True, spatialize=True, attenuate_with_lpf=False, enable_listener_focus=False, enable_focus_interpolation=False, enable_occlusion=False, use_complex_collision_for_occlusion=False, enable_reverb_send=True, enable_priority_attenuation=False, apply_normalization_to_stereo_sounds=False, enable_log_frequency_scaling=False, enable_submix_sends=False, spatialization_algorithm=SoundSpatializationAlgorithm.SPATIALIZATION_DEFAULT, binaural_radius=0.0, absorption_method=AirAbsorptionMethod.LINEAR, occlusion_trace_channel=CollisionChannel.ECC_VISIBILITY, reverb_send_method=ReverbSendMethod.LINEAR, priority_attenuation_method=PriorityAttenuationMethod.LINEAR, omni_radius=0.0, stereo_spread=200.0, lpf_radius_min=3000.0, lpf_radius_max=6000.0, custom_lowpass_air_absorption_curve=[], custom_highpass_air_absorption_curve=[], lpf_frequency_at_min=20000.0, lpf_frequency_at_max=20000.0, hpf_frequency_at_min=0.0, hpf_frequency_at_max=0.0, focus_azimuth=30.0, non_focus_azimuth=60.0, focus_distance_scale=1.0, non_focus_distance_scale=1.0, focus_priority_scale=1.0, non_focus_priority_scale=1.0, focus_volume_attenuation=1.0, non_focus_volume_attenuation=1.0, focus_attack_interp_speed=1.0, focus_release_interp_speed=1.0, occlusion_low_pass_filter_frequency=20000.0, occlusion_volume_attenuation=1.0, occlusion_interpolation_time=0.1, reverb_wet_level_min=0.3, reverb_wet_level_max=0.95, reverb_distance_min=400.0, reverb_distance_max=4000.0, manual_reverb_send_level=0.0, custom_reverb_send_curve=[], submix_send_settings=[], priority_attenuation_min=1.0, priority_attenuation_max=1.0, priority_attenuation_distance_min=400.0, priority_attenuation_distance_max=4000.0, manual_priority_attenuation=1.0, custom_priority_attenuation_curve=[], plugin_settings=[[], [], []])

Bases: unreal.BaseAttenuationSettings

The settings for attenuating.

C++ Source:

  • Module: Engine

  • File: SoundAttenuation.h

Editor Properties: (see get_editor_property/set_editor_property)

  • absorption_method (AirAbsorptionMethod): [Read-Write] What method to use to map distance values to frequency absorption values.

  • apply_normalization_to_stereo_sounds (bool): [Read-Write] Enables applying a -6 dB attenuation to stereo assets which are 3d spatialized. Avoids clipping when assets have spread of 0.0 due to channel summing.

  • attenuate (bool): [Read-Write] Allows distance-based volume attenuation.

  • attenuate_with_lpf (bool): [Read-Write] Allows simulation of air absorption by applying a filter with a cutoff frequency as a function of distance.

  • attenuation_shape (AttenuationShape): [Read-Write] The shape of the non-custom attenuation method.

  • attenuation_shape_extents (Vector): [Read-Write] The dimensions to use for the attenuation shape. Interpretation of the values differ per shape.

    Sphere - X is Sphere Radius. Y and Z are unused Capsule - X is Capsule Half Height, Y is Capsule Radius, Z is unused Box - X, Y, and Z are the Box’s dimensions Cone - X is Cone Radius, Y is Cone Angle, Z is Cone Falloff Angle

  • binaural_radius (float): [Read-Write] What min radius to use to swap to non-binaural audio when a sound starts playing.

  • cone_offset (float): [Read-Write] The distance back from the sound’s origin to begin the cone when using the cone attenuation shape.

  • custom_attenuation_curve (RuntimeFloatCurve): [Read-Write] The custom volume attenuation curve to use.

  • custom_highpass_air_absorption_curve (RuntimeFloatCurve): [Read-Write] The normalized custom curve to use for the air absorption highpass frequency values. Does a mapping from defined distance values (x-axis) and defined frequency values (y-axis)

  • custom_lowpass_air_absorption_curve (RuntimeFloatCurve): [Read-Write] The normalized custom curve to use for the air absorption lowpass frequency values. Does a mapping from defined distance values (x-axis) and defined frequency values (y-axis)

  • custom_priority_attenuation_curve (RuntimeFloatCurve): [Read-Write] The custom curve to use for distance-based priority attenuation.

  • custom_reverb_send_curve (RuntimeFloatCurve): [Read-Write] The custom reverb send curve to use for distance-based send level.

  • d_b_attenuation_at_max (float): [Read-Write] The attenuation volume at the falloff distance in decibels (Only for ‘Natural Sound’ Distance Algorithm).

  • distance_algorithm (AttenuationDistanceModel): [Read-Write] The type of attenuation as a function of distance to use.

  • enable_focus_interpolation (bool): [Read-Write] Enables focus interpolation to smooth transition in and and of focus.

  • enable_listener_focus (bool): [Read-Write] Enable listener focus-based adjustments.

  • enable_log_frequency_scaling (bool): [Read-Write] Enables applying a log scale to frequency values (so frequency sweeping is perceptually linear).

  • enable_occlusion (bool): [Read-Write] Enables realtime occlusion tracing.

  • enable_priority_attenuation (bool): [Read-Write] Enables attenuation of sound priority based off distance.

  • enable_reverb_send (bool): [Read-Write] Enables adjusting reverb sends based on distance.

  • enable_submix_sends (bool): [Read-Write] Enables submix sends based on distance.

  • falloff_distance (float): [Read-Write] The distance over which volume attenuation occurs.

  • falloff_mode (NaturalSoundFalloffMode): [Read-Write] Whether to continue attenuating, go silent, or hold last volume value when beyond falloff bounds and ‘Attenuation At Max (dB)’ is set to a value greater than -60dB. (Only for ‘Natural Sound’ Distance Algorithm). */

  • focus_attack_interp_speed (float): [Read-Write] Scalar used to increase interpolation speed upwards to the target Focus value

  • focus_azimuth (float): [Read-Write] Azimuth angle (in degrees) relative to the listener forward vector which defines the focus region of sounds. Sounds playing at an angle less than this will be in focus.

  • focus_distance_scale (float): [Read-Write] Amount to scale the distance calculation of sounds that are in-focus. Can be used to make in-focus sounds appear to be closer or further away than they actually are.

  • focus_priority_scale (float): [Read-Write] Amount to scale the priority of sounds that are in focus. Can be used to boost the priority of sounds that are in focus.

  • focus_release_interp_speed (float): [Read-Write] Scalar used to increase interpolation speed downwards to the target Focus value

  • focus_volume_attenuation (float): [Read-Write] Amount to attenuate sounds that are in focus. Can be overridden at the sound-level.

  • hpf_frequency_at_max (float): [Read-Write] The range of the cutoff frequency (in Hz) of the highpass absorption filter.

  • hpf_frequency_at_min (float): [Read-Write] The range of the cutoff frequency (in Hz) of the highpass absorption filter.

  • lpf_frequency_at_max (float): [Read-Write] The range of the cutoff frequency (in Hz) of the lowpass absorption filter.

  • lpf_frequency_at_min (float): [Read-Write] The range of the cutoff frequency (in Hz) of the lowpass absorption filter.

  • lpf_radius_max (float): [Read-Write] The max distance range at which to apply an absorption LPF filter. Absorption freq cutoff interpolates between filter frequency ranges between these distance values.

  • lpf_radius_min (float): [Read-Write] The distance min range at which to apply an absorption LPF filter.

  • manual_priority_attenuation (float): [Read-Write] Static priority scalar to use (doesn’t change as a function of distance).

  • manual_reverb_send_level (float): [Read-Write] The manual master reverb send level to use. Doesn’t change as a function of distance.

  • non_focus_azimuth (float): [Read-Write] Azimuth angle (in degrees) relative to the listener forward vector which defines the non-focus region of sounds. Sounds playing at an angle greater than this will be out of focus.

  • non_focus_distance_scale (float): [Read-Write] Amount to scale the distance calculation of sounds that are not in-focus. Can be used to make in-focus sounds appear to be closer or further away than they actually are.

  • non_focus_priority_scale (float): [Read-Write] Amount to scale the priority of sounds that are not in-focus. Can be used to reduce the priority of sounds that are not in focus.

  • non_focus_volume_attenuation (float): [Read-Write] Amount to attenuate sounds that are not in focus. Can be overridden at the sound-level.

  • occlusion_interpolation_time (float): [Read-Write] The amount of time in seconds to interpolate to the target OcclusionLowPassFilterFrequency when a sound is occluded.

  • occlusion_low_pass_filter_frequency (float): [Read-Write] The low pass filter frequency (in Hz) to apply if the sound playing in this audio component is occluded. This will override the frequency set in LowPassFilterFrequency. A frequency of 0.0 is the device sample rate and will bypass the filter.

  • occlusion_trace_channel (CollisionChannel): [Read-Write] Which trace channel to use for audio occlusion checks.

  • occlusion_volume_attenuation (float): [Read-Write] The amount of volume attenuation to apply to sounds which are occluded.

  • omni_radius (float): [Read-Write] The distance below which a sound is non-spatialized (2D). This prevents near-field audio from flipping as audio crosses the listener’s position.

  • plugin_settings (SoundAttenuationPluginSettings): [Read-Write] Sound attenuation plugin settings to use with sounds that play with this attenuation setting.

  • priority_attenuation_distance_max (float): [Read-Write] The max distance to attenuate priority.

  • priority_attenuation_distance_min (float): [Read-Write] The min distance to attenuate priority.

  • priority_attenuation_max (float): [Read-Write] Interpolated value to scale priority against when the sound is at the maximum priority attenuation distance from the closest listener.

  • priority_attenuation_method (PriorityAttenuationMethod): [Read-Write] What method to use to control priority attenuation

  • priority_attenuation_min (float): [Read-Write] Interpolated value to scale priority against when the sound is at the minimum priority attenuation distance from the closest listener.

  • reverb_distance_max (float): [Read-Write] The max distance to send to the master reverb.

  • reverb_distance_min (float): [Read-Write] The min distance to send to the master reverb.

  • reverb_send_method (ReverbSendMethod): [Read-Write] What method to use to control master reverb sends

  • reverb_wet_level_max (float): [Read-Write] The amount to send to master reverb when sound is located at a distance equal to value specified in the reverb max send distance.

  • reverb_wet_level_min (float): [Read-Write] The amount to send to master reverb when sound is located at a distance equal to value specified in the reverb min send distance.

  • spatialization_algorithm (SoundSpatializationAlgorithm): [Read-Write] What method we use to spatialize the sound.

  • spatialize (bool): [Read-Write] Allows the source to be 3D spatialized.

  • stereo_spread (float): [Read-Write] The world-space distance between left and right stereo channels when stereo assets are 3D spatialized.

  • submix_send_settings (Array(AttenuationSubmixSendSettings)): [Read-Write] Set of submix send settings to use to send audio to submixes as a function of distance.

  • use_complex_collision_for_occlusion (bool): [Read-Write] Enables tracing against complex collision when doing occlusion traces.

property absorption_method

[Read-Write] What method to use to map distance values to frequency absorption values.

Type

(AirAbsorptionMethod)

property apply_normalization_to_stereo_sounds

[Read-Write] Enables applying a -6 dB attenuation to stereo assets which are 3d spatialized. Avoids clipping when assets have spread of 0.0 due to channel summing.

Type

(bool)

property attenuate

[Read-Write] Allows distance-based volume attenuation.

Type

(bool)

property attenuate_with_lpf

[Read-Write] Allows simulation of air absorption by applying a filter with a cutoff frequency as a function of distance.

Type

(bool)

property binaural_radius

[Read-Write] What min radius to use to swap to non-binaural audio when a sound starts playing.

Type

(float)

property custom_highpass_air_absorption_curve

[Read-Write] The normalized custom curve to use for the air absorption highpass frequency values. Does a mapping from defined distance values (x-axis) and defined frequency values (y-axis)

Type

(RuntimeFloatCurve)

property custom_lowpass_air_absorption_curve

[Read-Write] The normalized custom curve to use for the air absorption lowpass frequency values. Does a mapping from defined distance values (x-axis) and defined frequency values (y-axis)

Type

(RuntimeFloatCurve)

property custom_priority_attenuation_curve

[Read-Write] The custom curve to use for distance-based priority attenuation.

Type

(RuntimeFloatCurve)

property custom_reverb_send_curve

[Read-Write] The custom reverb send curve to use for distance-based send level.

Type

(RuntimeFloatCurve)

property enable_focus_interpolation

[Read-Write] Enables focus interpolation to smooth transition in and and of focus.

Type

(bool)

property enable_listener_focus

[Read-Write] Enable listener focus-based adjustments.

Type

(bool)

property enable_log_frequency_scaling

[Read-Write] Enables applying a log scale to frequency values (so frequency sweeping is perceptually linear).

Type

(bool)

property enable_occlusion

[Read-Write] Enables realtime occlusion tracing.

Type

(bool)

property enable_priority_attenuation

[Read-Write] Enables attenuation of sound priority based off distance.

Type

(bool)

property enable_reverb_send

[Read-Write] Enables adjusting reverb sends based on distance.

Type

(bool)

property enable_submix_sends

[Read-Write] Enables submix sends based on distance.

Type

(bool)

property focus_attack_interp_speed

[Read-Write] Scalar used to increase interpolation speed upwards to the target Focus value

Type

(float)

property focus_azimuth

[Read-Write] Azimuth angle (in degrees) relative to the listener forward vector which defines the focus region of sounds. Sounds playing at an angle less than this will be in focus.

Type

(float)

property focus_distance_scale

[Read-Write] Amount to scale the distance calculation of sounds that are in-focus. Can be used to make in-focus sounds appear to be closer or further away than they actually are.

Type

(float)

property focus_priority_scale

[Read-Write] Amount to scale the priority of sounds that are in focus. Can be used to boost the priority of sounds that are in focus.

Type

(float)

property focus_release_interp_speed

[Read-Write] Scalar used to increase interpolation speed downwards to the target Focus value

Type

(float)

property focus_volume_attenuation

[Read-Write] Amount to attenuate sounds that are in focus. Can be overridden at the sound-level.

Type

(float)

property hpf_frequency_at_max

[Read-Write] The range of the cutoff frequency (in Hz) of the highpass absorption filter.

Type

(float)

property hpf_frequency_at_min

[Read-Write] The range of the cutoff frequency (in Hz) of the highpass absorption filter.

Type

(float)

property lpf_frequency_at_max

[Read-Write] The range of the cutoff frequency (in Hz) of the lowpass absorption filter.

Type

(float)

property lpf_frequency_at_min

[Read-Write] The range of the cutoff frequency (in Hz) of the lowpass absorption filter.

Type

(float)

property lpf_radius_max

[Read-Write] The max distance range at which to apply an absorption LPF filter. Absorption freq cutoff interpolates between filter frequency ranges between these distance values.

Type

(float)

property lpf_radius_min

[Read-Write] The distance min range at which to apply an absorption LPF filter.

Type

(float)

property manual_priority_attenuation

[Read-Write] Static priority scalar to use (doesn’t change as a function of distance).

Type

(float)

property manual_reverb_send_level

[Read-Write] The manual master reverb send level to use. Doesn’t change as a function of distance.

Type

(float)

property non_focus_azimuth

[Read-Write] Azimuth angle (in degrees) relative to the listener forward vector which defines the non-focus region of sounds. Sounds playing at an angle greater than this will be out of focus.

Type

(float)

property non_focus_distance_scale

[Read-Write] Amount to scale the distance calculation of sounds that are not in-focus. Can be used to make in-focus sounds appear to be closer or further away than they actually are.

Type

(float)

property non_focus_priority_scale

[Read-Write] Amount to scale the priority of sounds that are not in-focus. Can be used to reduce the priority of sounds that are not in focus.

Type

(float)

property non_focus_volume_attenuation

[Read-Write] Amount to attenuate sounds that are not in focus. Can be overridden at the sound-level.

Type

(float)

property occlusion_interpolation_time

[Read-Write] The amount of time in seconds to interpolate to the target OcclusionLowPassFilterFrequency when a sound is occluded.

Type

(float)

property occlusion_low_pass_filter_frequency

[Read-Write] The low pass filter frequency (in Hz) to apply if the sound playing in this audio component is occluded. This will override the frequency set in LowPassFilterFrequency. A frequency of 0.0 is the device sample rate and will bypass the filter.

Type

(float)

property occlusion_trace_channel

[Read-Write] Which trace channel to use for audio occlusion checks.

Type

(CollisionChannel)

property occlusion_volume_attenuation

[Read-Write] The amount of volume attenuation to apply to sounds which are occluded.

Type

(float)

property omni_radius

[Read-Write] The distance below which a sound is non-spatialized (2D). This prevents near-field audio from flipping as audio crosses the listener’s position.

Type

(float)

property plugin_settings

[Read-Write] Sound attenuation plugin settings to use with sounds that play with this attenuation setting.

Type

(SoundAttenuationPluginSettings)

property priority_attenuation_distance_max

[Read-Write] The max distance to attenuate priority.

Type

(float)

property priority_attenuation_distance_min

[Read-Write] The min distance to attenuate priority.

Type

(float)

property priority_attenuation_max

[Read-Write] Interpolated value to scale priority against when the sound is at the maximum priority attenuation distance from the closest listener.

Type

(float)

property priority_attenuation_method

[Read-Write] What method to use to control priority attenuation

Type

(PriorityAttenuationMethod)

property priority_attenuation_min

[Read-Write] Interpolated value to scale priority against when the sound is at the minimum priority attenuation distance from the closest listener.

Type

(float)

property reverb_distance_max

[Read-Write] The max distance to send to the master reverb.

Type

(float)

property reverb_distance_min

[Read-Write] The min distance to send to the master reverb.

Type

(float)

property reverb_send_method

[Read-Write] What method to use to control master reverb sends

Type

(ReverbSendMethod)

property reverb_wet_level_max

[Read-Write] The amount to send to master reverb when sound is located at a distance equal to value specified in the reverb max send distance.

Type

(float)

property reverb_wet_level_min

[Read-Write] The amount to send to master reverb when sound is located at a distance equal to value specified in the reverb min send distance.

Type

(float)

property spatialization_algorithm

[Read-Write] What method we use to spatialize the sound.

Type

(SoundSpatializationAlgorithm)

property spatialize

[Read-Write] Allows the source to be 3D spatialized.

Type

(bool)

property stereo_spread

[Read-Write] The world-space distance between left and right stereo channels when stereo assets are 3D spatialized.

Type

(float)

property submix_send_settings

[Read-Write] Set of submix send settings to use to send audio to submixes as a function of distance.

Type

(Array(AttenuationSubmixSendSettings))

property use_complex_collision_for_occlusion

[Read-Write] Enables tracing against complex collision when doing occlusion traces.

Type

(bool)