Appendix A. Deprecation Notes

The Web Audio API is still evolving, and some methods are being added, removed, and renamed. This section describes some of the recent changes made to the API:

  • AudioBufferSourceNode.noteOn() has been changed to start().

  • AudioBufferSourceNode.noteGrainOn() has been changed to start().

  • AudioBufferSourceNode.noteOff() has been changed to stop().

  • AudioContext.createGainNode() has been changed to createGain().

  • AudioContext.createDelayNode() has been changed to createDelay().

  • AudioContext.createJavaScriptNode() has been changed to createScriptProcessor().

  • OscillatorNode.noteOn() has been changed to start().

  • OscillatorNode.noteOff() has been changed to stop().

  • AudioParam.setTargetValueAtTime() has been changed to setTargetAtTime().

In addition to these changes, many of the constants in the Web Audio API are changing from variables into string enumerations. For example, filter types are going from filter.LOWPASS to lowpass, oscillator types are going from osc.SINE to sine, etc.

Throughout the book, I’ve used new versions of all of the APIs, so those using older implementations of the API may need to revert back to earlier methods and constant naming.

For the most up-to-date information regarding naming changes, see the Web Audio specification.

Get Web Audio API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.