[sdiy] Approximating sine with plain integer math

rsdio at audiobanshee.com rsdio at audiobanshee.com
Thu Apr 7 09:03:49 CEST 2016

On Apr 6, 2016, at 10:58 PM, Donald Tillman <don at till.com> wrote:
> On Apr 6, 2016, at 10:13 PM, rsdio at audiobanshee.com wrote:
>> The obvious wave shapes such as square (odd harmonics weighted 1/N) and ramp/sawtooth (all harmonics weighted 1/N) were easily obtained. However, I couldn't create triangle (odd harmonics weighted 1/(N*N)) until I guessed that every other harmonic needed to be inverted in polarity (I don't like to call polarity inversion "phase shift" because it's not the same as a variable filter phase delay).
> This is off the original topic, but what the heck...
> Triangle odd harmonics are not inverted... if they're cosine harmonics.  Your polarity inversions are mimicking the cosine harmonics with sine harmonics.

Thanks! I'll have to add a button to my Waves.app to use cos() instead of sin().

Of course, after reading your article, there are tons of variations I could add to my app.


More information about the Synth-diy mailing list