AudioEffectCompressor

package
v0.0.0-...-357ca8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 25 Imported by: 0

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

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 Any

type Any interface {
	gd.IsClass
	AsAudioEffectCompressor() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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 (self *Extension[T]) AsAudioEffectCompressor() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

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 New

func New() Instance

func (Instance) AsAudioEffect

func (self Instance) AsAudioEffect() AudioEffect.Instance

func (Instance) AsAudioEffectCompressor

func (self Instance) AsAudioEffectCompressor() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AttackUs

func (self Instance) AttackUs() Float.X

Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000.

func (Instance) Gain

func (self Instance) Gain() Float.X

Gain applied to the output signal.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) Mix

func (self Instance) Mix() Float.X

Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet).

func (Instance) Ratio

func (self Instance) Ratio() Float.X

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

func (self Instance) ReleaseMs() Float.X

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

func (self Instance) SetAttackUs(value Float.X)

SetAttackUs sets the property returned by [GetAttackUs].

func (Instance) SetGain

func (self Instance) SetGain(value Float.X)

SetGain sets the property returned by [GetGain].

func (Instance) SetMix

func (self Instance) SetMix(value Float.X)

SetMix sets the property returned by [GetMix].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetRatio

func (self Instance) SetRatio(value Float.X)

SetRatio sets the property returned by [GetRatio].

func (Instance) SetReleaseMs

func (self Instance) SetReleaseMs(value Float.X)

SetReleaseMs sets the property returned by [GetReleaseMs].

func (Instance) SetSidechain

func (self Instance) SetSidechain(value string)

SetSidechain sets the property returned by [GetSidechain].

func (Instance) SetThreshold

func (self Instance) SetThreshold(value Float.X)

SetThreshold sets the property returned by [GetThreshold].

func (Instance) Sidechain

func (self Instance) Sidechain() string

Reduce the sound level using another audio bus for threshold detection.

func (Instance) Threshold

func (self Instance) Threshold() Float.X

The level above which compression is applied to the audio. Value can range from -60 to 0.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL