Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The DynamicsCompressorNode interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once. This is often used in musical production and game audio. DynamicsCompressorNode is an AudioNode that has exactly one input and one output.
EventTarget AudioNode DynamicsCompressorNode| 1 |
| 1 |
| "clamped-max" |
| 2 |
| "speakers" |
Creates a new instance of a DynamicsCompressorNode object.
Inherits properties from its parent, AudioNode.
DynamicsCompressorNode.threshold Read onlyA k-rate AudioParam representing the decibel value above which the compression will start taking effect.
DynamicsCompressorNode.knee Read onlyA k-rate AudioParam containing a decibel value representing the range above the threshold where the curve smoothly transitions to the compressed portion.
DynamicsCompressorNode.ratio Read onlyA k-rate AudioParam representing the amount of change, in dB, needed in the input for a 1 dB change in the output.
DynamicsCompressorNode.reduction Read onlyA float representing the amount of gain reduction currently applied by the compressor to the signal.
DynamicsCompressorNode.attack Read onlyA k-rate AudioParam representing the amount of time, in seconds, required to reduce the gain by 10 dB.
DynamicsCompressorNode.release Read onlyA k-rate AudioParam representing the amount of time, in seconds, required to increase the gain by 10 dB.
No specific methods; inherits methods from its parent, AudioNode.
See BaseAudioContext.createDynamicsCompressor() example code.
| Web Audio API # DynamicsCompressorNode |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Oct 30, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.