we hear sound because our ears can
detect vibrations in the air which come
from sources like everyday objects
speakers and other people talking
these vibrations travel through the air
as areas with higher pressure known as
compressions and areas with lower
pressure known as rare factions bounce
back and forth carrying this
longitudinal wave forward if we graph
the air pressure across the space that
the sound is traveling through we can
see the wave shape of the sound this is
inspecto and this video will be all
about sound frequencies wave shapes and
the math behind it all
you probably know that a sound's pitch
is dependent on the frequency of its
sound wave frequency and pitch hold an
exponential relationship meaning that a
difference of a certain number of hertz
for example a 200 hertz difference from
200 to 400 hertz
and from 400 to 600 hertz
[Music]
will not result in the same perceived
difference in pitch
rather the same ratio between different
frequencies for example a 1 to 2 ratio
from 200 to 400 hertz
and then from 400 to 800 hertz
[Music]
is what will result in the same
perceived difference in pitch
how does this tie into music and its
familiar 12 note scale
two notes that are one octave apart are
named the same and kind of sound like
they are the same note
but one is higher pitch and one is lower
this important gap of the octave is
precisely a double in frequency
all other note intervals are derived
from this if each semitone is 1 12 of an
octave the ratio of a semitone would be
the 12th root of 2
or 2 to the power of 1 12.
this way to increase a frequency by one
semitone it can simply be multiplied by
2 to the 1 12
increasing that frequency by 12
semitones or an octave it would be
multiplied 12 times which is 2 to the 1
12 to the power of 12
in other words 2 to the power of 12 over
12 which is just multiplying it by 2.
combinations of two notes at certain
intervals can sound consonant which
means they sound like they agree with
each other when the two frequencies have
a simple whole number ratio
for example the octave has a ratio of
one to two really simple ratio other
than the octave the most consonant
interval is arguably the perfect fifth
which is seven semitones
[Music]
let's see what 2 to the power of 7 over
12 is
it is approximately 1.498 which is quite
close to 1.5 1 to 1.5 simplifies to 2 to
3 another really simple ratio
the reason a simple whole number ratio
sounds so consonant probably has to do
with the period of the resulting wave
when the two waves are added together
with a one to two ratio the resulting
waves period is one times the lower
frequency wave and two times the higher
frequency wave
with a two to three ratio the resulting
period is two times the lower frequency
wave and three times the higher
frequency wave
these simple ratios make it easy for our
brains to notice a regular pattern when
the two notes are added together
now let's hear what a dissonant interval
sounds like one where the notes sound
like they disagree with each other
the most dissonant interval is arguably
the tritone
which is six semitones two to the power
of 6 over 12 or one half is just square
root of 2 equal to about 1.4142
this results in an irrational ratio
which isn't close to any simple ratio
resulting in a very irregular pattern
when the waves of notes one tritone
apart are added together
a chord consists of three or more notes
the most consonant chord is arguably the
basic major triad
which is just a root a perfect fifth and
a major third added in the middle
four semitones above the root
two to the power of 4 over 12 is about
1.26 which is close to one and a quarter
this results in once again quite a
simple ratio of four to five
however to see that dissonant intervals
also have the roles we can look at jazz
chords such as the dominant seventh
chord
and diminished seventh chord
which both have dissonance intervals in
them both sound nice
sinusoidal waves are the simplest waves
that us humans can hear
we perceive them to be only one
frequency
now the fourier theorem states that
periodic functions that are reasonably
continuous can often be expressed as the
sum of different sinusoidal functions
for sound this means that the sounds we
hear can be broken down into a
combination of many simple sinusoidal
waves each with their respective
frequencies
this information is very important to
understanding the sounds produced by
musical instruments or when synthesizing
our own musical sounds
the ratios of intervals within the 12
note scale range from 1 to 2
in 2 to the 1 12 geometric intervals
but if we look at frequencies that are
integer multiples of the fundamental
frequency like two times three times
four times five times etcetera
those form a whole another system known
as the harmonic series
the significance of the harmonic series
is that adding on these harmonics
doesn't change the period of the
fundamental as a result the combined
sound sounds tonal it's very clear what
pitch or note the sound is
it's just a pitch of the fundamental
frequency
on the flip side of this when a sound
contains frequencies that are not in the
harmonic series of its fundamental
frequency
known as inharmonic frequencies it
sounds more atonal in other words it's
harder to tell its pitch or note
comparing the frequencies of a piano to
a drum
[Music]
we can see that the tonal instrument
does have more harmonic frequencies
in fact we can theoretically recreate a
musical instrument digitally if we use a
synthesizer to match all its frequencies
including its fundamental harmonic and
inharmonic frequencies there are of
course other factors to match as well
but those are the most important
[Music]
the science of sound waves also applies
to the world of sound design which is
the artificial creation of instruments
and sound effects such as in electronic
music
sound design is all about the
combination and manipulation of wave
shapes which come in four basic forms
the sine wave
triangle wave
square wave
and saw wave
[Music]
the way that these waves each sound can
be explained by how they can be broken
down into simpler sinusoidal waves each
with their own frequency
first of all the sine wave sounds the
simplest as it only represents one
frequency however here's an equation
that represents an infinite sum of waves
since it's a wave it's a function of
time with t being the time and f being
the fundamental frequency the sigma
means that many copies of this
expression are being added up with
increasing values of k
this scales up the input of the sine
function increasing the frequency of
successive waves
but scales down the output of the sine
function decreasing the amplitude of
successive waves
this specific equation is for the square
wave as you can see the expression uses
2k minus 1 instead of k which gives all
the odd integers this means that all the
odd harmonics are present in a square
wave in addition to the fundamental
which is why it sounds so full compared
to the sine wave
starting as one sine wave and adding
more and more sine waves following this
equation we can see that the sum does
approach the shape of a square wave
the triangle wave can be made by also
adding up the odd harmonics but this
time making every second one
that is the first
fifth
ninth etc negative
and the denominator is squared making
the successive harmonics decrease in
amplitude much faster
that's why if we look at an analyzer the
harmonics of a triangle wave are not as
rich as those of a square wave and you
can hear it too here's a triangle wave
and here's a square wave
the saw wave can be made by adding up
all the harmonics not just the odd ones
and making every second one negative
having all harmonics is what makes the
saw wave the richest sounding wave out
of all the basic wave shapes
and that's why it is often used for
elements in electronic music that need
to have a big rich sound
this could be a supersaw
which is used to voice thick cords
a pad which is used to fill up the
atmosphere
or even a saw base which can be used for
an aggressive low end
altogether they sound like this
the other waves of course also have
their place
for example a square wave could be used
to make 8-bit chiptune sounds
[Music]
a triangle wave could also be used to
make some unique lead sounds
and lastly a distorted sine wave can be
used to make an 808
[Music]
so that was some of the basic math
behind music and sound synthesis
which hopefully can now give you a fresh
perspective when encountering music and
instruments hope you enjoyed the video
until next time
[Music]
you