AnalyserNode Class
A node that provides the time-domain and frequency-domain data of its input (https://webaudio.github.io/web-audio-api/#AnalyserNode). Its output is its input.
public sealed class AnalyserNode : AudioNode- Inheritance
AudioNodeAnalyserNode
Constructors
| Name | Description |
|---|---|
| AnalyserNode(BaseAudioContext, AnalyserOptions?) | Creates an analyser. |
AnalyserNode(BaseAudioContext, AnalyserOptions?)
AnalyserNode.csCreates an analyser.
public AnalyserNode(BaseAudioContext context, AnalyserOptions? options = null)Parameters
contextBaseAudioContextoptionsAnalyserOptions?
Exceptions
DomException- An option is out of its range (an
IndexSizeError).
See also
Properties
| Name | Description |
|---|---|
| FftSize | Gets or sets the size of the FFT (a power of two from 32 to 32768). |
| FrequencyBinCount | Gets the number of frequency bins (half the FFT size). |
| MaxDecibels | Gets or sets the maximum power in dB of the byte frequency data. |
| MinDecibels | Gets or sets the minimum power in dB of the byte frequency data. |
| SmoothingTimeConstant | Gets or sets the smoothing over time of the frequency data, from 0 to 1. |
FftSize
AnalyserNode.csGets or sets the size of the FFT (a power of two from 32 to 32768).
public uint FftSize { get; set; }Property value
Exceptions
DomException- The value is not a power of two from 32 to 32768 (an
IndexSizeError).
See also
FrequencyBinCount
AnalyserNode.csGets the number of frequency bins (half the FFT size).
public uint FrequencyBinCount { get; }Property value
See also
MaxDecibels
AnalyserNode.csGets or sets the maximum power in dB of the byte frequency data.
public double MaxDecibels { get; set; }Property value
Exceptions
DomException- The value is not greater than
AnalyserNode.MinDecibels(anIndexSizeError).
See also
MinDecibels
AnalyserNode.csGets or sets the minimum power in dB of the byte frequency data.
public double MinDecibels { get; set; }Property value
Exceptions
DomException- The value is not less than
AnalyserNode.MaxDecibels(anIndexSizeError).
See also
SmoothingTimeConstant
AnalyserNode.csGets or sets the smoothing over time of the frequency data, from 0 to 1.
public double SmoothingTimeConstant { get; set; }Methods
| Name | Description |
|---|---|
| GetByteFrequencyData(Span<byte>) | Copies the current frequency data, scaled from AnalyserNode.MinDecibels to AnalyserNode.MaxDecibels, to an array of bytes (a Uint8Array). |
| GetByteTimeDomainData(Span<byte>) | Copies the current time-domain data (down-mixed to mono), scaled from -1 to 1, to an array of bytes (a Uint8Array). |
| GetFloatFrequencyData(Span<byte>) | Copies the current frequency data in dB to an array (a Float32Array). |
| GetFloatTimeDomainData(Span<byte>) | Copies the current time-domain data (down-mixed to mono) to an array (a Float32Array). |
GetByteFrequencyData(Span<byte>)
AnalyserNode.csCopies the current frequency data, scaled from AnalyserNode.MinDecibels to AnalyserNode.MaxDecibels, to an array of bytes (a Uint8Array).
GetByteTimeDomainData(Span<byte>)
AnalyserNode.csCopies the current time-domain data (down-mixed to mono), scaled from -1 to 1, to an array of bytes (a Uint8Array).
GetFloatFrequencyData(Span<byte>)
AnalyserNode.csCopies the current frequency data in dB to an array (a Float32Array).
GetFloatTimeDomainData(Span<byte>)
AnalyserNode.csCopies the current time-domain data (down-mixed to mono) to an array (a Float32Array).