Re: Oscillator [square] suffer from severe alias

This isn't really the right place for this since this mailing list is about
issues in the spec.
Perhaps public-audio-dev would be better.

Having said that, see comments below.

On Sat, Mar 4, 2017 at 1:27 AM, André Michelle <
> wrote:

> Hi all,
> I am developing a bandlimited oscillator for our synthesiser in
> and could not get it quite right. I tested the
> web-audio-api as a reference and voila: There is alias as well.

Modulating should generate extra harmonics which probably should alias in.
(I'd have to do the analysis in the digital domain to understand what
really happens).

I assume that's not what you're complaining about.

> I downloaded the sources from here to reimplement it in Java to find the
> problem.
> WebCore/Modules/webaudio/OscillatorNode.cpp
> WebCore/Modules/webaudio/PeriodicWave.cpp
> My port produces the exact same amount of alias at the same frequencies.
> The code in "PeriodicWave::waveDataForFundamentalFrequency" obviously
> chooses a table with too much harmonics but I could not find a fix and an
> obvious error. I could however replace the look-up code for a test, that it
> always returns the tables with just a single harmonic (sine-wave) and the
> alias is gone. That means that the wavetable size is big enough and the
> linear interpolation is working well.
> Any thoughts on this?
Are you saying that the interpolation of the frequency ends up using a low
frequency table (with more components) and a higher frequency table (with
fewer components) so that the result has too many frequency components?

Now that you mention it, that does seem like a problem.  Can't think of how
to solve that though.

Received on Monday, 6 March 2017 18:19:29 UTC