Created
August 7, 2016 12:11
-
-
Save LewisGet/832b69cf6ff54924a8cd551ae98f4c74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var real = new Float32Array(2); | |
var imag = new Float32Array(2); | |
var ac = new AudioContext(); | |
var osc = ac.createOscillator(); | |
real[0] = 0; | |
imag[0] = 0; | |
real[1] = 1; | |
imag[1] = 0; | |
var wave = ac.createPeriodicWave(real, imag, {disableNormalization: true}); | |
osc.setPeriodicWave(wave); | |
osc.connect(ac.destination); | |
osc.start(); | |
osc.stop(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment