Audio Programming: The Sine Wave!

Gerald Clark
2 min readJan 19, 2024

--

As I’m sure you’re aware, there are many different types of waves: square waves, triangle waves, saw, pulse, etc etc..

In the 1800s a scientist named Joseph Fourier basically said that any periodic wave form can be broken down into a summation of sine waves. So any sound can be broken down into a series of sine waves happening at the same time at different frequencies, phases, amplitudes, etc etc.

The sine wave is the only wave form that has 1 single fundamental frequency.

So to demonstrate:

Here is what my spectrum analyzer looks like when I simply play a single sine wave. As you can see, there is a single peak. There arent any other harmonics other than that peak.

If I were to play a saw wave:

You can see lots of different peaks representing the harmonics of the fundamental frequency.

So basically, what this means is that a saw wave is just a summation of sine waves happening at different frequencies and amplitudes.

Another thing that Fourier came up with is something called the Fourier Transform. This means we can take a sound that is happening in time, and then mathematically calculate it back and find out the different sine waves and their properties that are actually happening at that instant in time.

So we can technically break down a complex signal into its individual components. Lets take a musical chord for example. The Fourier Transform can be used to determine the constituent pitches in the chord by analyzing the intensities of its frequency components.

That topic gets…. insane… and I’m not gonna lie… I’m not totally familiar with the math involved, but one of these days I’ll dig a bit deeper into that. :)

The sine wave is very important though. They are used in many fields, including physics, engineering, and mathematics. They’re used to describe lots of things outside the realm of sound: light waves, water waves, etc.

--

--

Gerald Clark
Gerald Clark

Written by Gerald Clark

Father Game Developer Music Composer Sound Designer

No responses yet