Skip to content

Commit

Permalink
DynamicsCompressorNode - remove page macro (#4857)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee authored May 18, 2021
1 parent ca0dd03 commit 8ac5078
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h3 id="Returns">Returns</h3>

<h2 id="Example">Example</h2>

<p>The below code demonstrates a simple usage of <code>createDynamicsCompressor()</code>
<p>The code below demonstrates a simple usage of <code>createDynamicsCompressor()</code>
to add compression to an audio track. For a more complete example, have a look at our <a
href="https://mdn.github.io/webaudio-examples/compressor-example/">basic Compressor
example</a> (<a
Expand Down
11 changes: 8 additions & 3 deletions files/en-us/web/api/dynamicscompressornode/attack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ <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 class="notecard note">
<h4>Note</h4>
<p>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>
<pre class="brush: js">var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.attack.value = 0;</pre>

<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> for more complete example code.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,16 @@ <h3 id="Parameters">Parameters</h3>
<dd>Options are as follows:
<ul>
<li><code>attack</code>: The amount of time (in seconds) to reduce the gain by 10dB.
Its default value is 0.003. This parameter is k-rate. Its nominal range is [0, 1].
</li>
Its default value is 0.003. This parameter is k-rate. Its nominal range is [0, 1].</li>
<li><code>knee</code>: A decibel value representing the range above the threshold
where the curve smoothly transitions to the "ratio" portion. Its default value is
30. This parameter is k-rate. Its nominal range is [0, 40].</li>
<li><code>ratio</code>: The amount of dB change in input for a 1 dB change in
output. Its default value is 12. This parameter is k-rate. Its nominal range is
[1, 20].</li>
<li>release: The amount of time (in seconds) to increase the gain by 10dB. Its
default value is 0.250. This parameter is k-rate. Its nominal range is [0, 1].
</li>
<li>threshold: The decibel value above which the compression will start taking
<li><code>release</code>: The amount of time (in seconds) to increase the gain by 10dB. Its
default value is 0.250. This parameter is k-rate. Its nominal range is [0, 1].</li>
<li><code>threshold</code>: The decibel value above which the compression will start taking
effect. Its default value is -24. This parameter is k-rate. Its nominal range is
[-100, 0].</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/dynamicscompressornode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2 id="Methods">Methods</h2>

<h2 id="Example">Example</h2>

<p>{{page("/en-US/docs/Web/API/AudioContext.createDynamicsCompressor","Example")}}</p>
<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> example code.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down
14 changes: 9 additions & 5 deletions files/en-us/web/api/dynamicscompressornode/knee/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,24 @@ <h2 id="Syntax">Syntax</h2>

<pre class="brush: js">var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.knee.value = 40;
</pre>
compressor.knee.value = 40;</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 class="notecard note">
<h4>Note</h4>
<p>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>
<pre class="brush: js">var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.knee.value = 40;</pre>

<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> for more complete example code.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down
11 changes: 8 additions & 3 deletions files/en-us/web/api/dynamicscompressornode/ratio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ <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 class="notecard note">
<h4>Note</h4>
<p>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>
<pre class="brush: js">var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.ratio.value = 12;</pre>

<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> for more complete example code.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ <h2 id="Example">Example</h2>
var compressor = audioCtx.createDynamicsCompressor();
var myReduction = compressor.reduction;</pre>

<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> for more complete example code.</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
Expand Down
11 changes: 8 additions & 3 deletions files/en-us/web/api/dynamicscompressornode/release/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ <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 class="notecard note">
<h4>Note</h4>
<p>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>
<pre class="brush: js">var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.release.value = 0.25;</pre>

<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> for more complete example code.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down
11 changes: 8 additions & 3 deletions files/en-us/web/api/dynamicscompressornode/threshold/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ <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 class="notecard note">
<h4>Note</h4>
<p>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>
<pre class="brush: js">var audioCtx = new AudioContext();
var compressor = audioCtx.createDynamicsCompressor();
compressor.threshold.value = -50;</pre>

<p>See <a href="/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example"><code>BaseAudioContext.createDynamicsCompressor()</code></a> for more complete example code.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down

0 comments on commit 8ac5078

Please sign in to comment.