OscillatorNode
OscillatorNode is an interface within the Web Audio API that represents a periodic waveform generator. It is a type of AudioNode, which are the building blocks of the Web Audio graph. An OscillatorNode can produce a sound wave of a specified frequency, shape, and gain. It is commonly used to create basic tones, melodies, and sound effects in web applications.
The OscillatorNode has several key properties that can be set to control its output. The type property
To use an OscillatorNode, it is first created using the AudioContext's `createOscillator()` method. It is then