Index · Object → RefCounted → Resource → AudioEffect → AudioEffectChorus

AudioEffectChorus

Adds a chorus audio effect to an audio bus.

Gives the impression of multiple audio sources.

Class Description

A "chorus" effect creates multiple copies of the original audio (called "voices") with variations in pitch, and layers on top of the original, giving the impression that the sound comes from multiple sources. This creates spectral and spatial movement.

Each voice is played a short period of time after the original audio, controlled by delay. An internal low-frequency oscillator (LFO) controls their pitch, and depth controls the LFO's maximum amount.

In the real world, this kind of effect is found in pianos, choirs, and instrument ensembles.

This effect can also be used to widen mono audio and make digital sounds have a more natural or analog quality.

Properties

var dry: float = 1.0

The volume ratio of the original audio. Value can range from 0 to 1.

var voice/1/cutoff_hz: float = 8000.0

The frequency threshold of the voice's low-pass filter in Hz.

var voice/1/delay_ms: float = 15.0

The delay of the voice in milliseconds, compared to the original audio.

var voice/1/depth_ms: float = 2.0

The depth of the voice's low-frequency oscillator in milliseconds.

var voice/1/level_db: float = 0.0

The gain of the voice in dB.

var voice/1/pan: float = -0.5

The pan position of the voice.

var voice/1/rate_hz: float = 0.8

The rate of the voice's low-frequency oscillator in Hz.

var voice/2/cutoff_hz: float = 8000.0

The frequency threshold of the voice's low-pass filter in Hz.

var voice/2/delay_ms: float = 20.0

The delay of the voice in milliseconds, compared to the original audio.

var voice/2/depth_ms: float = 3.0

The depth of the voice's low-frequency oscillator in milliseconds.

var voice/2/level_db: float = 0.0

The gain of the voice in dB.

var voice/2/pan: float = 0.5

The pan position of the voice.

var voice/2/rate_hz: float = 1.2

The rate of the voice's low-frequency oscillator in Hz.

var voice/3/cutoff_hz: float

The frequency threshold of the voice's low-pass filter in Hz.

var voice/3/delay_ms: float

The delay of the voice in milliseconds, compared to the original audio.

var voice/3/depth_ms: float

The depth of the voice's low-frequency oscillator in milliseconds.

var voice/3/level_db: float

The gain of the voice in dB.

var voice/3/pan: float

The pan position of the voice.

var voice/3/rate_hz: float

The rate of the voice's low-frequency oscillator in Hz.

var voice/4/cutoff_hz: float

The frequency threshold of the voice's low-pass filter in Hz.

var voice/4/delay_ms: float

The delay of the voice in milliseconds, compared to the original audio.

var voice/4/depth_ms: float

The depth of the voice's low-frequency oscillator in milliseconds.

var voice/4/level_db: float

The gain of the voice in dB.

var voice/4/pan: float

The pan position of the voice.

var voice/4/rate_hz: float

The rate of the voice's low-frequency oscillator in Hz.

var voice_count: int = 2

The number of voices in the effect. Value can range from 1 to 4.

var wet: float = 0.5

The volume ratio of all voices. Value can range from 0 to 1.

Inherited from Resource (4)

Methods

func get_voice_cutoff_hz(voice_idx: int) -> float

Returns the frequency threshold of a given voice_idx's low-pass filter in Hz. Frequencies above this value are removed from the voice.

func get_voice_delay_ms(voice_idx: int) -> float

Returns the delay of a given voice_idx in milliseconds, compared to the original audio.

func get_voice_depth_ms(voice_idx: int) -> float

Returns the depth of a given voice_idx's low-frequency oscillator in milliseconds.

func get_voice_level_db(voice_idx: int) -> float

Returns the gain of a given voice_idx in dB.

func get_voice_pan(voice_idx: int) -> float

Returns the pan position of a given voice_idx. Negative values mean the left channel, positive mean the right.

func get_voice_rate_hz(voice_idx: int) -> float

Returns the rate of a given voice_idx's low-frequency oscillator in Hz.

func set_voice_cutoff_hz(voice_idx: int, cutoff_hz: float) -> void

Sets the frequency threshold of a given voice_idx's low-pass filter in Hz. Frequencies above cutoff_hz are removed from voice_idx. Value can range from 1 to 20500.

func set_voice_delay_ms(voice_idx: int, delay_ms: float) -> void

Sets the delay of a given voice_idx in milliseconds, compared to the original audio. Value can range from 0 to 50.

func set_voice_depth_ms(voice_idx: int, depth_ms: float) -> void

Sets the depth of a given voice_idx's low-frequency oscillator in milliseconds. Value can range from 0 to 20.

func set_voice_level_db(voice_idx: int, level_db: float) -> void

Sets the gain of a given voice_idx in dB. Value can range from -60 to 24.

func set_voice_pan(voice_idx: int, pan: float) -> void

Sets the pan position of a given voice_idx. Negative values pan the sound to the left, positive pan to the right. Value can range from -1 to 1.

func set_voice_rate_hz(voice_idx: int, rate_hz: float) -> void

Sets the rate of a given voice_idx's low-frequency oscillator in Hz. Value can range from 0.1 to 20.

Inherited from AudioEffect (1)
Inherited from Resource (18)
func _get_rid() -> RID
func _reset_state() -> void
func _set_path_cache(path: String) -> void
func _setup_local_to_scene() -> void
func copy_from_resource(resource: Resource) -> Error
func duplicate(deep: bool = false) -> Resource
func duplicate_deep(deep_subresources_mode: Resource.DeepDuplicateMode = 1) -> Resource
func emit_changed() -> void
func get_rid() -> RID
func is_built_in() -> bool
func reset_state() -> void
func set_id_for_path(path: String, id: String) -> void
func set_path_cache(path: String) -> void
func setup_local_to_scene() -> void
func take_over_path(path: String) -> void
Inherited from RefCounted (4)
func init_ref() -> bool
func reference() -> bool
func unreference() -> bool
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Resource (2)
signal changed()
Inherited from Object (2)