PeriodicWave
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The PeriodicWave interface defines a periodic waveform that can be used to shape the output of an OscillatorNode.
PeriodicWave has no inputs or outputs; it is used to define custom oscillators when calling OscillatorNode.setPeriodicWave(). The PeriodicWave itself is created/returned by BaseAudioContext.createPeriodicWave.
Constructor
PeriodicWave()-
Creates a new
PeriodicWaveobject instance using the default values for all properties. If you wish to establish custom property values at the outset, use theBaseAudioContext.createPeriodicWavefactory method instead.
Instance properties
None; also, PeriodicWave doesn't inherit any properties.
Instance methods
None; also, PeriodicWave doesn't inherit any methods.
Example
See BaseAudioContext.createPeriodicWave for simple example code that shows how to create a PeriodicWave object containing a simple sine wave.
Specifications
| Specification |
|---|
| Web Audio API> # PeriodicWave> |
Browser compatibility
Loading…