var ctx = new AudioContext(); var osc = ctx.createOscillator(); osc.type = "square"; osc.connect(ctx.destination); osc.start(0);