Skip to content

Commit 6988cd3

Browse files
authored
Docs landing page (#561)
* feat: working on landing page * feat: some changes * feat: features and color fixes * fix: copy * feat: a miniscule amount of changes * feat: examples struct * feat: vis * feat: its something * feat: cleanup * feat: color fixes * feat: better samples * fix: highligths * fix: changes * feat: clean rewrite, eq * feat: nicer loading * fix: ssr * feat: some changes * fix: testimonials, cleanup and others * fix: header and other stuff * fix: temp spacings * fix: small cleanup * feat: some features * fix: labels positions * fix: control points * fix: cleanup and fix mobile view * fix: mobile spacings * fix: og-image titles, copies testimonials * fix: og-image
1 parent cec6d21 commit 6988cd3

File tree

157 files changed

+5649
-619
lines changed

Some content is hidden

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

157 files changed

+5649
-619
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { ReadOnly } from '@site/src/components/Badges';
88
# AnalyserNode
99

1010
The `AnalyserNode` interface represents a node providing two core functionalities: extracting time-domain data and frequency-domain data from audio signals.
11-
It is an [`AudioNode`](/core/audio-node) that passes the audio data unchanged from input to output, but allows you to take passed data and process it.
11+
It is an [`AudioNode`](/docs/core/audio-node) that passes the audio data unchanged from input to output, but allows you to take passed data and process it.
1212

13-
#### [`AudioNode`](/core/audio-node#read-only-properties) properties
13+
#### [`AudioNode`](/docs/core/audio-node#read-only-properties) properties
1414

1515
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"max"} channelInterpretation={"speakers"} />
1616

@@ -23,17 +23,17 @@ In contrast, a frequency-domain graph reveals how the signal's energy or power i
2323

2424
## Constructor
2525

