| sidebar_position |
|---|
5 |
import { Optional } from '@site/src/components/Badges';
The PeriodicWave interface defines a periodic waveform that can be used to shape the output of an OscillatorNode.
constructor(context: BaseAudioContext, options: PeriodicWaveOptions)| Parameter | Type | Default | Description |
|---|---|---|---|
real |
Float32Array |
- | Cosine terms |
imag |
Float32Array |
- | Sine terms |
disableNormalization |
boolean |
false | Whether the periodic wave is normalized or not. |
Or by using BaseAudioContext factory method:
BaseAudioContext.createPeriodicWave(real, imag, constraints?: PeriodicWaveConstraints)
None. PeriodicWave has no own or inherited properties.
None. PeriodicWave has no own or inherited methods.
- if only one is specified, the other one is treated as array of 0s of the same length
- if neither is given values are equivalent to the sine wave
- if both given, they have to have the same length
- to see how values corresponds to the output wave see for more information