Gets or sets the current value of this AudioParam. Initially, the value is set to AudioParam.defaultValue. Part of the Web Audio API.

Though value can be set, any modifications happening while there are automation events scheduled—that is, events scheduled using the methods of the AudioParam—are ignored, without raising any exception.


var curValue = audioParam.value;
audioParam.value = newValue;


A floating-point Number indicating the parameter's value. This value will be between the values specified by the minValue and maxValue properties.

The default value of minValue is the minimum negative single-precision floating-point value (-340,282,346,638,528,859,811,704,183,484,516,925,440), and the default value of maxValue is the maximum positive single-precision floating-point value (+340,282,346,638,528,859,811,704,183,484,516,925,440).


This example instantly changes the volume of a GainNode to 40%.

const audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
gainNode.gain.value = 0.4;
//which is identical to:
gainNode.gain.setValueAtTime(0.4, audioCtx.currentTime);


Specification Status Comment
Web Audio API
The definition of 'value' in that specification.
Working Draft  

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support141225 No156
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes18 Yes2615 ? Yes

When changing the gain value of a GainNode, Google Chrome prior to version 64 (January 2018) would perform a smooth interpolation to prevent dezippering. Starting with version 64, the value is changed instantly to bring it in line with the Web Audio spec. See Chrome Platform Status for details.

See also

Document Tags and Contributors

Contributors to this page: Sheppy, Jedipedia, fscholz, chrisdavidmills, erikadoyle
Last updated by: Sheppy,