Skip to content

Commit 4cc65e2

Browse files
authored
Docs cleanup and unification (#961)
1 parent c0bc4c6 commit 4cc65e2

181 files changed

Lines changed: 3003 additions & 3548 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/audiodocs/docs/analysis/analyser-node.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import { Optional, ReadOnly } from '@site/src/components/Badges';
1010
The `AnalyserNode` interface represents a node providing two core functionalities: extracting time-domain data and frequency-domain data from audio signals.
1111
It is an [`AudioNode`](/docs/core/audio-node) that passes the audio data unchanged from input to output, but allows to take passed data and process it.
1212

13-
#### [`AudioNode`](/docs/core/audio-node#properties) properties
14-
15-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"max"} channelInterpretation={"speakers"} />
16-
1713
#### Time domain vs Frequency domain
1814

1915
![time-domain-vs-frequency-domain](/img/time_domain_vs_frequency_domain.jpg)
@@ -45,6 +41,8 @@ Or by using `BaseAudioContext` factory method:
4541

4642
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
4743

44+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="max" channelInterpretation="speakers" />
45+
4846
| Name | Type | Description | |
4947
| :----: | :----: | :-------- | :-: |
5048
| `fftSize` | `number` | Integer value representing size of [Fast Fourier Transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) used to determine frequency domain. In general it is size of returning time-domain data. |

packages/audiodocs/docs/core/audio-param.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The change begins at the time designated for the previous event. It follows an e
9595
### `setTargetAtTime`
9696

