This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The oversample property of the WaveShaperNode interface is an enumerated value indicating if oversampling must be used. Oversampling is a technique for creating more samples (up-sampling) before applying a distortion effect to the audio signal.
Once applied, the number of samples is reduced to its initial numbers. This leads to better results by avoiding some aliasing, but comes at the expense of a lower precision shaping curve.
The possible oversample values are:
| Value | Effect |
|---|---|
'none' | Do not perform any oversampling. |
'2x' | Double the amount of samples before applying the shaping curve. |
'4x' | Multiply by 4 the amount of samples before applying the shaping curve. |
One of 'none', '2x', or '4x'.
See BaseAudioContext.createWaveShaper() for example code.
| Specification |
|---|
| Web Audio API> # dom-waveshapernode-oversample> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
oversample |
29 | 12 | 26 | 16 | 6 | 29 | 26 | 16 | 6 | 2.0 | 4.4 | 6 |
© 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/WaveShaperNode/oversample