Class AudioEffectCompressor
- Namespace
- Godot
- Assembly
- GodotSharp.dll
Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB).
Compressor has many uses in the mix:
- In the Master bus to compress the whole output (although an AudioEffectLimiter is probably better).
- In voice channels to ensure they sound as balanced as possible.
- Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard.
- Accentuates transients by using a wider attack, making effects sound more punchy.
public class AudioEffectCompressor : AudioEffect, IDisposable
- Inheritance
-
AudioEffectCompressor
- Implements
- Inherited Members
Constructors
AudioEffectCompressor()
public AudioEffectCompressor()
Properties
AttackUs
Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000.
public float AttackUs { get; set; }
Property Value
Gain
Gain applied to the output signal.
public float Gain { get; set; }
Property Value
Mix
Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet).
public float Mix { get; set; }
Property Value
Ratio
Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48.
public float Ratio { get; set; }
Property Value
ReleaseMs
Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000.
public float ReleaseMs { get; set; }
Property Value
Sidechain
Reduce the sound level using another audio bus for threshold detection.
public StringName Sidechain { get; set; }
Property Value
Threshold
The level above which compression is applied to the audio. Value can range from -60 to 0.
public float Threshold { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.