Re: [Bug 21980] New: WaveTable is highly underspecified

On May 9, 2013, at 10:26 AM, Ehsan Akhgari <ehsan.akhgari@gmail.com> wrote:

> That is my point.  :-)  It should be possible to implement WaveTable (and OscillatorNode) without linking to the WebKit implementation!

Just as another data point (I'm a web developer with some background in DSP, not connected to apple, google, or mozilla), the specification of wavetables mostly makes sense to me.  It specifically says it's for "harmonic content", which to me clearly indicates that each element of the array will represent one harmonic in the harmonic series.  I haven't read any of the implementation code but I'd feel fairly confident that I'd be able to implement it myself.

The only part that seems at all unclear is listing the imaginary array as "an array of sine terms".  Traditionally the real and imaginary parts together represent the magnitude and phase of the complex wave at that bin, and angles traditionally move up as time moves forward, which would make the imaginary array an array of *negative* sine coefficients, if you have to give it a real interpretation.  A user just reading the spec may be surprised to find that putting a coefficient of 1 on the first sine term will produce an output pi radians phase shifted from what she or he had expected.  This is a minor point.

Thanks,
-Russell

Received on Thursday, 9 May 2013 19:13:22 UTC