Re: FFT & IFFT with the Web Audio API

On Wed, Jun 19, 2013 at 8:30 AM, Jens Nockert <jens@nockert.se> wrote:

> I think Web Audio is progressing in the wrong direction, and currently
> implementing a lot of high-level APIs when low-level APIs (like the DSP
> API) are what would make audio on the web truly shine.
>
> On 19 Jun 2013, at 10:59, "Marcus Geelnard" <mage@opera.com> wrote:
>
> > Personally (all hats off), I'd like to make draft implementations for
> Blink/WebKit & Firefox (since they're open source, and they have most of
> the necessary code under their hoods these days thanks to Web Audio), but
> unfortunately that's not in line with my current assignments at Opera, and
> I'm not sure what I'd be able to do in my spare time (it's not the lack of
> will, trust me).
>
> I have a bitrotted implementation for Firefox (6-7 era?) and Jussi had
> native code for Node.js that implemented it (
> https://github.com/jussi-kalliokoski/node-dsp). So if you need any help
> with implementing it Marcus, I could spend some time on getting up and
> running on a modern Firefox or help in some other way (asm.js Polyfill or
> something maybe?)
>

I can help answer questions about the Gecko implementation off-list (as
it's out of topic for this mailing list), but *please* note that both
Gecko/Blink prototypes should be hidden behind runtime prefs for now, until
we have a good spec...  :-)


> > Another personal note: With regards to what scope to include it in, the
> closer it is to Web Audio, the easier it would be to agree on a standard
> (e.g. limit support to 32-bit floating point typed arrays, 1D real/complex
> data, etc). In a way it's similar to how one could easily extend the scope
> of the OfflineAudioContext to a generic signal processing framework, but by
> keeping it within the limits of Web Audio, it's actually manageable.
>
> Yes, I think this is critical for many reasons and I would much rather
> have good Javascript nodes with basic plumbing for DSP than a million
> different hard-coded nodes. But we also have to be aware that the same
> primitives that are useful in DSP are useful for things like graphics too.


I don't think that the limitation to 32-bit floating point was a good
design decision in Web Audio, because it basically ignores all of the
devices without FPUs or other mobile devices on which floating point
computations are slow.  It could be that some browser engines don't care
about such devices, but Gecko does.

But please also note that a DSP API has more use cases than just audio
processing.

--
Ehsan
<http://ehsanakhgari.org/>

Received on Wednesday, 19 June 2013 15:29:53 UTC