[sdiy] Approximating sine with plain integer math

John Ames commodorejohn at gmail.com
Thu Apr 7 21:15:44 CEST 2016


On 4/7/16, Olivier Gillet <ol.gillet at gmail.com> wrote:
> About the waveshaping approach suggested by John: doesn't it introduce
> aliasing at high frequencies? What happens to the shape of the output if
> the input sawtooth is band-limited?
Well, yeah, it'll alias at high frequencies, same as any other
discrete-time oscillator function will. I admit I'm not an expert at
this stuff, but I don't know of a way to develop such a function that
*won't* start aliasing as you approach the Nyquist frequency, so I
haven't bothered myself about it (after all, there's going to be
filters and suchlike later in the signal chain that can compensate for
this.)

As for bandlimiting the input...I guess I'm not even sure why you'd do
that? The idea is to feed it a full-range ramp waveform in order to
get a sine-ish shape out of it, I can't think of why you'd feed it
anything else other than just as a curiosity.



More information about the Synth-diy mailing list