Search completed in 1.00 seconds.
3 results for "setWaveTable":
Migrating from webkitAudioContext - Web APIs
WebAPIWeb Audio APIMigrating from webkitAudioContext
old code using webkitaudiocontext can be ported to standards based audiocontext like below: // old webkitaudiocontext code: var osc = context.createoscillator(); osc.type = osc.sine; // sine waveform osc.type = osc.square; // square waveform osc.type = osc.sawtooth; // sawtooth waveform osc.type = osc.triangle; // triangle waveform osc.setwavetable(table); var iscustom = (osc.type == osc.custom); // iscustom will be true // new standard audiocontext code: var osc = context.createoscillator(); osc.type = "sine"; // sine waveform osc.type = "square"; // square waveform osc.type = "sawtooth"; // sawtooth waveform osc.type = "triangle"; // triangle waveform osc.setperiodicwave(table); // note: setwavetable has been renamed to se...
... here is how you can port old code using wavetable to the standard audiocontext api: // old webkitaudiocontext code: var osc = context.createoscillator(); var table = context.createwavetable(realarray, imaginaryarray); osc.setwavetable(table); // new standard audiocontext code: var osc = context.createoscillator(); var table = context.createperiodicwave(realarray, imaginaryarray); osc.setperiodicwave(table); removal of some of the audioparam read-only attributes the following read-only attributes have been removed from audioparam: name, units, minvalue, and maxvalue.
OscillatorNode.setPeriodicWave() - Web APIs
WebAPIOscillatorNodesetPeriodicWave
this replaces the now-obsolete oscillatornode.setwavetable().
OscillatorNode - Web APIs
WebAPIOscillatorNode
this replaces the now-obsolete oscillatornode.setwavetable() method.