The Base class for all nodes that have an AudioContext.
The number of seconds of 1 processing block (128 samples)
Set this debug flag to log all events that happen in this class.
Indicates if the instance was disposed. 'Disposing' an instance means that all of the Web Audio nodes that were created for the instance are disconnected and freed for garbage collection.
The duration in seconds of one sample.
The version number semver
disconnect and dispose.
Get the object's attributes.
osc.get();
//returns {"type" : "sine", "frequency" : 440, ...etc}
Returns all of the default options belonging to the class.
Return the current time of the Context clock without any lookAhead.
Return the current time of the Context clock plus the lookAhead.
Set the parameters at once. Either pass in an object mapping parameters to values, or to set a single parameter, by passing in a string and value. The last argument is an optional ramp time which will ramp any signal values to their destination value over the duration of the rampTime.
//set values using an object
filter.set({
"frequency" : 300,
"type" : "highpass"
});
Convert the class to a string
const osc = new Oscillator()
osc.toString() // "Oscillator"