tags: dsp synthesis

Sine Generator

A sine generator is an [oscillator] that creates a [sine wave].

Analog

Given a frequency and amplitude, the general (analog, continuous) formula for a sine wave is

$$ s(t) = A sin (2 \pi ft + \phi) $$

Digital

A digital sine wave is given by the following formula:

$$ s[n] = A sin (2 \pi f n / f_s) $$

In most digital scenarios, such as calculators and computers, any sin() function is computed using the Taylor expansion of the sine function:

$$ sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} $$

However, this computation is generally expensive, especially in the context of [digital audio] where thousands of samples are computed a second.

Sources