Re: Questioning the current direction of the Web Audio API

On Oct 19, 2013, at 12:02 PM, s p <> wrote:
> And no matter if there is more nodes in the futures, there is just no way all the basic building blocks for all the algorithms humans can ever conceive can be provided as AudioNodes (and that sucks. Because on basically every other plateform, there is no limitation).

Of course AudioNodes can't be provided for everything. That is why extensibility is important, and ScriptProcessorNode is at present the vehicle for doing so.

> Second, if you understand that professionals need things that can't be built with basic AudioNodes, you understand that ScriptProcessorNode will be more than just an escape valve.

"Escape valve" was an understatement on my part. I completely agree that ScriptProcessorNode is essential to any professional, wide-ranging use of the API.

> Now the big problem with that is : you will need to instantiate multiple ScriptProcessorNodes in your graph, connect them with native AudioNodes, and because of the sum of the overheads of using ScriptProcessorNodes, you will end-up in a situation where it is actually more performant to just put the whole dsp function into ONE single ScriptProcessorNode, re-implementing oscillators, convolutions, and the whole thing ... making native AudioNodes useless. That's what I mean by "this architecture is impossible to extend".

I don't think your analysis is correct about ScriptProcessorNodes *for all time*. To the extent that it is a problem today, it's partly because present-day implementations are running the JS in these nodes in the main thread. This can impose inter-thread communication overhead that is highly implementation-dependent. To address this issue does not (to my mind) mean changing the entire direction of the Web Audio API. It means the overhead of ScriptProcessorNodes -- or whatever succeeds them in later API versions -- must be minimized through various means.

The WG has received similar feedback regarding ScriptProcessorNodes from other parties as well including internal W3C reviewers. These reviewers have not concluded that AudioNodes are "useless"; rather, they have requested that Web Audio address its present shortcomings and made some positive proposals on how to do so.


.            .       .    .  . ...Joe

Joe Berkovitz

Noteflight LLC
Boston, Mass.
phone: +1 978 314 6271
"Your music, everywhere"

Received on Saturday, 19 October 2013 16:47:49 UTC