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

On Wed, May 8, 2013 at 11:54 PM, Chris Rogers <crogers@google.com> wrote:

>
>
>
> On Wed, May 8, 2013 at 8:46 PM, <rbj@audioimagination.com> wrote:
>
>>
>>
>> it seems to me that if the createWaveTable() method is, essentially, an
>> inverse DFT.  is it anything else?
>>
> That's the basic idea, but then this time-domain version has to be sampled
> at many different rates, so we want to avoid aliasing.  In WebKit (Blink is
> the same) we use a multi-table approach (similar to mipmaps for graphics)
> where each table uses an inverse DFT, culling out an appropriate number of
> aliasing harmonics.  Then when we render the waveform, we select which two
> adjacent tables to use, interpolate between those two, and then use linear
> interpolation...
>
> https://svn.webkit.org/repository/webkit/trunk/Source/WebCore/Modules/webaudio/WaveTable.cpp
>
> https://svn.webkit.org/repository/webkit/trunk/Source/WebCore/Modules/webaudio/OscillatorNode.cpp
>
> We have tests where we load up a WaveTable and use it with an
> OscillatorNode, sweeping the frequency from very low to high (something
> like 10Hz -> 20KHz), checking that the aliasing isn't too bad...
>

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


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

Received on Thursday, 9 May 2013 14:28:00 UTC