Skip to content

Commit

Permalink
docs: added window to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Makowski committed Jan 31, 2025
1 parent b732851 commit 1b9e5dc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/audiodocs/docs/types/channel-interpretation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ sidebar_position: 2
| :------------------------: | :------------------------- | :------------ |
| x | y where y > x | Fill each output channel with its counterpart(channel with same number), rest of output channels are silent channels |
| x | y where y < x | Fill each output channel with its counterpart(channel with same number), rest of input channels are skipped |


16 changes: 16 additions & 0 deletions packages/audiodocs/docs/types/window-type.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_position: 3
---

# WindowType

`WindowType` type specifies which [window function](https://en.wikipedia.org/wiki/Window_function) is applied when extracting frequency data.

**Acceptable values:**
- `blackman`

Set [Blackman window](https://www.sciencedirect.com/topics/engineering/blackman-window) as window function.

- 'hann`

Set [Hanning window](https://www.sciencedirect.com/topics/engineering/hanning-window) as window function.
10 changes: 10 additions & 0 deletions packages/audiodocs/docs/visualization/analyser-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ In contrast, a frequency-domain graph reveals how the signal's energy or power i
| `minDecibels` | `number` | Returns float value representing the minimum value for the range of results from [`getByteFrequencyData()`](/visualization/analyser-node#getbytefrequencydata). |
| `maxDecibels` | `number` | Returns float value representing the maximum value for the range of results from [`getByteFrequencyData()`](/visualization/analyser-node#getbytefrequencydata). |
| `smoothingTimeConstant` | `number` | Returns float value representing averaging constant with the last analysis frame. In general the higher value the smoother is the transition between values over time. |
| `window` | [`WindowType`](/types/window-type) | Returns an enumerated value that specifies the type of window function applied when extracting frequency data. |

:::caution

On `Web`, the value of`window` is permanently `'blackman'`, and it cannot be set like in the `Android` or `iOS`.

:::

## Read-only properties

Expand Down Expand Up @@ -101,3 +108,6 @@ Each value in the array is within the range 0 to 255, where value of 127 indicat
- Default value is 0.8.
- From range 0 to 1.
- 0 means no averaging, 1 means "overlap the previous and current buffer quite a lot while computing the value".

#### `window`
- Default value is `'blackman'`

0 comments on commit 1b9e5dc

Please sign in to comment.