PeriodicWave

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 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.

Properties

None; also, PeriodicWave doesn't inherit any properties.

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
PeriodicWave
30
12
25
No
17
8
≤37
30
26
18
8
2.0
PeriodicWave
55
Before Chrome 59, the default values were not supported.
79
53
No
42
14.1
55
Before Chrome 59, the default values were not supported.
55
Before Chrome 59, the default values were not supported.
53
42
14.5
6.0
Before Samsung Internet 7.0, the default values were not supported.

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PeriodicWave