Documentation
¶
Overview ¶
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 AudioEffectHardLimiter 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.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsAudioEffect() AudioEffect.Instance
- func (self Instance) AsAudioEffectCompressor() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AttackUs() Float.X
- func (self Instance) Gain() Float.X
- func (self Instance) ID() ID
- func (self Instance) Mix() Float.X
- func (self Instance) Ratio() Float.X
- func (self Instance) ReleaseMs() Float.X
- func (self Instance) SetAttackUs(value Float.X)
- func (self Instance) SetGain(value Float.X)
- func (self Instance) SetMix(value Float.X)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetRatio(value Float.X)
- func (self Instance) SetReleaseMs(value Float.X)
- func (self Instance) SetSidechain(value string)
- func (self Instance) SetThreshold(value Float.X)
- func (self Instance) Sidechain() string
- func (self Instance) Threshold() Float.X
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsAudioEffect ¶
func (self *Extension[T]) AsAudioEffect() AudioEffect.Instance
func (*Extension[T]) AsAudioEffectCompressor ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.AudioEffectCompressor
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsAudioEffect ¶
func (self Instance) AsAudioEffect() AudioEffect.Instance
func (Instance) AsAudioEffectCompressor ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AttackUs ¶
Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000.
func (Instance) Mix ¶
Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet).
func (Instance) 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.
func (Instance) 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.
func (Instance) SetAttackUs ¶
SetAttackUs sets the property returned by [GetAttackUs].
func (Instance) SetReleaseMs ¶
SetReleaseMs sets the property returned by [GetReleaseMs].
func (Instance) SetSidechain ¶
SetSidechain sets the property returned by [GetSidechain].
func (Instance) SetThreshold ¶
SetThreshold sets the property returned by [GetThreshold].