26-
[`BaseAudioContext.createAnalyser()`](/core/base-audio-context#createanalyser)
26+
[`BaseAudioContext.createAnalyser()`](/docs/core/base-audio-context#createanalyser)
2727

2828
## Properties
2929

3030
| Name | Type | Description | |
3131
| :----: | :----: | :-------- | :-: |
3232
| `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. |
33-
| `minDecibels` | `number` | Float value representing the minimum value for the range of results from [`getByteFrequencyData()`](/analysis/analyser-node#getbytefrequencydata). |
34-
| `maxDecibels` | `number` | Float value representing the maximum value for the range of results from [`getByteFrequencyData()`](/analysis/analyser-node#getbytefrequencydata). |
33+
| `minDecibels` | `number` | Float value representing the minimum value for the range of results from [`getByteFrequencyData()`](/docs/analysis/analyser-node#getbytefrequencydata). |
34+
| `maxDecibels` | `number` | Float value representing the maximum value for the range of results from [`getByteFrequencyData()`](/docs/analysis/analyser-node#getbytefrequencydata). |
3535
| `smoothingTimeConstant` | `number` | Float value representing averaging constant with the last analysis frame. In general the higher value the smoother is the transition between values over time. |
36-
| `window` | [`WindowType`](/types/window-type) | Enumerated value that specifies the type of window function applied when extracting frequency data. |
36+
| `window` | [`WindowType`](/docs/types/window-type) | Enumerated value that specifies the type of window function applied when extracting frequency data. |
3737
| `frequencyBinCount` | `number` | Integer value representing amount of the data obtained in frequency domain, half of the `fftSize` property. | <ReadOnly /> |
3838

3939
:::caution
@@ -98,13 +98,13 @@ Each value in the array is within the range 0 to 255, where value of 127 indicat
9898
#### `minDecibels`
9999
- Default value is -100 dB.
100100
- 0 dB([decibel](https://en.wikipedia.org/wiki/Decibel)) is the loudest possible sound, -10 dB is a 10th of that.
101-
- When getting data from [`getByteFrequencyData()`](/analysis/analyser-node#getbytefrequencydata), any frequency with amplitude lower then `minDecibels` will be returned as 0.
101+
- When getting data from [`getByteFrequencyData()`](/docs/analysis/analyser-node#getbytefrequencydata), any frequency with amplitude lower then `minDecibels` will be returned as 0.
102102
- Throws `IndexSizeError` if set value is greater than or equal to `maxDecibels`.
103103

104104
#### `maxDecibels`
105105
- Default value is -30 dB.
106106
- 0 dB([decibel](https://en.wikipedia.org/wiki/Decibel)) is the loudest possible sound, -10 dB is a 10th of that.
107-
- When getting data from [`getByteFrequencyData()`](/analysis/analyser-node#getbytefrequencydata), any frequency with amplitude higher then `maxDecibels` will be returned as 255.
107+
- When getting data from [`getByteFrequencyData()`](/docs/analysis/analyser-node#getbytefrequencydata), any frequency with amplitude higher then `maxDecibels` will be returned as 255.
108108
- Throws `IndexSizeError` if set value is less then or equal to `minDecibels`.
109109

110110
#### `smoothingTimeConstant`

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ sidebar_position: 2
44

55
# AudioContext
66

7-
The `AudioContext` interface inherits from [`BaseAudioContext`](/core/base-audio-context).
7+
The `AudioContext` interface inherits from [`BaseAudioContext`](/docs/core/base-audio-context).
88
It is responsible for supervising and managing audio-processing graph.
99

1010
## Constructor
1111

1212
`new AudioContext()`
1313

14-
[`new AudioContext(options: AudioContextOptions)`](/core/audio-context#audiocontextoptions)
14+
[`new AudioContext(options: AudioContextOptions)`](/docs/core/audio-context#audiocontextoptions)
1515

1616
#### Errors
1717

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ We usually represent the channels with the standard abbreviations detailed in th
2121
#### Mixing
2222

2323
When node has more then one input or number of inputs channels differs from output up-mixing or down-mixing must be conducted.
24-
There are three properties involved in mixing process: `channelCount`, [`ChannelCountMode`](/types/channel-count-mode), [`ChannelInterpretation`](/types/channel-interpretation).
24+
There are three properties involved in mixing process: `channelCount`, [`ChannelCountMode`](/docs/types/channel-count-mode), [`ChannelInterpretation`](/docs/types/channel-interpretation).
2525
Based on them we can obtain output's number of channels and mixing strategy.
2626

2727
## Properties
2828

2929
| Name | Type | Description | |
3030
| :----: | :----: | :-------- | :-: |
31-
| `context` | [`BaseAudioContext`](/core/base-audio-context) | Associated context. | <ReadOnly /> |
31+
| `context` | [`BaseAudioContext`](/docs/core/base-audio-context) | Associated context. | <ReadOnly /> |
3232
| `numberOfInputs` | `number` | Integer value representing the number of input connections for the node. | <ReadOnly /> |
3333
| `numberOfOutputs` | `number` | Integer value representing the number of output connections for the node. | <ReadOnly /> |
3434
| `channelCount` | `number` | Integer used to determine how many channels are used when up-mixing or down-mixing node's inputs. | <ReadOnly /> |
35-
| `channelCountMode` | [`ChannelCountMode`](/types/channel-count-mode) | Enumerated value that specifies the method by which channels are mixed between the node's inputs and outputs. | <ReadOnly /> |
36-
| `channelInterpretation` | [`ChannelInterpretation`](/types/channel-interpretation) | Enumerated value that specifies how input channels are mapped to output channels when number of them is different. | <ReadOnly /> |
35+
| `channelCountMode` | [`ChannelCountMode`](/docs/types/channel-count-mode) | Enumerated value that specifies the method by which channels are mixed between the node's inputs and outputs. | <ReadOnly /> |
36+
| `channelInterpretation` | [`ChannelInterpretation`](/docs/types/channel-interpretation) | Enumerated value that specifies how input channels are mapped to output channels when number of them is different. | <ReadOnly /> |
3737

3838
## Examples
3939

@@ -89,7 +89,7 @@ The above method lets you connect one of the node's outputs to a destination.
8989

9090
| Parameters | Type | Description |
9191
| :---: | :---: | :---- |
92-
| `destination` | [`AudioNode`](/core/audio-node) or [`AudioParam`](/core/audio-param) | `AudioNode` or `AudioParam` to which to connect. |
92+
| `destination` | [`AudioNode`](/docs/core/audio-node) or [`AudioParam`](/docs/core/audio-param) | `AudioNode` or `AudioParam` to which to connect. |
9393

9494
#### Errors:
9595

@@ -105,7 +105,7 @@ The above method lets you disconnect one or more nodes from the node.
105105

106106
| Parameters | Type | Description |
107107
| :---: | :---: | :---- |
108-
| `destination` <Optional /> | [`AudioNode`](/core/audio-node) or [`AudioParam`](/core/audio-param) | `AudioNode` or `AudioParam` from which to disconnect. |
108+
| `destination` <Optional /> | [`AudioNode`](/docs/core/audio-node) or [`AudioParam`](/docs/core/audio-param) | `AudioNode` or `AudioParam` from which to disconnect. |
109109

110110
If no arguments provided node disconnects from all outgoing connections.
111111

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Optional, ReadOnly } from '@site/src/components/Badges';
66

77
# AudioParam
88

9-
The `AudioParam` interface represents audio-related parameter (such as `gain` property of [GainNode`](/effects/gain-node)).
9+
The `AudioParam` interface represents audio-related parameter (such as `gain` property of [GainNode`](/docs/effects/gain-node)).
1010
It can be set to specific value or schedule value change to happen at specific time, and following specific pattern.
1111

1212
#### a-rate vs k-rate
@@ -86,7 +86,7 @@ The change begins at the time designated for the previous event. It follows a ex
8686
### `setTargetAtTime`
8787

8888
The above method schedules a gradual change to the new value at the start time.
89-
This method is useful for decay or release portions of [ADSR envelopes](/effects/gain-node#envelope---adsr).
89+
This method is useful for decay or release portions of [ADSR envelopes](/docs/effects/gain-node#envelope---adsr).
9090

9191
![](/img/setTargetAtTime.png)
9292

@@ -159,4 +159,4 @@ The above method cancels all scheduled changes after given cancel time, but hold
159159

160160
## Remarks
161161

162-
All time parameters should be in the same time coordinate system as [`BaseAudioContext.currentTime`](/core/base-audio-context).
162+
All time parameters should be in the same time coordinate system as [`BaseAudioContext.currentTime`](/docs/core/base-audio-context).

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import { Optional, ReadOnly, MobileOnly } from '@site/src/components/Badges';
88

99
The `BaseAudioContext` interface acts as a supervisor of audio-processing graphs. It provides key processing parameters such as current time, output destination or sample rate.
1010
Additionally, it is responsible for nodes creation and audio-processing graph's lifecycle management.
11-
However, `BaseAudioContext` itself cannot be directly utilized, instead its functionalities must be accessed through one of its derived interfaces: [`AudioContext`](/core/audio-context), `OfflineAudioContext`.
11+
However, `BaseAudioContext` itself cannot be directly utilized, instead its functionalities must be accessed through one of its derived interfaces: [`AudioContext`](/docs/core/audio-context), `OfflineAudioContext`.
1212

1313
#### Audio graph
1414

1515
An audio graph is a structured representation of audio processing elements and their connections within an audio context.
1616
The graph consists of various types of nodes, each performing specific audio operations, connected in a network that defines the audio signal flow.
1717
In general we can distinguish four types of nodes:
18-
- Source nodes (e.g [`AudioBufferSourceNode`](/sources/audio-buffer-source-node), `OscillatorNode`)
19-
- Effect nodes (e.g [`GainNode`](/effects/gain-node), `BiquadFilterNode`)
20-
- Analysis nodes (e.g [`AnalyserNode`](/analysis/analyser-node))
18+
- Source nodes (e.g [`AudioBufferSourceNode`](/docs/sources/audio-buffer-source-node), `OscillatorNode`)
19+
- Effect nodes (e.g [`GainNode`](/docs/effects/gain-node), `BiquadFilterNode`)
20+
- Analysis nodes (e.g [`AnalyserNode`](/docs/analysis/analyser-node))
2121
- Destination nodes (e.g `AudioDestinationNode`)
2222

2323
![](/img/audio-graph.png)
@@ -27,7 +27,7 @@ In general we can distinguish four types of nodes:
2727
Audio graph rendering is done in blocks of sample-frames. The number of sample-frames in a block is called render quantum size, and the block itself is called a render quantum.
2828
By default render quantum size value is 128 and it is constant.
2929

30-
The [`AudioContext`](/core/audio-context) rendering thread is driven by a system-level audio callback.
30+
The [`AudioContext`](/docs/core/audio-context) rendering thread is driven by a system-level audio callback.
3131
Each call has a system-level audio callback buffer size, which is a varying number of sample-frames that needs to be computed on time before the next system-level audio callback arrives,
3232
but render quantum size does not have to be a divisor of the system-level audio callback buffer size.
3333

@@ -42,13 +42,13 @@ Concept of system-level audio callback does not apply to `OfflineAudioContext`.
4242
| `currentTime` | `number` | Double value representing an ever-increasing hardware time in seconds, starting from 0. | <ReadOnly /> |
4343
| `destination` | `AudioDestinationNode` | Final output destination associated with the context. | <ReadOnly /> |
4444
| `sampleRate` | `number` | Float value representing the sample rate (in samples per seconds) used by all nodes in this context. | <ReadOnly /> |
45-
| `state` | [`ContextState`](/core/base-audio-context#contextstate) | Enumerated value represents the current state of the context. | <ReadOnly /> |
45+
| `state` | [`ContextState`](/docs/core/base-audio-context#contextstate) | Enumerated value represents the current state of the context. | <ReadOnly /> |
4646

4747
## Methods
4848

4949
### `createAnalyser`
5050

51-
The above method lets you create [`AnalyserNode`](/analysis/analyser-node).
51+
The above method lets you create [`AnalyserNode`](/docs/analysis/analyser-node).
5252

5353
#### Returns `AnalyserNode`.
5454

@@ -66,7 +66,7 @@ The above method lets you create `BiquadFilterNode`.
6666

6767
### `createBuffer`
6868

69-
The above method lets you create [`AudioBuffer`](/sources/audio-buffer).
69+
The above method lets you create [`AudioBuffer`](/docs/sources/audio-buffer).
7070

7171
| Parameters | Type | Description |
7272
| :---: | :---: | :---- |
@@ -86,29 +86,29 @@ The above method lets you create [`AudioBuffer`](/sources/audio-buffer).
8686

8787
### `createBufferSource`
8888

89-
The above method lets you create [`AudioBufferSourceNode`](/sources/audio-buffer-source-node).
89+
The above method lets you create [`AudioBufferSourceNode`](/docs/sources/audio-buffer-source-node).
9090

9191
| Parameters | Type | Description |
9292
| :---: | :---: | :---- |
93-
| `pitchCorrection` <Optional /> | [`AudioBufferSourceNodeOptions`](/core/base-audio-context#audiobuffersourcenodeoptions) | Dictionary object that specifies if pitch correction has to be available. |
93+
| `pitchCorrection` <Optional /> | [`AudioBufferSourceNodeOptions`](/docs/core/base-audio-context#audiobuffersourcenodeoptions) | Dictionary object that specifies if pitch correction has to be available. |
9494

9595
#### Returns `AudioBufferSourceNode`.
9696

9797
### `createBufferQueueSource` <MobileOnly />
9898

99-
The above method lets you create [`AudioBufferQueueSourceNode`](/sources/audio-buffer-queue-source-node).
99+
The above method lets you create [`AudioBufferQueueSourceNode`](/docs/sources/audio-buffer-queue-source-node).
100100

101101
#### Returns `AudioBufferQueueSourceNode`.
102102

103103
### `createGain`
104104

105-
The above method lets you create [`GainNode`](/effects/gain-node).
105+
The above method lets you create [`GainNode`](/docs/effects/gain-node).
106106

107107
#### Returns `GainNode`.
108108

109109
### `createOscillator`
110110

111-
The above method lets you create [`OscillatorNode`](/sources/oscillator-node).
111+
The above method lets you create [`OscillatorNode`](/docs/sources/oscillator-node).
112112

113113
#### Returns `OscillatorNode`.
114114

@@ -120,7 +120,7 @@ The above method lets you create `PeriodicWave`.
120120
| :---: | :---: | :---- |
121121
| `real` | `Float32Array` | An array of cosine terms. |
122122
| `imag` | `Float32Array` | An array of sine terms. |
123-
| `constraints` <Optional /> | [`PeriodicWaveConstraints`](/core/base-audio-context#periodicwaveconstraints) | An object that specifies if normalization is disabled. |
123+
| `constraints` <Optional /> | [`PeriodicWaveConstraints`](/docs/core/base-audio-context#periodicwaveconstraints) | An object that specifies if normalization is disabled. |
124124

125125
#### Errors
126126

@@ -134,7 +134,7 @@ The above method lets you create `PeriodicWave`.
134134

135135
The above method lets you create `StereoPannerNode`.
136136

137-
#### Returns [`StereoPannerNode`](/effects/stereo-panner-node).
137+
#### Returns [`StereoPannerNode`](/docs/effects/stereo-panner-node).
138138

139139
### `createBiquadFilter
140140

@@ -232,15 +232,15 @@ The above method lets you decode audio data. It decodes with PCM data in Base64.
232232
**Acceptable values:**
233233
- `suspended`
234234

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

237237
- `running`
238238

239239
The audio context is running normally.
240240

241241
- `closed`
242242

243-
The audio context has been closed (with [`close`](/core/audio-context#close) method).
243+
The audio context has been closed (with [`close`](/docs/core/audio-context#close) method).
244244
</details>
245245

246246
### `AudioBufferSourceNodeOptions`

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import { ReadOnly } from '@site/src/components/Badges';
88
# GainNode
99

1010
The `GainNode` interface represents the change in volume (amplitude) of the audio signal.
11-
It is an [`AudioNode`](/core/audio-node) that applies given gain to processing audio data.
11+
It is an [`AudioNode`](/docs/core/audio-node) that applies given gain to processing audio data.
1212

13-
Direct gain modification often results in unpleasant 'clicks'. To avoid this effect, utilize exponential interpolation methods from the [`AudioParam`](/core/audio-param).
13+
Direct gain modification often results in unpleasant 'clicks'. To avoid this effect, utilize exponential interpolation methods from the [`AudioParam`](/docs/core/audio-param).
1414

1515
![gain-node](/img/gain-node.png)
1616

17-
#### [`AudioNode`](/core/audio-node#read-only-properties) properties
17+
#### [`AudioNode`](/docs/core/audio-node#read-only-properties) properties
1818

1919
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"max"} channelInterpretation={"speakers"} />
2020

@@ -34,13 +34,13 @@ You can read more about envelopes and ADSR on [Wikipedia](<https://en.wikipedia.
3434

3535
## Constructor
3636

37-
[`BaseAudioContext.createGain()`](/core/base-audio-context#creategain)
37+
[`BaseAudioContext.createGain()`](/docs/core/base-audio-context#creategain)
3838

3939
## Properties
4040

4141
| Name | Type | Description | |
4242
| :----: | :----: | :-------- | :-: |
43-
| `gain` | [`AudioParam`](/core/audio-param) | [`a-rate`](/core/audio-param#a-rate-vs-k-rate) `AudioParam` representing value of gain to apply. | <ReadOnly />
43+
| `gain` | [`AudioParam`](/docs/core/audio-param) | [`a-rate`](/docs/core/audio-param#a-rate-vs-k-rate) `AudioParam` representing value of gain to apply. | <ReadOnly />
4444

4545
## Remarks
4646

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

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

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

12-
#### [`AudioNode`](/core/audio-node#read-only-properties) properties
12+
#### [`AudioNode`](/docs/core/audio-node#read-only-properties) properties
1313

1414
<AudioNodePropsTable numberOfInputs={1} numberOfOutputs={1} channelCount={2} channelCountMode={"clamped-max"} channelInterpretation={"speakers"} />
1515

1616
## Constructor
1717

18-
[`BaseAudioContext.createStereoPanner()`](/core/base-audio-context#createstereopanner)
18+
[`BaseAudioContext.createStereoPanner()`](/docs/core/base-audio-context#createstereopanner)
1919

2020
## Properties
2121

packages/audiodocs/docs/fundamentals/getting-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default {
9090
```
9191
</details>
9292

93-
Read more about plugin [here](/other/audio-api-plugin)!
93+
Read more about plugin [here](/docs/other/audio-api-plugin)!
9494

9595
### Step 3: Wrap metro config with Audio API wrapper (recommended)
9696

@@ -172,4 +172,4 @@ No further steps are necessary.
172172

173173
## What's next?
174174

175-
In [the next section](/guides/lets-make-some-noise), we will learn how to prepare Audio API and to play some sound!.
175+
In [the next section](/docs/guides/lets-make-some-noise), we will learn how to prepare Audio API and to play some sound!.

packages/audiodocs/docs/fundamentals/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_position: 1
88

99
React Native Audio API is an imperative, high-level API for processing and synthesizing audio in React Native Applications. React Native Audio API follows the [Web Audio Specification](https://www.w3.org/TR/webaudio-1.1/) making it easier to write audio-heavy applications for iOS, Android and Web with just one codebase.
1010

11-
import OscillatorSquare from '@site/src/components/LandingPage/OscillatorSquare';
11+
import OscillatorSquare from '@site/src/components/OscillatorSquare';
1212

1313
<OscillatorSquare />
1414

0 commit comments

Comments
 (0)