Goal
Understand fundamentals about waveforms, and some of their special properties.
Wave types
We know that sound waves come from vibrating objects. We also know the sound waves themselves travel away from the vibrating medium isotropically. The particles affected by the wave move back and forth in the same direction or parallel to of the waves propagation. This type of wave is referred to as a
There is another type of wave. If the wave travels in one direction, but the particles oscillate at right angles to the direction the wave is propagating then it is called a
Questions to Consider
- Are the waves we look at in our daw transverse or longitudinal?
- A guitar string is plucked. What kind of wave does it produce?
Hint: There is more than 1 wave.
- Why are sound waves longitudinal?
- A jump rope being swung is what type of wave? Justify your answer.
- Can a transverse wave travel through water? Why? What about air?
(Hint: Imagine a shaking your hand up in down in the air. Is a wave created? What if you held a rope while moving it up and down?)
Seeing Waves
Before we get into the mechanics of a sound wave it can be helpful to see them.
Slinky Waves: Transverse and Longitudinal
Guitar Strings
Harmonics
Sound Waves And Their Sources
Properties of a Wave
Waves have 3 properties:
- Frequency
- Phase
- Amplitude
These 3 properties can completely characterize a sine wave, and many sine waves together can create any sound, so understanding these properties will be extend from sine waves to any sound.
Sine Waves are Every Wave
Frequency & Phase
A
Fast Fourier Transforms
We can clearly see the wave goes up and down, but it is irregular. There are many small movements on it, do we count those? This is not a straight forward task.
We can break the signal down however. By breaking it down we can reach simpler waves to work with. Kind of like breaking down a complex building into floors and rooms. Sometimes we need to think about the entire building, but other times a single floor or a room is what we need to focus on. Likewise the waveform as a whole is useful, but often we need to break it down and it turns out that any sound wave no matter how complex can be broken down into many sine waves that when added together remake the original wave. This is done through the
FFT Explained
All we need to know is that the Fast Fourier Transform takes in a signal in time and gives us back that same signal broken into a lot of sine wave pieces.
Finding the Frequency
Using the FFT we can take a sound like the complex one above and split it into a spectrum. A collection of sine waves that represent the sound. Each sine wave has a different phase, frequency and amplitude and when summed will give us back the original sound. We can alter individual sine waves change the audio so that when we sum it we get a result that may be closer to what we want, such as removing high frequencies.
We can use spectrum to characterize a "frequency" of that crazy sound up above. It can be done using the spectrums distribution (how the frequency and amplitudes are spread out), or it can be done by using prominently featured frequencies. Often the lowest frequency is also the loudest and the higher frequencies are related to it making it the "frequency" of the sound. Before we dive deeper into spectrums we need to get a better grip on sine waves since we now see how important they are!
Questions to Consider
- How might we characterize the frequency of a cymbal crash vs something like a flute? What would be some key differences?
- Given our discussion the difficulty of frequency, how do you think the following differs
from each other:
- Frequency
- Tone
- Pitch
- Note
Period
The
All that matters is that is repeats. A single repitition is the period of the wave. For example a wave may repeat after a certain distance, such as 1ft. So it's period would be 1ft long. In audio a wave may repeat after a certain amount of time, such as 1 second, so 1 second would be the period of the sound wave.
Many sounds are close to periodic, they don't repeat perfectly, but they repeat close enough that they are basically periodic. Waves that are "perfectly periodic" will fulfill this more exact definition of periodic:
Here the signal is some function of
Any continuous periodic wave will have some corresponding shape like the ones we have above. When the radius moves around the graph it will draw out the wave of that particular period. If the line moves faster then that wave will have a higher fundamental frequency and vice versa. If the shape is bigger it will have a larger amplitude and vice versa.
Of these the circle is the special case that yields the sine wave. If we were to run an FFT on each of these waves we would see that the only one that is composed of a single sine wave is the circle, all others would require multiple sine waves to describe them. This makes the circle of key importance.
Angular Frequency
The wave being traced out is done so by a change of angle. Each angle the radius makes with the x-axis corresponds to some point on the wave. As this angle changes, which is what the animation shows, it traces out different positions on the wave. Each position is called a phase. As the phase moves we get a frequency. How quickly the phase moves is referred to as the angular frequency since it comes directly from a change in phase, which is an angle, specifically a phase angle.
There are 2 ways this phase angle can be used that we are interested in, they are sine and cosine. Other ways exist but we only care about these for now. A sine wave uses this phase angle with respect to a change in the Y position. This is what the above animation shows. A cosine wave changes with respect to the X position. Each spot around the circle corresponds to a certain number of degrees. 0°, 90°, 180°, 270°, and finally 360° after which the cycle repeats.
Starting at 0° the arrow points on the x-axis. The phase angle is 0 and the X axis is at the longest it can be and the Y axis is at the shortest it can be.
Since cosine varies with X we have cosine as 1 (we treat the biggest value as 1), and the since the Y axis is 0 sine will have 0. Now if we progress 90° we will the radius point straight up.
Now the X axis is at 0, so cosine gives 0 and the Y axis is at 1 so sine is 1. In this way the phase angle determines sine and cosine at every point around the wave. This is also what we mean by saying cosine and sine differ by a 90° phase shift! If you shift a cosine wave by an angle of 90° you will get the sine value and if you shift a sine value -90° you will get the cosine value!
For this reason we often talk only in sine waves and assume if a cosine wave does occur we will simply shift it by 90° and talk about it as if it were a sine wave.
It should be apparent now that frequency is tied to phase and phase to frequency. They are reflections of each other! Phase is a position on a wave, and frequency is the progression of that position! Frequency is phase over time, like how speed is position over time.
Angular frequency can be given as how "fast" we go around the circle. The circle will have a circumference of
Pizza
If the period is large it will require the circle to be split up more. If the period is small it will require the circle to be split up less. Image the circle as a pizza with each slice representing some number of the 360° the circle is made of. If the period is large more pieces must be made, so it have a lower number of angles "per slice". Where if the period is small it will have less pieces so there will be more angles "per slice".
This checks out with our equation, splitting the circle up by the period gives us a high angular frequency (a high number of angles per amount of period) for small
Questions to consider
Up until now we have dodged units. No seconds, no length. Does angular frequency avoid units?
For sound that has a period
, what type of units would a sound wave have? Hint: In what "way" does the period "exist"?You may know about
. How is angular frequency different than?
Up until now we have dodged units. No seconds, no length, but
In angular frequency the radius moves around the circle at some rate. This rate in seconds determines the number of "angles per second". It could be "degrees per second" or "radians per second". A radian is another unit of angle that measures how many radius's it takes to go around the circle. It takes
We know that a sound signal completes a cycle over some amount of time. This is determined by how long it takes the wave to undergo a compression and rarefaction. So we can take angular frequency and create a specific type of frequency that applies to sound, with angular frequency as our "blueprint" for what frequency "is".
From Angular to Hertz
Consider a sinusoidal (a fancy word for sine wave) sound wave. It will undergo compression and rarefaction and this will complete its cycle, or in other words a single period, the time it takes to go around the circle once . This will tell us about it's angular frequency. Each spot on the graph correlates to a sound pressure during the time the wave took place.
If the sine wave takes a single second to complete a cycle then that means it went around the circle 1 time in that second. Meaning we moved
The Definition of the Pure Period and Pure Frequency
This leads us to the math definition of a period. Consider moving around the circle 10 times before a single rotation is completed. Remember
This would imply the single period is 10 times bigger than it is! We actually took 1/10th the time to complete a single cycle! Not 10 times! So we should actually have:
The bottom of this formal is
Now we have something truly fundamental. A "1" is on the top, this is significant, 1 has the property of unity. If a thing is, it is one of itself. So, by having a 1 on top we are really asking how many of
We can then insert some signal, that in not pure, such as a sound signal into the pure definition, and generate a frequency with that unit!
Generating the Hz
In sound we care about how many cycles in a second. So we plug in our 10 cycles per second signal into our pure definition of frequency. Recall that
Thus we have generated the
Keep in mind we are talking about sine waves here! If a signal cannot be properly characterized by a singular sine wave then other means to talk about the signal will be needed to characterize frequency, and things like phase are talked about in groups rather than singular instances, white noise being one example.
We can also derive the following relation:
Since we now know the frequency is in units of cycles/second we can just use this. See if you can write an interpretation for what the 1 is doing in this equation.
Questions to consider:
The equations we just derived can be used to relate frequency to period. What about wavelength? What does it depend on? What is our equation missing? How might we derive it?
Will such equations work on square waves? Explain. What parts of the process are different and what are the same? Consider the FFT and the picture of the different oscillators with their various shapes.
We have avoided trigonometry which is the branch of math that covers a lot of this stuff. If you're interested in understanding sine and cosine waves more fully and how the circle ties into all this pick up a trig book!
Phase
We have already talked about phase because of frequency but there are a few other things we need to cover when it comes to phase. As a reminder phase is a measure of angle and corresponds to a position on the wave.
The size of the wave we see is determined by the magnitude of a particular axis. A magnitude is a "size" or "quantity".
For sine waves the magnitude is the size of the value of the Y-axis for a particular angle, and cosine uses the X-axis. On the transverse wave it draws out you can imagine it as the vertical distance you must draw to get to the wave.
Combing Waves
To combine two waves you simply add up their magnitudes at each moment in time.
It should be noted that all waves have phase. Not just sine waves. When we add the waves we call it "phasing" or "phase interference".
Constructive Interference
Constructive interference is when two waves summing together have their magnitudes in the same direction making the resulting wave bigger.
Deconstructive Interference
Deconstructive interference is when two waves summing together have their magnitudes in opposite directions making the resulting wave smaller.
The Complicated Middle Ground
When two waves are similar phasing is not hard to think about. If one phase is shifted from another wave then "phasing" is static. The only difference between the two waves is that one is shifted in time from the other. This will cause phase issues but those phase issues don't change. It will give a "hallow phasy" tone. It can be fixed by simply adjusting one in time.
The issues is when two waves are similar but not quite the same. This leads to volume shifts over time. These effects are sometimes desirable and allow for all kinds of special effects, other times it is very unwanted. In fact there is an entire branch of synthesis built around phase! It is called "phase modulation" or PM.
Phasers and flangers rely on phase to do their job. These changes in phase can also be seen as changes in frequency. Since change in phase is frequency these effects are related to frequency.
Questions to consider
In a recording session we record an instrument with more than one mic. What property would be the equivalent of a phase shift?
If you are recording two clarinets and one is just little out of tune with the other one would you be able to fix this with phase manipulation? Explain.
You are in the a DAW and you have a square wave in the left and right. The left channel has a phase shift of 180°. Will this cancel out? What would the result be?
How would panning a signal change phase interference?
What are some ways phasing in headphones is different than phasing over speakers?
How is mono phasing different than stereo phasing?
Ideal Phasing and Acoustic Phasing
There are some important distinctions to make about how signals are combined because this will have a large impact on how the phasing will matter.
Mono
First, in a mono signal we have one signal, but often to get to a mono signal we sum multiple signals. Something like "dual mono" means two individual signals, where one is often meant for the left speaker and one for the right. It is not called stereo because the files are separate, they are singular or "mono".
Summing signals down for mono often happens in devices with only one speaker. Such playback systems must be in mono. You have a few options for such systems. You could give it just the left, just the right, or add the left and the right and give it the result. The norm is to add the left and the right and give it the result.
This has big implications for mixing. If your left and right channels use timing differences to create stereo images and then it gets summed down to mono this can cause phase cancelation that will change the balance of your mix. Say you had a vocal with a delay between the right and left speakers. Over stereo systems we hear the timing difference and this gives us a sense of the position of the singer, but over a mono system we instead hear phase cancelation and it comes across as a tonal shift as "phasy and hallow" instead of as a spacial cue.
In systems with many speakers, if they all get the same signal they are mono. There is still only one signal. If you have 2 speakers but they play the same signal it's still mono! It's really more like a fake mono because each speaker may get its own signal and it may happen to match what the other speaker has. For example, your phono is mono because it has only one speaker so it can only play one signal. A pair of speakers however can each receive a signal. If the signal is the same it will appear as "mono" only because they produce the same signal but its not really "mono" in the strict sense. We often use the term mono to simply mean the same signal is in both speakers, which leads to a perception that the audio is in the middle of the speakers. We will get to our perception of sound in a later lesson.
This "summing signals" is the stage the phasing occurs at. It doesn't occur "in the air" as the particles hit each other, no it occurs before the speaker even plays the sound and by the time the speaker is playing it, it is reproducing a signal that has the phasing baked in. This is a key observation. This is what I refer to as "ideal phasing". It is "idea" because it doesn't change any more after this. This "interference" will be in the signal regardless of the room.
Stereo
Stereo is when we have 2 signals that go together. In general one goes to the left and one goes to the right. In such a system we would have 2 speakers responsible for reproducing the signal. Suppose the two speakers play the same info, so when one speaker moves out the other speaker also moves out. Over headphones this will sound "mono" for the same reasons as before. Over speakers though it may sound different depending on where you are in the room. This is because you may be closer to one speaker than another, or there may be a reflection off a wall that also hits your ear causing you to hear a delayed version of something.
This difference of phase due to your position in a field is what I call "acoustic phasing". It can occur with mono systems, stereo systems, and so on. This is one of the things we consider deeply in acoustics.
Now consider a second case where the speakers produce a wave that is out of phase by 180°. Lets use a sign wave. In the ideal phasing such as in a DAW in a mono situation the wave would cancel out and we would hear nothing. However, in a situation where the left speakers get the phase shifted signal and the right gets the unsifted signal both speakers would push air. As one is pushing out the other pushes in. This leads to an interference pattern in the air. The air particles in some places will constructively interfere and in others they destructively interfere. Were you are in the field will determine what you hear. This "acoustic phasing" sounds especially odd over headphones. Give it a try.
I want to add a small note here that some DAW's panning is not true mono. Say you have two channels with a pan knob. If you turn the pan to the left different DAW's will do different things. Some may turn down the right channel and leave the left alone giving the appearance of panning to the left. Others however will actually not just turn down the right but also add some of the right channel to the left. This will lead to potential phase issues. Make sure you understand how your DAW operates so you can be aware of such trade offs! This is why panning plugins may be useful!
Vectorscopes
A vectorscope is a scope that shows you the phase relationship between two signals. In audio that will be our left and right channels. I will be talking specifically about audio focused ones. This topic can run a bit deep but we will look at the bare minimum. Vectorscopes have two varities in audio, scopes that show you the positive and negative cycles and scopes that show you just the positive. Scopes that show you just the positive side will appear to be missing half the graph.
On these scopes there will be lines that divide the scope up at 45°. One of these lines represents the left channel and one represents the right. If a signal is just left or just right it will appear on only that line. If the signals sum constructively they will appear in the middle of the 45° lines at the top and bottom and if they sum deconstructively the will appear on the left and right middles.
If a sound is mono it is perfect constructive interference everywhere and so will look like a vertical line since the left and right have the same information. If it is perfectly out of phase then it will look like a horizontal line. If your track has a lot going on in the middle 45°'s then your probably going to be ok when summed to mono but if there is more activity on the left and right 45°'s then that could be an issue!
Wavelength and what causes phase shift in acoustics
In acoustics sound happens over time. This is because the event that creates the sound also happens over time and this causes propagation. If a sound wave propagates it must involve two quantities, time and distance. Propagation is the act of a wave moving through a medium over time.
This leads to the notion of a wavelength. A wavelength is a statement about how a wave propagates, specifically how its length varies with its time of travel through a medium.
Example
Consider a longitudinal wave of 1 Hz. Let suppose in one medium it travels at 1 meter/second. This means that 1 Hz will have a wavelength of 1 meter because of the mediums propagation characteristics. Let say there is a denser medium now that this same 1 Hz wave travels through. In this new denser medium it has a propagation of 2 meters/second. So now the wave goes twice as far and its wave length is 2 meters for the same 1 Hz!
Sound tends to travel faster in "denser" mediums and slower in less "dense" ones. Dense is in quotes because the speed of sound, and waves in general, is determined by a lot of other factors than just density, such as the arrangement of atoms in the medium, elasticity, compressibility, and mass density. "Density" used in this sense is pretty general and vague but it is enough for us for now.
Questions to consider
We now have everything we need to create an equation that will give us wavelength. Create one and explain why it works.
The wavelength equation
Wavelength is really just an extension of our definition of frequency, before we knew the frequency and the period. Here the period is really just something more physical now, it is the wavelength. Frequency is still frequency just the same but to put the wavelength where period is we can no longer just keep 1 in the top. The 1 now takes on the specific dimensions of 1 cycle for that specific propagation. What "1" would be for that medium, meaning how far a wavelength of 1 is, is the speed a 1 Hz signal must move to make the distance it would cover in that medium equal to 1. This yields the following:
For our purposes we will use
Now using these definitions we have the following results:
Frequency
Wavelength
Propagation Speed
Unit Analysis
Using units we see this relationship must be true. Frequency has units of 1/time, speed has units of length/time, and wavelength has units of length. Taking any one of these and replacing them with their units reveals an equality. For example lets do the first one:
Math | Reason |
---|---|
| Starting Point |
| Replace with units: |
| Multiply by a form of 1 |
| Simplify |
| Proved |
So we can see the units check out, this type of check is useful to ensure you did the problem correctly. If your units come out to something that makes no sense then that is evidence you made a mistake!
Practice Problems
- Prove the remaining 2 equations using unit analysis.
- Determine the wavelength for a 20Hz tone.
- Determine the wavelength for a 10,000Hz tone.
- Determine the frequency for a 20ft wave.
- Determine the frequency for a 20m wave.
- If a frequency of 60Hz gives a wavelength of 10m what is its propagation speed?
- If a frequency of 60Hz gives a wavelength of 10ft what is its propagation speed?
Source of the phase shift
Fundamentally phase shifts occur when the entire wave gets "pushed" in one direction or another, each phase is "shifted". In sound these shifts occurs as a shift in time. We have just connect propagation to measure of length per time for sound waves. What this means for recording is the length you place a mic from a source will correlate to its phase shift. If it is farther away it will take longer because it must propagate.
So In cases where the multiple mics are used for the same source the distance of those mics from the source will be significant, because the distance of a mic correlates directly with a time shift! It should be noted that here we are assuming an ideal free field, an open room with no reflections and a uniform density. In real life the room will very much play a role!
Questions to consider
You have 2 flute players standing next to each other playing the same part. You have a single mic placed 3 feet from the players. Will phase be a concern? Why?
Now consider we have 2 mics both placed in front of the players. Will phase be a concern? Why?
Now consider we have 2 mics both placed in front of only a single flute player. Will phase be a concern? Why?
Up to now we have assumed an ideal free field. Say we have 2 mics recording a single source. What would be the difference between recording in a free field vs in a room?
Amplitude
Amplitude is how much one signal changes with respect to another signal from a given reference. In sound it is how far from the Y-axis we have moved for a particular value of x.
It is loosely related to how loud a signal is. The reason it isn't directly how "loud" a signal is because of a few reasons:
Loudness is a human perceived phenomenon, making it hard to quantify. (Though we have ways we will get to in later lessons.)
Amplitude itself is pretty tricky once you look at something more complex than a simple wave.
For example, here is the same wave from before:
What is its amplitude? For any specific value of time you could tell me the amplitude by just reading it at that particular instant. This is called instantaneous amplitude. This doesn't tell us about the signal as a whole, just an instant of the signal. To talk about the signal as a whole will require calculus which is beyond what we will get into here. We will approach "loudness" as a topic later but just know that when we say the "amplitude" of a signal we are going to be restricting ourselves to very simple waves in order to avoid these issues.
The form of the sine wave
Where:
- Time.
- Amplitude.
- Phase.
- Phase Shift (Greek Letter Phi).
- Frequency.
- Vertical Shift (DC Offset).
- Angular Frequency (Greek Letter Omega).
Sine Wave Amplitude
You may have noticed in the earlier picture on amplitude that it is just the magnitude from the x-axis, or t-axis if we are dealing with time. It can go up or down. However typically when we refer to amplitude we only care about the highest value of this magnitude. Hence when someone asks for the magnitude of a sine wave they mean just the largest magnitude of the y-axis from the t-axis. Since a sine wave is symmetric we only care about the absolute value of the sine wave so the value of the amplitude is always expressed as a positive value. This is why a single
The peak to peak amplitude is the total amplitude from the negative peak to the positive peak. So if the signal goes from -10 to +10 then the peak to peak amplitude would be 20 because 10+10 is 20.
We will have a lot more to say about amplitude when we cover the dB but this is fine for now. These definitions also typically carry over to simple periodic waves, but as we saw they start to fail us when we try to describe complex waveforms.
Up to this point we have not assigned units to the amplitude. Recall the definition: how much one signal changes with respect to another signal from a given reference. It was left as a general "signal" on purpose. A 0 reference is needed so we can make measurements, in the cause of audio we use the axis's 0 value, but this isn't always the case necessarily.
Example:
For example, the waves we typically look at in sound represent pressure vs time. So the unit of the amplitude in that case would be a unit of pressure, because that is the signal is represents. It makes sense in the case of pressure to use a zero value as steady state and then anything above means particles are getting compressed and anything below means rarefaction is happening.
We have seen the amplitude for these basic waves comes out as a single number in the sine wave equation. Staying with this simple version of amplitude what are the amplitudes and peak to peak amplitudes of the following waves?
1
2
3
4
5
Root Mean Square (RMS) of the Sine Wave
The Root Mean Square or (RMS) is a way of describing the amplitude of the sine wave using an average. This is a better approximation to how we hear loudness, though it still falls short in many ways. The idea is if we average a periodic wave then half of it is positive and half is negative so it will cancel out. Not a useful average because we definitely didn't hear 0! So given the name what do you think we are gonna do to fix this issue?
This topic is one that has a calculus version and a discrete version. The general process is pretty simple and the calculus version allows us to apply it curves with infinity many points. Here I want to just introduce you to the process and then we will work with the results.
First, to deal with an average of 0 we need a way to make every point along the wave positive. We could use absolute values but this comes with some less than idea statistical characteristics. The better option is to square every point along the wave. Say we sampled the wave at 50 points. Then we square each value we sampled. We then sum them up and divide by 50 to get the average value or the mean. Finally we take the square root to undo the squaring we did. This is the root mean square or RMS, the name is literally just the steps we take.
RMS makes a lot of sense but what if we want to take infinity many samples. Well, calculus steps in. If your interested in the topic it is covered in appendix B of Sound and Synth Basics. Just know that using calculus we can obtain specific formulas for specific waves. The wave we are concerned with with the sine wave.
RMS of the sine wave
The sine wave has the RMS equation of multiplying the peak amplitude by
Similarly if we have the RMS of a sine wave we could divide by .707 to get the peak amplitude.
Practice
A wave has a peak value of 100. What is its RMS value?
A wave has a peak value of 50. What is its RMS value?
What is the RMS value of the following wave?
A wave has an RMS value of 45. What is its peak amplitude value?
A wave has an RMS value of 115. What is its peak amplitude value?
Other waves have their own RMS formulas and to do a complex wave we would require methods beyond the scope of this course.
Phase of the Sine Wave
I don't want to dive to far into the Sine function since the math isn't required for this course. We call the "sin" a function. A functions job is to take an input and spit out an output. In this case it takes in a phase and spits out the y-axis magnitude that phase gives.
That phase angle is described by
Notice if we the
Also note that the
We won't talk about "sin" itself what what it "does" with this phase angle but we do need to understand that "sin" is limited to only returning values between -1 and 1. This is because the circle we use has a radius 1! This why the "sin" function is multiplied by the amplitude
Finally there is the
Now you know how that equation works! There is certainly more we could get into but this level of understanding will be fine for the vast majority of what we will be doing. Some final notes, we typically use radians with sine, hence the use of
Questions
Using this knowledge construct the formula for a sine wave with:
A frequency of 20 and an amplitude of 1.
A frequency of 10 and an amplitude of .5 with a phase shift of π/2 radians (90°).
A frequency of 3 and an amplitude of 2 with a phase shift of 3π/2 radians (270°) and a vertical shift of -.5.
Anatomy of a Waveform
At this point you should be able to identify all the following portions and interpret their meaning comfortably:
To support this series please consider donating via
paypalor joining the
patreon.