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.
PeriodicWave()Creates a new PeriodicWave object instance using the default values for all properties. If you wish to establish custom property values at the outset, use the BaseAudioContext.createPeriodicWave factory method instead.
None; also, PeriodicWave doesn't inherit any properties.
None; also, PeriodicWave doesn't inherit any methods.
See BaseAudioContext.createPeriodicWave for simple example code that shows how to create a PeriodicWave object containing a simple sine wave.
| Specification |
|---|
| Web Audio API> # PeriodicWave> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
PeriodicWave |
55 | 79 | 53 | 42 | 14.1 | 55 | 53 | 42 | 14.5 | 6.0 | 55 | 14.5 |
PeriodicWave |
30 | 12 | 25 | 17 | 8 | 30 | 26 | 18 | 8 | 2.0 | 4.4 | 8 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PeriodicWave