Understanding Waveforms

I work as a sound designer, so I know a lot about waves! In this Blog I hope to help you understand how wave functions work and even how you can combine them together. To help with this I have created a desmos graph that you can follow along to, you can find it here:

https://www.desmos.com/calculator/vzctqbuk8u

If you haven't used desmos before I recommend you check it out, it has sliders you can play with to help you understand what each part of the equation is doing. You might notice that my equations look a little funny, I modified them a bit to make it easier for you to use, I'll explain how to use it at the end of this blog. First let's look at the most basic of waves the sine wave.

The waves we will be looking at today look like this: https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Waveforms.svg/780px-Waveforms.svg.png

The equation that defines a sine wave is:

y(t)=A*sin((2*?/p)t+\varphi)

Let's break this down:

t = Time, this is because we mostly use these functions in the context of amplitude over time. When put on a graph (like my desmos graph) this becomes the x axis.

A = Amplitude, this is how far up and down the y axis the wave will go, if this wave was coming out of a speaker this would be how loud the sound was.

= Period, this is how many seconds the wave takes to complete a cycle or in other words repeat itself once. So a wave with a period of 2 would take 2 seconds to complete once cycle.

* Sometimes this part of the equation is written like this 2?f where f = Frequency, this is the opposite way of thinking about it. Instead of how many seconds the wave takes to complete a cycle, frequency is how many cycles are completed in a second. both ways of writing this part of the equation are summarized by the symbol ?  which stands for angular frequency. Whatever result you get from calculating this part of the equation is your angular frequency of the wave or ?.

\varphi = Phase, this is basically where the wave starts when t = 0. By changing \varphi you can move the wave to the left and right along the x axis.

The other equations are a little more complicated but use the same terms.

The equation that defines a square wave is:

y(t) = A*csc(2*?/p)t+\varphi)*abs(sin(2*?/p)t+\varphi))

If you have never seen the terms csc and abs it's OK I'll explain them here:

csc = cosecant, it's just the reciprocal of the sine function. So in mathematical terms: csc(a) = (sin(a))-1. If your calculator doesn't have a csc option another way of writing the square wave function would be: 

y(t) = A*(sin(2*?/p)t+\varphi))-1*abs(sin(2*?/p)t+\varphi))

abs = absolute, it just means whatever the result of this calculation make it a positive number. So in mathematical terms: abs(-2) = 2

The equation that defines a triangle wave is:

y(t) = (2*a/?)*arcsin(sin(2*?/p)t+\varphi))

arcsin = arcsine, this is the inverse of the sine function. So in mathematical terms arcsin(a) = sin-1(a). Your calculator should have the sin-1 function, but if it doesn't just write:

y(t) = (2*a/?)*sin^-1(sin(2*?/p)t+\varphi))

Finally the equation that defines a Sawtooth wave is:

y(t) = -(2*a/?)*arctan(cot((t*?/p)+\varphi))

arctan = arctangent, this is the inverse of the tangent function. So like with arcsine in mathematical terms arctan(a) = tan-1(a). Your calculator should have the tan-1 function, but if it doesn't just write:

y(t) = -(2*a/?)*tan^-1(cot((t*?/p)+\varphi))

cot = cotangent, it's just the reciprocal of the tangent function. So in mathematical terms: cot(a) = (tan(a))-1. If your calculator doesn't have a csc option another way of writing the square wave function would be: 

y(t) = -(2*a/?)*arctan((tan((t*?/p)+\varphi))-1)

OK confused yet? Don't worry play with desmos a bit and you'll see how this all works together, in my desmos graph you can add these waveforms together to make any waveform you want! Basically I defined 4 waves:

Si = Sine wave

t = Triangle wave

Sq = Square wave

Sw = Sawtooth wave

and added them all together y(x) = Si + t + Sq + Sw

I changed the equations a bit to make it easier to use, for example there is only one A variable (slider at #8 lowercase "a" in desmos) that controls the amplitude of all the waves. Also I added an "I" variable to the sawtooth wave so you could invert the slope of that waveform.

Because of some of the limitations in desmos I had to change some of the variable symbols for example instead of t for time I had to use x for x axis (desmos wouldn't understand that t = x axis). There was no \varphi symbol so I used the variable c instead.

Each of the waves have their own individual amplitude period and phase sliders indicated by the subscript of the variable. For example:

asi = the amplitude of the sine wave

psi = The Period of the sine wave

csi = The phase of the sine wave

The same system is used for the other three waveforms.

Have fun and let me know if you have any questions.

  • Posted By Sam
  • #math10academic #math11university #math12university-advancedfunctions #math12university-calculusandvectors #physics11 #physics12-university