Search code examples
htmlgoogle-chromeaudiochromiumweb-audio-api

Generating a tone using pure javascript with Chromium WebAudio API


How can I generate a tone (pure sine wave, for instance) using only javascript and Chromium's WebAudio API?

I would like to accomplish something like the Firefox equivalent.

The Chromium WebAudio demos here appear to all use prerecorded <audio> elements.

Thanks!


Solution

  • Probably not these best way, but I used dsp.js to generate different types of sinusoids, then passed them off to the Web Audio API in this demo: http://www.htmlfivewow.com/demos/waveform-generator/index.html