Search code examples
javascriptaudiotone.js

Can HTML5 Web Audio be as high quality as a DAW?


This question is mainly geared towards audio engineers.

I was looking at a few videos here and here concerning the Web Audio API in javascript and how people are using it to make music. I was wondering can this API be used to create sound quality on the level of existing Digital Audio Workstations (DAWs) like Ableton, FL Studio, Reason, Logic, etc.

Or is there some kind of inherent limitation to the browser? I think VSTs cannot be used by Web Audio API, but regardless of VSTs is there something that an audio engine used by DAWs can do that Web Audio cannot do in terms of quality? Or can the sound be just as good. I believe that samples can be played just as effectively (?), but maybe the synthesis would be limited?


Solution

  • Can HTML5 Web Audio be as high quality as a DAW?

    Yes! Browsers use a high quality audio engine, with floating point samples all the way through.

    Additionally, the API itself is one of the most straightforward to use and is quite extensible. It also supports very specific timing of control.

    I think VSTs cannot be used by Web Audio API

    That is correct.

    but maybe the synthesis would be limited?

    There are no real fundamental limitations. If you can code it, you can do it.

    Now, there are a couple things you didn't ask about but still should know about. The first is an issue of latency. Browsers don't use ASIO or anything like that, so if you're using the Web Audio API to process and return low latency audio, you're going to have a bad time. In Chrome, you can improve this by letting Chrome open the audio device in exclusive mode.

    Another issue is input/output channel count. This typically maxes out at 8 channels. Internally though, you can do pretty much whatever you want. The limitation is from the browser, not the Web Audio API itself.