Re: Generators

Hello Chris,

 > has any one seen a simple example of generating a sine
 > wave that can be swept using a slider,

This web page has an example of a sine wave oscillator.

< http://www.softsynth.com/webaudio/tone.php>

It maintains a phase variable that is incremented for each sample. The 
frequency can be swept or modulated without glitching by updating the 
phaseIncrement variable.

 > for example, up to high
 > frequencies without aliasing?

You don't have to worry about aliasing when using a sine wave unless you 
are modulating it at audio rates. Aliasing is a big problem with 
sawtooth and square waves because they contain high frequency partials 
that go above the Nyquist rate.

Phil Burk

Received on Tuesday, 13 March 2012 19:07:07 UTC