In the last video we had discussed an equation for a sine wave which repeated every second.
Before we go ahead describe an equation for a more generic waveform, we’ll build up
to it by looking at the properties of this wave, what makes this waveform distinctly
unique.
Firstly we have the amplitude.
It's the maximum height a wave can take, measured from the x axis.
Ofcourse, a wave can be shifted and unbalanced in the real world, and in this case, we measure
the amplitude from the waves natural resting position or by taking an average of the values
of the wave.
The wave equation can be multiplied with any scalar value to scale up or scale down the
amplitude of the wave.
Let’s call it A. In audio, the loudness of an audio signal is determined by the amplitude
of the wave.
We’ll talk about exactly what loudness is, in another module, but thinking about it holistically,
as we decrease the amplitude, we reduce the loudness of the wave, till it becomes almost
inaudible.
In digital systems, we cap how much amplitude a wave can take on.
The digital maximum is one and the digital minimum is negative 1.
What happens if you boost your amplitude higher than that?
In digital systems, and I stress, that it’s only in digital systems like in computers
and digital audio hardware that this happens, the signal gets constrained to 1, we get all
sorts of nasty artifacts when the signal is played back.
We call this digital distortion or clipping, and as audio engineers we strive to keep the
audio signal well below this threshold and give enough headroom, so to speak.
The next property we can talk about is the cycle.
A cycle is the section of the waveform, stretching from when the signal starts to when it reaches
back back to its initial value.
It’s the same as the section between two consecutive peaks or crests which are the
high points of the wave, or the section between two consecutive valleys or troughs which are
the low points, but it’s all the same, just different ways of looking at it.
A lot of interesting properties are associated with a cycle of the waveform, like the wavelength,
represented by the greek alphabet lambda, which is a measure of the length of the cycle,
usually measured in meters.
Just by looking at the sine graph, the wavelength is not directly visible.
But what is measurable is the time taken to finish a full cycle, which is called the Time
period or just the period denoted as T. Here, each cycle takes 0.1 second to complete, which
is a small number, but in the real world, values of time period are much much smaller
than this, so another way of looking at it is the frequency.
Instead of asking how much time it takes for a cycle to complete, we can ask instead, how
many cycles are completed in one second.
The answer to this is just the reciprocal of the Time period.
In this case, it’s 10, 10 cycles are repeated every second.
It’s frequency is 10 Hz, which is the standard unit of measure for frequency, named after
Heinrich Hertz.
So this is what a 10Hz wave sounds like, listen closely.
Did you hear it?
Whales probably did, but not humans.
Our ears aren’t tuned to pick up frequencies that low.
So lets boost it up a little, by a factor of 10.
This is a hundred Hz, all the way up to 400Hz.
Our ears can pick up frequencies in the range of 20Hz to 20000Hz, or 20Khz, but the boundaries
are quite fuzzy, and dependent on person to person and on age and a lot of other factors.
What you just heard is a change in pitch.
Pitch is a particularly hard term to define and I’ll try to do it, along with loudness
in another module, but generally, it's a perceptual property of audio, given meaning and recognition
by our brain to differentiate between different frequencies.
Higher the frequency, the higher the perception of pitch.
How do we represent pitch in our wave equation?
Simple, we just add a multiplication factor of frequency inside the sin function.
For the same duration of time, we have f multiples of the sine wave.
Great, as a bonus we can finally talk about wavelength, although we never use it in the
perspective of audio.
But it’s good to have in your scientific tool belt.
Recalling elementary physics of 1 dimension motion, the speed of a body is given by the
distance it covers over the time taken to cover it.
Let’s apply it to the realm of audio and consider the sound wave as the body.
The time taken for a single cycle T is 0.01 seconds and the speed of sound in air is well
established to be 343 m/s.
So we get the wavelength of a 100hz wave to be approximately 3.4m.
And we have the final property I’d like to discuss, which is phase.
In the previous video I mentioned that the sine and cos waves are quite similar to each
other, except for the fact that they were offset from each other.
How do we quantify this?
We can see that if we let the sine wave play out its natural course of action, at pi over
2 radian, we arrive at the position where the cos wave would start.
We can say that the sin wave is trailing behind the cos wave by pi over 2 radian.
In other words, the phase offset of the cos wave is positive pi over 2 radian, since phase
is measured with respect to the starting point of a sine wave.
Push the wave back by pi radian, and we can say that this wave has a phase offset of negative
pi radian.
We represent this shift by adding a phase value into our sinusoidal equation.
The phase is represented by the greek letter phi and is measured in radians.
Let's see what the real world effects are.
Here’s a sine wave with a frequency of 400Hz played back.
Now, here’s the exact same wave, with a phase offset of positive pi over 2 radian.
Now, here’s one with a phase offset of negative pi radian.
Did you notice the difference?
Well there isn’t one.
Phase is a difficult concept to wrap your mind around.
On their own, these waveforms sound absolutely the same.
Phase only comes into effect, when 2 or more waves interact with each other.
Here’s a playback of 2 sine waves, exactly the same, with the same amplitude frequency
and phase.
Well you can hear that the combined waves compliment each other and the volume increases.
The waves are said to be constructively interfering with each other.
Now, let's change the phase offset of one of the waves to be close to pi radian, and
not exactly pi radian.
We hear the reduction in volume, and the waves are said to be destructively interfering with
each other.
When the phase offset is exactly PI radian, there is total cancellation of the wave.
Phase issues are hard to spot for a sound engineer, especially when recording the same
source from 2 or more mics, which are positioned at slightly different distances from the source.
Examples can be multitrack drum records, stereo acoustic guitar records, where the problems
wouldn’t be noticeable if they are separated in their own stereo space, but can bite you
if they are mixed into a mono track.
We’ll definitely be looking at the science behind phasing and how waves interact with
each in another module.
But we’ll also be looking at the programming aspect of phase where you can take advantage
of this property of interference and control it to get creative sounds through phasing.
So just to recap the properties of the sinusoid, we have the amplitude A, which controls the
volume and loudness of the audio signal, we have 3 properties namely frequency, time period
and wavelength, which can be interchangeably used, which controls the pitch of the audio
signal.
We’ll use frequency because it makes the most contextual sense.
And we have the phase phi, which controls how different sinusoids interact with each
other.
If you are itching to create your own custom waveform based on the equation, head on over
to the link in the description below, where I’ve plugged in the wave equation and created
sliders for the all the properties you can change, and you can play around to see how
the wave equation behaves for different inputs, and you even mess with the equation itself
to see what effects it has.
Here’s another resource you can have endless fun with, a sine wave generator, also provided
in the link below.
You can play sine waves at different frequencies, you can change the general shape of the waveform,
you can make rd2d sounds, if that’s your thing, and you can also test your threshold
of hearing to see where yours lie.
I can just about make out sounds at 18,500Hz, and no more than that.
Be careful with this one, and keep the volume low, cos it will freak your dog out.
In the next video, which is the final video of the module on the Origins of sine waves,
we’ll look at sinusoids more holistically.
We’ll try to decouple our understanding of sinusoids based on the mathematics of triangles
and rotating unit circles, which is pure applied mathematics, and talk instead about why sinusoidal
motion is so ingrained in nature, and what causes these waves to exist in the first place.