Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 680603 of DynamicsCompressorNode.reduction

  • Revision slug: Web/API/DynamicsCompressorNode.reduction
  • Revision title: DynamicsCompressorNode.reduction
  • Revision id: 680603
  • Created:
  • Creator: JesseTG
  • Is current revision? No
  • Comment

Revision Content

{{ APIRef("DynamicsCompressorNode") }}

The reduction property of the {{ domxref("DynamicsCompressorNode") }} interface is a {{k-rate}} {{domxref("AudioParam")}} representing the amount of gain reduction currently applied by the compressor to the signal.

Intended for metering purposes, it returns a value in dB, or 0 (no gain reduction) if no signal is fed into the DynamicsCompressorNode. The range of this value is between -20 and 0 (in dB).

Syntax

var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.reduction.value = -20;

Value

An {{domxref("AudioParam")}}.

Note: Though the {{domxref("AudioParam")}} returned is read-only, the value it represents is not.

Example

{{page("/en-US/docs/Web/API/AudioContext.createDynamicsCompressor","Example")}}

Specifications

Specification Status Comment
{{SpecName('Web Audio API', '#widl-DynamicsCompressorNode-reduction', 'reduction')}} {{Spec2('Web Audio API')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatChrome(10.0)}}{{property_prefix("webkit")}} {{CompatGeckoDesktop(25.0)}}  {{CompatNo}} 15.0{{property_prefix("webkit")}}
22 (unprefixed)
6.0{{property_prefix("webkit")}}
Feature Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatUnknown}} 26.0 1.2 {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} 33.0

See also

Revision Source

<p>{{ APIRef("DynamicsCompressorNode") }}</p>
<div>
 <p>The <code>reduction</code> property of the {{ domxref("DynamicsCompressorNode") }} interface is a {{k-rate}} {{domxref("AudioParam")}} representing the amount of gain reduction currently applied by the compressor to the signal.</p>
 <p>Intended for metering purposes, it returns a value in dB, or <code>0</code> (no gain reduction) if no signal is fed into the <code>DynamicsCompressorNode</code>. The range of this value is between <code>-20</code> and <code>0</code> (in dB).</p>
</div>
<h2 id="Syntax">Syntax</h2>
<pre class="brush: js">
var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.reduction.value = -20;
</pre>
<h3 id="Value">Value</h3>
<p>An {{domxref("AudioParam")}}.</p>
<div class="note">
 <p><strong>Note</strong>: Though the {{domxref("AudioParam")}} returned is read-only, the value it represents is not.</p>
</div>
<h2 id="Example">Example</h2>
<p>{{page("/en-US/docs/Web/API/AudioContext.createDynamicsCompressor","Example")}}</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Web Audio API', '#widl-DynamicsCompressorNode-reduction', 'reduction')}}</td>
   <td>{{Spec2('Web Audio API')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
 {{CompatibilityTable}}</div>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatChrome(10.0)}}{{property_prefix("webkit")}}</td>
    <td>{{CompatGeckoDesktop(25.0)}}&nbsp;</td>
    <td>{{CompatNo}}</td>
    <td>15.0{{property_prefix("webkit")}}<br />
     22 (unprefixed)</td>
    <td>6.0{{property_prefix("webkit")}}</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>Firefox OS</th>
    <th>IE Mobile</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
    <th>Chrome for Android</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatUnknown}}</td>
    <td>26.0</td>
    <td>1.2</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>33.0</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
</ul>
Revert to this revision