# Amplitude versus time producing unexpected patterns.

I am writing a program to generate audio frequencies in multi-channel PCM format. This question may be more suited on an audio forum but I would like to know what is going on mathematically.

My understanding is that audio is represented as a sum of multiple fundamental frequencies at various points in time. Each fundamental frequency can be represented as amplitude versus time $amplitude=f(time)$.

I use the following formula to generate each fundamental frequency and plot it visually.

$a[t] = Sine((f*t)+p) * ma$

    where
t = time
f = desired frequency (per second)
p = phase shift (offset for delays, etc.)
ma = maximum amplitude to restrict to (between 0 and 1)


The three images below use the same formula but the last two are not making a uniform sine wave as I would have expected (consider only track 01 in the images). So there is either something wrong with the formula or my understanding of fundamental frequencies in audio.

If my expectation about uniform sine waves if wrong, then Fourier Transforms wouldn't be possible would they?   By the way, in your formulas you lack a factor of $2\pi$ -- you want the argument to the sine to increase by $2\pi$ (one whole circle) each time $t$ increases by $1/f$.