9797
Schedules a gradual change to the new value at the start time.
98-
This method is useful for decay or release portions of [ADSR envelopes](/docs/effects/gain-node#envelope---adsr).
98+
This method is useful for decay or release portions of [ADSR envelopes](/docs/effects/gain-node#advanced-usage--envelope-adsr).
9999

100100
<SetTargetAtTimeChart />
101101

packages/audiodocs/docs/core/base-audio-context.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Creates [`PeriodicWave`](/docs/effects/periodic-wave). This waveform specifies a
146146
| :---: | :---: | :---- |
147147
| `real` | `Float32Array` | An array of cosine terms. |
148148
| `imag` | `Float32Array` | An array of sine terms. |
149-
| `constraints` <Optional /> | [`PeriodicWaveConstraints`](/docs/core/base-audio-context#periodicwaveconstraints) | An object that specifies if normalization is disabled. If so, periodic wave will have maximum peak value of 1 and minimum peak value of -1.|
149+
| `constraints` <Optional /> | `{ disableNormalization: boolean }` | An object that specifies if normalization is disabled. If so, periodic wave will have maximum peak value of 1 and minimum peak value of -1.|
150150

151151
#### Errors
152152

@@ -317,19 +317,17 @@ const buffer = await this.audioContext.decodeAudioData(data, 4800, 2, false);
317317

318318
### `ContextState`
319319

320-
<details>
321-
<summary>Details</summary>
322320

323321
**Acceptable values:**
324-
- `suspended`
322+
- `suspended`
325323

326-
The audio context has been suspended (with one of [`suspend`](/docs/core/audio-context#suspend) or [`OfflineAudioContext.suspend`](/docs/core/offline-audio-context#suspend)).
324+
The audio context has been suspended (with one of [`suspend`](/docs/core/audio-context#suspend) or [`OfflineAudioContext.suspend`](/docs/core/offline-audio-context#suspend)).
327325

328-
- `running`
326+
- `running`
329327

330-
The audio context is running normally.
328+
The audio context is running normally.
331329

332-
- `closed`
330+
- `closed`
331+
332+
The audio context has been closed (with [`close`](/docs/core/audio-context#close) method).
333333

334-
The audio context has been closed (with [`close`](/docs/core/audio-context#close) method).
335-
</details>

packages/audiodocs/docs/destinations/audio-destination-node.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ Each `AudioContext` has exactly one AudioDestinationNode, which can be accessed
1616
[`AudioContext.destination`](/docs/core/base-audio-context/#properties) property.
1717

1818

19-
#### [`AudioNode`](/docs/core/audio-node#read-only-properties) properties
20-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={0} channelCount={2} channelCountMode={"explicit"} channelInterpretation={"speakers"} />
21-
2219
## Properties
2320

2421
`AudioDestinationNode` does not define any additional properties.
2522
It inherits all properties from [`AudioNode`](/docs/core/audio-node), listed above.
2623

24+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={0} channelCount={2} channelCountMode="explicit" channelInterpretation="speakers" />
25+
2726
## Methods
2827

2928
`AudioDestinationNode` does not define any additional methods.

packages/audiodocs/docs/effects/biquad-filter-node.mdx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,18 @@
22
sidebar_position: 1
33
---
44

5-
import AudioNodePropsTable from "@site/src/components/AudioNodePropsTable"
65
import { Optional, ReadOnly } from '@site/src/components/Badges';
7-
import InteractiveExample from '@site/src/components/InteractiveExample';
8-
import AudioApiExample from '@site/src/components/AudioApiExample'
9-
import VinylPlayer from '@site/src/components/RecordPlayerExample/VinylAnimation';
10-
6+
import AudioNodePropsTable from "@site/src/components/AudioNodePropsTable"
7+
import FrequencyResponseGraph from '@site/src/examples/Biquad/FrequencyResponseGraph';
8+
import VinylPlayer from '@site/src/examples/VinylPlayer';
119

1210
# BiquadFilterNode
1311

12+
1413
The `BiquadFilterNode` interface represents a low-order filter. It is an [`AudioNode`](/docs/core/audio-node) used for tone controls, graphic equalizers, and other audio effects.
1514
Multiple `BiquadFilterNode` instances can be combined to create more complex filtering chains.
1615

17-
18-
<VinylPlayer/>
19-
20-
21-
#### [`AudioNode`](/docs/core/audio-node#read-only-properties) properties
22-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"max"} channelInterpretation={"speakers"} />
16+
<VinylPlayer />
2317

2418
## Constructor
2519

@@ -46,16 +40,30 @@ Or by using `BaseAudioContext` factory method:
4640

4741
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
4842

43+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="max" channelInterpretation="speakers" />
44+
4945
| Name | Type | Rate | Description |
5046
| :--: | :--: | :----------: | :-- |
51-
| `frequency` | [`AudioParam`](/docs/core/audio-param) | [`k-rate`](/docs/core/audio-param#a-rate-vs-k-rate) | The filter’s cutoff or center frequency in hertz (Hz). |
52-
| `detune` | [`AudioParam`](/docs/core/audio-param) | [`k-rate`](/docs/core/audio-param#a-rate-vs-k-rate) | Amount by which the frequency is detuned in cents. |
53-
| `Q` | [`AudioParam`](/docs/core/audio-param) | [`k-rate`](/docs/core/audio-param#a-rate-vs-k-rate) | The filter’s Q factor (quality factor). |
54-
| `gain` | [`AudioParam`](/docs/core/audio-param) | [`k-rate`](/docs/core/audio-param#a-rate-vs-k-rate) | Gain applied by specific filter types, in decibels (dB). |
55-
| `type` | [`BiquadFilterType`](#biquadfiltertype-enumeration-description) || Defines the kind of filtering algorithm the node applies (e.g. `"lowpass"`, `"highpass"`). |
47+
| `Q` | [`AudioParam`](/docs/core/audio-param) | [`k‑rate`](/docs/core/audio-param#a-rate-vs-k-rate) | The filter’s Q factor (quality factor). |
48+
| `detune` | [`AudioParam`](/docs/core/audio-param) | [`k‑rate`](/docs/core/audio-param#a-rate-vs-k-rate) | Amount by which the frequency is detuned in cents. |
49+
| `frequency` | [`AudioParam`](/docs/core/audio-param) | [`k‑rate`](/docs/core/audio-param#a-rate-vs-k-rate) | The filter’s cutoff or center frequency in hertz (Hz). |
50+
| `gain` | [`AudioParam`](/docs/core/audio-param) | [`k‑rate`](/docs/core/audio-param#a-rate-vs-k-rate) | Gain applied by specific filter types, in decibels (dB). |
51+
| `type` | [`BiquadFilterType`](#biquadfiltertype-enumeration-description) | | Defines the kind of filtering algorithm the node applies (e.g. "lowpass", "highpass"). |
52+
53+
<br />
54+
55+
<br />
56+
57+
<br />
5658

5759
#### BiquadFilterType enumeration description
58-
Note: The detune parameter behaves the same way for all filter types, so it is not repeated below.
60+
61+
<FrequencyResponseGraph />
62+
63+
<br />
64+
65+
<br />
66+
5967
| `type` | Description | `frequency` | `Q` | `gain` |
6068
|:------:|:-----------:|:-----------:|:---:|:------:|
6169
| `lowpass` | Second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through; higher frequencies are attenuated. | The cutoff frequency. | Determines how peaked the frequency is around the cutoff. Higher values result in a sharper peak. | Not used |
@@ -67,10 +75,8 @@ Note: The detune parameter behaves the same way for all filter types, so it is n
6775
| `notch` | Notch (band-stop) filter. Opposite of a bandpass filter: frequencies around the center are attenuated; others remain unchanged. | The center of the frequency range where the notch is applied. | Controls the bandwidth. Higher values result in a narrower band. | Not used |
6876
| `allpass` | Second-order allpass filter. All frequencies pass through, but changes the phase relationship between the various frequencies. | The frequency where the center of the phase transition occurs (maximum group delay). | Controls how sharp the phase transition is at the center frequency. Higher values result in a sharper transition and a larger group delay. | Not used |
6977

78+
Note: The detune parameter behaves the same way for all filter types, so it is not included above
7079

71-
import FrequencyResponseGraph from '@site/src/examples/Biquad/FrequencyResponseGraph';
72-
73-
<AudioApiExample component={FrequencyResponseGraph} />
7480

7581
## Methods
7682

packages/audiodocs/docs/effects/convolver-node.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import { Optional } from '@site/src/components/Badges';
1010
The `ConvolverNode` interface represents a linear convolution effect, that can be applied to a signal given an impulse response.
1111
This is the easiest way to achieve `echo` or [`reverb`](https://en.wikipedia.org/wiki/Reverb_effect) effects.
1212

13-
#### [`AudioNode`](/docs/core/audio-node#properties) properties
14-
15-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"clamped-max"} channelInterpretation={"speakers"} />
1613

1714
:::info
1815
Convolver is a node with tail-time, which means, that it continues to output non-silent audio with zero input for the length of the buffer.
@@ -40,6 +37,8 @@ Or by using `BaseAudioContext` factory method:
4037

4138
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
4239

40+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="clamped-max" channelInterpretation="speakers" />
41+
4342
| Name | Type | Description |
4443
| :----: | :----: | :-------- |
4544
| `buffer` | [`AudioBuffer`](/docs/sources/audio-buffer) | Associated AudioBuffer. |

packages/audiodocs/docs/effects/delay-node.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import { ReadOnly } from '@site/src/components/Badges';
1010
The `DelayNode` interface represents the latency of the audio signal by given time. It is an [`AudioNode`](/docs/core/audio-node) that applies time shift to incoming signal f.e.
1111
if `delayTime` value is 0.5, it means that audio will be played after 0.5 seconds.
1212

13-
#### [`AudioNode`](/docs/core/audio-node#properties) properties
14-
15-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"max"} channelInterpretation={"speakers"} />
16-
1713
:::info
1814
Delay is a node with tail-time, which means, that it continues to output non-silent audio with zero input for the duration of `delayTime`.
1915
:::
@@ -26,6 +22,8 @@ Delay is a node with tail-time, which means, that it continues to output non-sil
2622

2723
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
2824

25+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="max" channelInterpretation="speakers" />
26+
2927
| Name | Type | Description |
3028
| :----: | :----: | :-------- |
3129
| `delayTime`| <ReadOnly /> [`AudioParam`](/docs/core/audio-param) | [`k-rate`](/docs/core/audio-param#a-rate-vs-k-rate) `AudioParam` representing value of time shift to apply. |

packages/audiodocs/docs/effects/gain-node.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ The `GainNode` interface represents a change in volume (amplitude) of the audio
1313
Direct, immediate gain changes often cause audible clicks. Use the scheduling methods of [`AudioParam`](/docs/core/audio-param) (e.g. `linearRampToValueAtTime`, `exponentialRampToValueAtTime`) to smoothly interpolate volume transitions.
1414
:::
1515

16-
#### [`AudioNode`](/docs/core/audio-node#properties) properties
17-
18-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"max"} channelInterpretation={"speakers"} />
19-
2016
## Constructor
2117

2218
```tsx
@@ -37,6 +33,8 @@ You can also create a `GainNode` via the [`BaseAudioContext.createGain()`](/docs
3733

3834
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
3935

36+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="max" channelInterpretation="speakers" />
37+
4038
| Name | Type | Description | |
4139
| :----: | :----: | :-------- | :-: |
4240
| `gain` | [`AudioParam`](/docs/core/audio-param) | [`a-rate`](/docs/core/audio-param#a-rate-vs-k-rate) `AudioParam` representing the gain value to apply. | <ReadOnly /> |
@@ -78,4 +76,4 @@ gainNode.gain.linearRampToValueAtTime(1, audioContext.currentTime + 2);
7876

7977
## Advanced usage — Envelope (ADSR)
8078

81-
`GainNode` is the key building block for implementing sound envelopes. For a practical, step-by-step walkthrough of ADSR envelopes and how to apply them in a real app, see the [Making a piano keyboard](/docs/guides/making-a-piano-keyboard#envelopes-) guide.
79+
`GainNode` is the key building block for implementing sound envelopes. For a practical, step-by-step walkthrough of ADSR envelopes and how to apply them in a real app, see the [Making a piano keyboard](/docs/guides/making-a-piano-keyboard#envelopes-%EF%B8%8F) guide.

packages/audiodocs/docs/effects/stereo-panner-node.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import { Optional, ReadOnly } from '@site/src/components/Badges';
99

1010
The `StereoPannerNode` interface represents the change in ratio between two output channels (f. e. left and right speaker).
1111

12-
#### [`AudioNode`](/docs/core/audio-node#properties) properties
13-
14-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"clamped-max"} channelInterpretation={"speakers"} />
15-
1612
## Constructor
1713

1814
```tsx
@@ -34,6 +30,8 @@ Or by using `BaseAudioContext` factory method:
3430

3531
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
3632

33+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="clamped-max" channelInterpretation="speakers" />
34+
3735
| Name | Type | Description |
3836
| :--: | :--: | :---------- |
3937
| `pan` | [`AudioParam`](/docs/core/audio-param) | [`a-rate`](/docs/core/audio-param#a-rate-vs-k-rate) `AudioParam` representing how the audio signal is distributed between the left and right channels. |

packages/audiodocs/docs/effects/wave-shaper-node.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import { ReadOnly, Optional } from '@site/src/components/Badges';
1010
The `WaveShaperNode` interface represents non-linear signal distortion effects.
1111
Non-linear distortion is commonly used for both subtle non-linear warming, or more obvious distortion effects.
1212

13-
#### [`AudioNode`](/docs/core/audio-node#properties) properties
14-
15-
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"clamped-max"} channelInterpretation={"speakers"} />
1613

1714
## Constructor
1815

@@ -36,6 +33,8 @@ Or by using `BaseAudioContext` factory method:
3633

3734
It inherits all properties from [`AudioNode`](/docs/core/audio-node#properties).
3835

36+
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode="clamped-max" channelInterpretation="speakers" />
37+
3938
| Name | Type | Description |
4039
| :--: | :--: | :---------- |
4140
| `curve` | `Float32Array \| null` | The shaping curve used for waveshaping effect. |

0 commit comments

Comments
 (0)