AudioEffectCompressor

繼承: AudioEffect < Resource < RefCounted < Object

為音訊匯流排新增壓縮效果。

壓縮超過指定閾值的聲音,平滑動態並提高整體音量。

說明

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.

教學

屬性

float

attack_us

20.0

float

gain

0.0

float

mix

1.0

float

ratio

4.0

float

release_ms

250.0

StringName

sidechain

&""

float

threshold

0.0


屬性說明

float attack_us = 20.0 🔗

  • void set_attack_us(value: float)

  • float get_attack_us()

訊號超出門檻時壓縮器的反應時間(µs),可設 20–2000。


float gain = 0.0 🔗

輸出訊號增益。


float mix = 1.0 🔗

原始訊號與效果訊號的混合比例,0 為全乾、1 為全濕。


float ratio = 4.0 🔗

音訊超過門檻後套用的壓縮比,值越高壓縮越強,可設 1–48。


float release_ms = 250.0 🔗

  • void set_release_ms(value: float)

  • float get_release_ms()

當訊號跌破門檻後停止壓縮的延遲時間(ms),可設 20–2000。


StringName sidechain = &"" 🔗

使用其他匯流排作門檻偵測以降低本匯流排音量。


float threshold = 0.0 🔗

  • void set_threshold(value: float)

  • float get_threshold()

開始壓縮的門檻(dB),可設 -60 至 0。