Skip to content

Audio.Compressor

Name Mandatory Description Default Type
⬅️ Input Accepts audio data as an Audio chunk, containing the sample rate, number of samples, number of channels, and the audio samples. Audio
Output ➡️ Outputs the compressed audio data as an Audio chunk. Audio
Threshold No The threshold level in dB below which the signal will pass unaffected. Above this level, the signal will be compressed according to the ratio. -24 FloatVar(Float)
Ratio No The compression ratio (e.g., 4 means 4:1 compression). Higher values result in more aggressive compression. 4 FloatVar(Float)
Attack No The time in milliseconds it takes for the compressor to start reducing the gain after the signal exceeds the threshold. 5 FloatVar(Float)
Release No The time in milliseconds it takes for the compressor to stop reducing the gain after the signal falls below the threshold. 50 FloatVar(Float)
MakeupGain No Additional gain in dB applied to the compressed signal to compensate for the reduction in level. 0 FloatVar(Float)

This shard applies dynamic range compression to audio data. It reduces the volume of loud sounds or amplifies quiet sounds by narrowing or 'compressing' an audio signal's dynamic range. The compressor is typically used within an Audio.Channel to control the dynamic range of audio signals, prevent clipping, and create a more consistent sound level.