cables is under heavy development.
There might be one or another bug, please let us know about it!
has no op id!
Compression reduces the volume of loud sounds

summary (oneliner)

Thin Tone.js wrapper around the Web Audio DynamicsCompressorNode. Compression reduces the volume of loud sounds or amplifies quiet sounds by narrowing or "compressing" an audio signal's dynamic range. Read more on Wikipedia. Another great tutorial on compressors:



youtube id


related ops


Audio In (Object)

The audio signal to compress

Threshold (Dynamic)

The threshold value – at which decibel level the compression should start. If we set the threshold to -12db, the compressor will not affect everything quieter than that, as soon as the sound hits -12dB the compressor will kick in and reduce the volume. Often you want to chain a Gain-op after the Compressor-op to make it a little bit louder (makeup for the compression).

Attack (Dynamic)

Attack time is how quickly the compressor engages and reduces the volume of the audio once the audio signal is louder than the threshold. If our attack is set to 20ms, and the audio rises above our threshold of -12db, it will take 20 milliseconds for the compressor to fully kick in.

Release (Dynamic)

This is how long it takes the compressor to dis-engage.

Knee (Dynamic)

How hard the compressor kicks in, a low number (called hard knee) will kick in very hard, this is typically used for drums. A high number on the other hand (called soft knee) does not kick in fully (the transition from uncompressed to compressed is softer).

Ratio (Dynamic)

The ratio determines how much the volume is reduced by.


Audio Out (Object)

The compressed audio signal


  • Uses library: Tone.js (Webaudio Library)

Caught a mistake or want to contribute to the documentation?

Edit this documentcancel save

Examples using Compressor

Public Patches using Compressor