This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

ratio

Summary

The amount of dB change in input for a 1 dB change in output. Its default value is 12, with a nominal range of 1 to 20. This parameter is k-rate.

Property of apis/webaudio/DynamicsCompressorNodeapis/webaudio/DynamicsCompressorNode

Syntax

Note: This property is read-only.

var result = DynamicsCompressorNode.ratio;

Return Value

Returns an object of type NumberNumber

Examples

var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.ratio.value = 12;

Related specifications

W3C Web Audio API
W3C Editor’s Draft