# Presentation: 748946

## AcousticSignal  Processing

**Explorers Computer Technology Post 631**
**April 3, 2008**
**by  Don  Braun**
**(last modified on 4/14/2008)**

**Acoustic****Signal  Processing**

**Notes:**
Title:   This lesson will involve learning about acoustic signals and how computers can record, playback, and manipulate them.
“Acoustic” signals (from the Greek word for something audible) are otherwise known as “sound” (from the Latin word for hearing).

## Goals of this lesson

**What is sound?**

- A sound is the _compression and expansion of a medium_ such as a gas, a liquid, or a solid, that propagates (that is, travels) through that medium.
- The medium is the substance or material that carries the _sound wave_.

- Use the free audio editor and recorder program “Audacity”  (downloaded from  http://audacity.sourceforge.net)  to experiment with sound.
- Understand basic concepts and terminology of acoustics.
- Learn or review a little math and use it to describe sound.

**Goals of this lesson**

**Download this PowerPoint presentation & notes from Web**

- http://explorersposts.grc.nasa.gov/post631/2007-2008/

## How fast does sound travel?

-      741 mph     1,087 feet /s       331 m/s   in dry air at sea level at 32°F;
-      770 mph     1,130 feet /s       344 m/s   in dry air at sea level at 70°F;
-   3,349 mph     4,911 feet /s    1,497 m/s   in pure water at 77°F;
- 11,400 mph   16,700 feet /s    5,100 m/s   in steel.
- Other things being equal, the speed of sound (called “Mach 1”) increases as the density of the medium decreases and as the stiffness of the chemical bonds between particles in the medium increases.
- Pressure in the medium hardly influences the speed of sound.

**Would an astronaut on a space walk hear a bell if she or he hit it with a hammer?**

- _No!_  Although the bell would vibrate, there is no medium like air in the vacuum of space to propagate a sound wave to the astronaut’s ears.

**Why do you see lightning before you hear its thunder?**

- The speed of light is   *c*  =  299,792,458 m/s    186,282 miles / second,
- so you see a lightning bolt from one mile away after only
- (1 mile) / *c*    5.7 s  but you hear it after  (5280 ft) / (1130 ft / s)    4.7 s .
- Light travels almost one million times as fast as sound in air.

**How fast does sound travel?**

## There are 2 categories of waves based on motion of the waves: traveling and standing

- A traveling wave (like sound in an open area) is a repeating disturbance that moves through a medium from one location to another.

- A standing wave (like a vibrating string fixed at both ends) is a disturbance that repeats without propagating through the medium.

- <_[http://www.glenbrook.k12.il.us/gbssci/phys/mmedia/waves/harm4.html](http://www.glenbrook.k12.il.us/gbssci/phys/mmedia/waves/harm4.html)__>_

- <_[http://www.glenbrook.k12.il.us/gbssci/phys/Class/sound/u11l1a.html](http://www.glenbrook.k12.il.us/gbssci/phys/Class/sound/u11l1a.html)__>_

- <_[http://](http://www.ncat.edu/~gpii/)__[www.ncat.edu/~gpii](http://www.ncat.edu/~gpii/)__[/](http://www.ncat.edu/~gpii/)_>

- Try the following Java applet for a standing wave in a wind instrument like a pipe organ:
- _[http://www.walter-fendt.de/ph11e/stlwaves.htm](http://www.walter-fendt.de/ph11e/stlwaves.htm)_

**There are 2 categories of waves based on motion of the waves: traveling and standing**

- <http://www.ncat.edu/~gpii/>

**Notes:**
The upper left animated gif figure shows a traveling transverse sinusoidal wave (like a slinky or heavy stretchable cord under tension, whose left end is moved up and down, and whose right end is free).  Traveling transverse waves will be described on slide #6.  Click on this Web hyperlink to also see animated gif pictures of a traveling longitudinal wave of particles, a standing transverse sinusoidal wave (similar to the traveling transverse sinusoidal wave shown here in the upper left), and the standing longitudinal wave of particles (as shown in the lower right figure on this slide).
The lower left animated gif figure shows a traveling longitudinal wave (like sound emanating from a tuning fork in an open area so there are no echoes) showing compression and expansion of the medium (like air).  This diagram clearly shows the wave motion from left to right, but it does not clearly show that individual particles of the medium only move right and then back left the same very small distance rather than moving all the way to the right along with the wave.  See the Web hyperlink in the upper left quadrant as mentioned in item #1 just above to more clearly see the motion of particles in the medium carrying a traveling longitudinal wave.
The upper right animated gif shows a standing transverse sinusoidal wave (like a violin string attached at both ends). The medium particle at any “node” does not move at all.  The medium particle at an “antinode” moves up and down a maximum amount.
The lower right animated gif shows a standing longitudinal air pressure wave (like sound resonating in a tube that is closed at both ends).  The air (medium) particles at a “node” do not move at all, and this example shows 7 equally-spaced nodes (including a node at each end of the tube where the air particles cannot move against the end cap).  The air particles at an “antinode” move left and right a maximum amount, and this example shows 6 equally-spaced antinodes, with one antinode halfway between each pair of adjacent nodes.  Every 10th short vertical line is drawn bold just to help the viewer see that individual lines move left and right only a short distance, except at a node where there is no motion at all.  This is a standing longitudinal wave (in contrast to a traveling longitudinal wave as shown in the similar animated gif in the on lower left figure on the next slide) because each compression seems to move a fairly short distance left and right rather than moving all the way along the tube.
Click on the Web hyperlink near the lower right to see an excellent interactive demo of a standing longitudinal wave (like sound in an organ pipe with both ends open, with one end closed, or even a pipe with both ends closed)!

## What actually moves through the medium as sound travels?

- Particles of a medium do not travel long distances along with a sound wave, but _energy_ does.  Particles move forward (parallel to the direction of propagation) a tiny distance, pushing on neighboring particles of the medium and transferring energy to them, and then return close to their original position, so sound waves are called “longitudinal”.  Push the end of a slinky to make a longitudinal wave.

- Traveling longitudinal wave on a slinky
- <_[http://www.glenbrook.k12.il.us/gbssci/phys/mmedia/waves/lw.html](http://www.glenbrook.k12.il.us/gbssci/phys/mmedia/waves/lw.html)__>_

- In physics, a force is an action that can cause an object to accelerate (speed up),
- work is a force acting over a distance,
- energy is the ability to do work, and
- power is the rate at which energy is delivered per unit time.

**What actually moves through the medium as sound travels?**

**What is energy?**

- Traveling longitudinal sound pressure wave
- <http://www.ncat.edu/~gpii/>

**Notes:**
“What actually moves through the medium as sound travels?”:   The particles of the medium do not travel along with the wave.  Instead, the wave is a disturbance that passes through the medium always moving away from the source, but that wave merely moves the particles a little and then lets them go back to their “rest” positions.  In the case of sound, the particles move forward (in the direction of wave propagation) and backward, so sound waves are called “longitudinal”, which means “running lengthwise”.  Only energy (not any individual particle) actually travels with the wave from starting point to ending point.  “Sound” relates to energy traveling through a medium.
In the lower left animated gif figure, short vertical lines close together represent compressed (high pressure) air.  Lines far apart represent rarified (low pressure) air.  Every 10th line is drawn bold just to help the viewer see that individual lines move left and right a short distance, but do not follow the wave all the way toward the right.  All lines move the same amount, but slightly “out of phase” with adjacent lines.  However, high density concentrations of lines (representing compressed air) appear to travel all the way from left to right.  Every 10th line is drawn bold just to help the viewer see that individual lines move left and right only a short distance, but those bold lines do not follow the wave all the way toward the right.  All lines move the same amount, but slightly “out of phase” with adjacent lines.  However, it appears that each high density concentration of lines (representing compressed air) travels all the way from left to right as required for a traveling wave, in contrast to the similar animated figure of a standing longitudinal wave in the lower right on the previous slide.
“Force, work, energy, power”:  As an example of the effect of a force acting on an object, consider pushing constantly with a force of  F = 1 pound  on a hockey puck that is initially at rest and weighs about 1/3 pound (use  m = 0.322 pound / g ,  where  g  is the acceleration of gravity).  At the end of  t = 1 second,  the hockey puck will have moved across the (frictionless) ice rink a distance of  x  =  50 feet,  the final speed of the puck will be  v = 100 feet/second,  its constant acceleration will have been  a = 100 (feet/second)/second  throughout the  t = 1 second  interval, the work  (W)  that your pushing did on the puck will be equal to its final energy  (E)  where  W = E = 50 foot pounds,  and the power you imparted to the puck will have been  P = 50 foot pounds / second  throughout the  t = 1 second  interval.  The following calculations show how to find those results, using standard formulas from elementary physics.F  =  1 lb;g  =  32.2 ft / s2  =  (acceleration of gravity);m  =  (0.322 lb) / g  =  0.322 lb / (32.2 ft / s2)  =  0.01 lb s2 / ft;t  =  1 s;a  =  F / m  =  (1 lb) / (0.01 lb s2 / ft)  =  100 ft / s2;v  =  a t  =  (100 ft / s2) (1 s)  =  100 ft/s;x  =  a t 2 / 2  =  (100 ft/s2) (1 s)2 / 2  =  50 ft;  W  =  F x  =  (1 lb) (50 ft)  =  50 ft lb;E  =  m v 2 / 2  =  (0.01 lb s2 / ft) (100 ft/s)2 / 2  =  50 ft lb  =  W ;P  =  E / t  =  (50 ft lb) / (1 s)  =  50 ft lb / s .

## Other categories of traveling waves based on particle motion

- For a “traveling transverse wave”, particles of the medium move (back and forth) in a direction perpendicular to the direction in which the wave travels, like people in a stadium “doing the wave”, where the crowd is the medium.

- Traveling transverse
-  wave

- Traveling surface wave
- (also called a circular wave)

- A wave on the ocean surface is called a “traveling surface wave” in which particles of the medium move in vertical circles, but the wave propagates horizontally.

- <_[http://](http://www.kettering.edu/~drussell/Demos/waves/wavemotion.html)__[www.kettering.edu/~drussell/Demos/waves/wavemotion.html](http://www.kettering.edu/~drussell/Demos/waves/wavemotion.html)_>

- <_[http://](http://en.wikipedia.org/wiki/Transverse_wave)__[en.wikipedia.org/wiki/Transverse_wave](http://en.wikipedia.org/wiki/Transverse_wave)_>

- <_[http://](http://www.kettering.edu/~drussell/Demos/waves/wavemotion.html)__[www.kettering.edu/~drussell/Demos/waves/wavemotion.html](http://www.kettering.edu/~drussell/Demos/waves/wavemotion.html)_>

- Try the interactive demo of a traveling transverse wave at
- _[http://www2.biglobe.ne.jp/~norimari/science/JavaApp/nami1/e-nami.html](http://www2.biglobe.ne.jp/~norimari/science/JavaApp/nami1/e-nami.html)__ ._

**Other categories of traveling waves based on particle motion**

## Identify each wave as longitudinal, transverse, or surface

- Traveling transverse
-  wave

- <_[http://www.kettering.edu/~drussell/Demos/waves-intro/waves-intro.html](http://www.kettering.edu/~drussell/Demos/waves-intro/waves-intro.html)_>

- Traveling transverse
-  wave

- Traveling longitudinal
- wave
- (like sound)

**Identify each wave as longitudinal, transverse, or surface**

**Notes:**
For the traveling transverse wave at the top, the particles (individuals “doing the wave” in a stadium) move perpendicular (up and down) to the direction of wave propagation (left to right) and then those particles return to their initial (rest) positions.
For the traveling longitudinal wave in the middle, the particles (air molecules) move parallel to the direction of wave propagation (left to right) and then those particles return to their initial (rest) positions.
For the traveling transverse wave at the bottom, the particles (bits of a stretched piece of elastic or slinky) move perpendicular (up and down) to the direction of wave propagation (left to right) and then those particles return to their initial (rest) positions.

## How do computers record and play back sound?

- Analog to Digital Converter (ADC)

- Microphone

- Sound source (e.g., music or speech)

**How do computers record and play back sound?**

**Notes:**
Girl and her “Air pressure” plot:   The girl’s speaking or talking (with her vocal tract including the vocal cords, throat, mouth, and nasal cavity; or else perhaps a musical instrument, a clap, or another sound source) causes the air pressure to fluctuate with time.  For example, when either one of the two tines of a tuning fork moves toward the surrounding air, it locally compresses that air and causes a pulse of increased air pressure (above the mean ambient air pressure) to propagate away from that tine.  In contrast, when the tine of a tuning fork moves away from the surrounding air, it locally expands the air and causes a pulse of decreased air pressure (below the mean ambient air pressure) to propagate away from the tine.  The air pressure waveform is a continuous function of time;  that is, at every instant of time the air pressure at any given location has some value.  The picture of the girl is from Microsoft Office 2003 Clip Art.
Microphone and its “Voltage” plot:   The microphone converts the pressure at any instant in time to a voltage proportional to that pressure, thus producing a continuous voltage waveform that is analogous to the continuous air pressure waveform measured at the location of the microphone.
ADC and its waveform:   The ADC digitizes the voltage waveform by sampling it at equally-spaced discrete time slices and quantizing the value of the waveform at each time slice to an integer value as explained on the next slide.

## Quantization errors introduced by digitizing an analog signal

**  ****0,  0, -1, -2, -4,  8, 11, -3,    -5, -2,  0,  1,  0,  1,  4,  3,**
** ****-1,  0,  0, -4, -2,  1,  3,  3,     3,  1, -2, -3, -1,  1,  1,  0**

**Quantization errors introduced by digitizing an analog signal**

**Notes:**
Observe the quantization errors as the white square samples shown on this graph approximate points on the red continuous waveform.  Those small errors in the vertical positions of the white squares compared with the red curve are caused because each digitized sample is taken at a time instant corresponding to a vertical grid line, and its value is rounded by the ADC to the quantized sample value corresponding to the nearest horizontal grid line crossing the red continuous waveform at that time.
The 32 sample values are represented by the integers“0,  0,  –1,  –2,  –4,  8,  11,  –3,  –5,  –2,  ...,  1,  1,  0”shown in two rows at the bottom of this slide, where each of the four groups of 8 samples is between two major vertical grid lines on the graph.  Those 32 samples would be produced by a signed 5-bit ADC whose sample values must be in the range–16  =  – 24    sample    24 – 1  =  15 .By comparison, audio compact disks (CDs) typically use 16 bits/sample, for a maximum range of–32,768  =  – 215    (ADC sample)    215 – 1  =  32,767 .Professional audio recording equipment may reduce quantization errors by using an ADC that digitizes 24 bits/sample, for a maximum range of–2,147,483,648  =  – 231    (ADC sample)   231 – 1  =  2,147,483,647 .

## How do computers record and play back sound?

- Analog to Digital Converter (ADC)

- Digital to Analog Converter (DAC)

- Store digitized numbers on a computer disk

- Microphone

- Speaker or earphone

- Sound source (e.g., music or speech)

**How do computers record and play back sound?**

**Notes:**
Disk and its “Sample value” plot:   The 32 discrete samples (i.e., the integers) produced by the ADC can be stored in a file on a computer disk.  Reading that file later recovers those 32 samples, but the exact values of the original waveform at the sample times have been rounded to integers (probably introducing quantization errors), and no information is available for what the original continuous waveform did between the samples (possibly introducing what are called “aliasing errors” if the original continuous signal contained energy at frequencies greater than the Nyquist frequency, which is half the sampling frequency).  For brevity, no technical explanation of aliasing will be given here.
If the digitized numbers from the ADC are encoded or compressed before recording the data on disk (for example, to reduce required disk space), the data read back from the disk should be decoded or uncompressed to produce sampled data representing a signal similar to the original sample values from the ADC.
DAC and its output “Voltage” plot:   The DAC converts the numbers read from the disk into voltages.  Typically, the output voltage is held constant by the DAC during the brief time interval between one sample and the next one as shown on this graph.
Speaker/earphone and its “Air pressure” plot:   The DAC output voltages (perhaps after some electronic filtering to produce a smoother waveform and a more pleasant sound without clicks) drives a speaker or earphone.  That produces an air pressure waveform:  compressing air to increase pressure when the speaker cone moves outward, and expanding air to decrease pressure when the speaker cone moves inward.

## Define sine & cosine functions of angles measured in radians

- The radian measure of an angle is the length of the circular arc subtended (included) by that angle divided by the radius of the circle.
- The *y*-coordinate of the point on the unit circle determined by a central angle (in standard position) of    radians is the sine,  denoted  sin() .
- The *x*-coordinate of that point is the cosine,  denoted by  cos() .

- To the left of the *y*-axis, you see a unit circle being swept out, with the radian measure of the angle (arc length) shown in blue, and the sine of that angle (the *y*-coordinate) shown in red.  To the right of the *y*-axis, you see the points of the graph of
*y* = sin()  drawn in black.  The angle  is shown in blue and the value of  sin()  is shown in red.

- <_[http://](http://www.wku.edu/~tom.richmond/Sine.html)__[www.wku.edu/~tom.richmond/Sine.html](http://www.wku.edu/~tom.richmond/Sine.html)_>

- <_[http://www.rkm.com.au/ANIMATIONS/animation-sine-wave.html](http://www.rkm.com.au/ANIMATIONS/animation-sine-wave.html)_>

- 

*y*

**Define sine & cosine functions of angles measured in radians**

## Parameters of a temporal sine wave

- <_[http://](http://en.wikipedia.org/wiki/Sine_wave)__[en.wikipedia.org/wiki/Sine_wave](http://en.wikipedia.org/wiki/Sine_wave)_>

- The oscillating height of an undamped spring-mass system around the equilibrium is a sine wave.

- Parameters of the temporal sine wave (or sinusoidal function of time)
*y*    =   *a*  sin (** *t* + *** *)  =  *a*  sin (2 ** *f* *t* + *** *)  = *a*  sin (2 ** *t* / *T *+ *** *)    are
*a*   =   amplitude   =   peak deviation from the center at zero,
**  =   angular frequency typically measured in  radians/second,
*f*    =  *** */ (2 **)  =  angular frequency typically in  cycles/second,
*T*   =   1 / *f*    =   period typically measured in  seconds,     and
**   =   initial  (at time  *t* = 0)  phase angle  in radians,    with the variable
*t*    =   time typically measured in seconds.

- 2 *a*

*a*

*** **T** **/** *(2**) = *** /***

*t* = 0

*T* = 1/*f = *2*** /***

*T* = 1/*f = *2*** /***

*t*

*y*

- See a helpful interactive demo of frequency, wavelength, and phase of a sinusoidal wave at  _[http://id.mind.net/~zona/mstm/physics/waves/introduction/introductionWaves.html](http://id.mind.net/~zona/mstm/physics/waves/introduction/introductionWaves.html)_ .

- crest

- trough

**Parameters of a temporal sine wave**

**Notes:**
To see an excellent interactive demo of frequency, wavelength, and phase of a sinusoidal wave, click on the Web hyperlink at the bottom of this slide!

## What is a  “common logarithm”  (which is also calleda  “base 10 log”  and is denoted by  “log10”) ?

*a*  =  log10 *x*     means     10 *a*  =  *x*
- where     0  <  *x*  <       and        <  *a*  <   .
- The notation  “ log10 *x *”  is read as  “ log base 10 of  *x** *”  or  “ common log of  *x** *” .

- Therefore,    *a*  =  log10 (10 *a** *)    and    10( log10 *x*)  =  *x* ;
- that is, 10 must be raised to the exponent   log10 *x*   to calculate  *x* .

- To remember this, memorize the mnemonic:    “A logarithm is an exponent .”

- The common logarithm is the inverse of the power function raising 10 to an exponent :

- 10 *a*

*a* = 3

- 10 3 = 1000

- log10 *x*

- log10 1000
- =  3

*x* = 1000

**What is a  “common logarithm”  (which is also called****a  “base 10 log”  and is denoted by  “****log****10****”) ?**

**Notes:**
The Audacity program uses logarithms to scale the axes of graphs and to compute units called decibels that are commonly used to express the intensity of sound.
For any given positive value of  x,  the base “10” must be raised to the exponent  “log10(x)”  (which is called  a  on this slide) to calculate  x .
The statement  “a = log10(x)  means  10a = x ”  defines a “common logarithm” or “base 10 log”.
In the sentence beginning with the word “Therefore”, the equation  “a = log10(10a)”  follows by using  “10a = x”   from the sentence just above it to substitute for  x  in the equation  “a = log10(x)”  in that preceding sentence.   Likewise, the equation  “10^(log10(x)) = x ”  follows by using “a = log10(x)”  from the sentence just above it to substitute for  a  in the equation  “10a = x ”  in that preceding sentence.
In the diagram at the bottom of this slide, the  “10a”   box at the lower left takes the input value  a = 3  and calculates the output value  103 = 1000.   However, the  “log10(x)”   box at the lower right takes the input value  x = 1000  and calculates the output value  log10(1000) = 3.   Thus, those two boxes compute inverse functions;  that is, each box undoes the calculation done by the other box.

## Example numeric evaluations of the common logarithm

**Example numeric evaluations of the common logarithm**

| 10 a  =  x | a  =  log10 x |
| --- | --- |
| 1 | 0 |
| 2 | 0.30103 |
| 5 | 0.69897 |
| 10 | 1 |
| 20 | 1.30103 |
| 50 | 1.69897 |
| 100 | 2 |
| 200 | 2.30103 |
| 500 | 2.69897 |
| 1000 | 3 |

| 10 a  =  x | a  =  log10 x |
| --- | --- |
|    1 | 0 |
|       1/2  =  0.500 |  0.30103 |
|       1/5  =  0.200 |  0.69897 |
|     1/10  =  0.100 | 1 |
|     1/20  =  0.050 |  1.30103 |
|     1/50  =  0.020 |  1.69897 |
|   1/100  =  0.010 | 2 |
|   1/200  =  0.050 |  2.30103 |
|   1/500  =  0.020 |  2.69897 |
| 1/1000  =  0.001 |  3 |

- Use column headings  “ **10**** *****a*** ”  and  “ ***a*** ”  for a table of exponentials, oruse column headings  “ ***x*** ”  and  “ **log****10**** *****x*** ”  for a table of logarithms.

**Notes:**
Comparing the two columns of this table shows that   log10(1/x) = – log10(x)  for these examples.  This is true in general for any positive value of  x > 0 .
The left side of this slide shows that while the values of  10a = x  increase over the large range from  1  to  1000,  the corresponding values of  a = log10 x  increase over the much smaller range from  0  to  3.
The right side of this slide shows that while the values of  10a = x  decrease over the small range from  1  to  1/1000,  the corresponding values of  a = log10 x  decrease over the much larger range from  0  to  –3.

## Plots of   log10 x   versus   x   with linear axes

**Plots of   ****log****10**** *****x*****   versus   *****x*****   with linear axes**

**Notes:**
The part of the function  log10(x)  shown in the upper graph for  0.1 < x < 10  is also shown at the leftmost 1/10 of the lower graph, with rescaled axes.
The lower graph shows the part of the function  log10(x)  for  0.001 < x < 1000 .
The blue curve representing the function  log10(x)  approaches negative infinity as  x  decreases toward zero.
The values in the tables of the previous slide are included on these two graphs.

## Plots of the same data with linear, semilog, and log-log axes

- 8

- 2

- 1/2

- 1/8

- 1/32

- 8

- 4

- 2

- 1

- 1/2

- log2(1/4) = –2 octaves, so slope thru **P****1**=(3, 4) and **P****2**=(6, 1) is
- log2(*y*2 / *y*1) / (*x*2 – *x*1)  =  (–2 octaves) / (6 – 3) = – 2 / 3 octave.

- The slope through points **P****1**=(1, 2) and  **P****2**=(2, 0.5)  is
- log2(*y*2 / *y*1) / log2(*x*2 / *x*1) =  (–2 oct.) / (1 oct.) = – 2 octave/octave.

**Plots of the same data with linear, semilog, and log-log axes**

**Notes:**
The same data values are used on each of the 4 plots.
The 5 peaks marked by green squares are at coordinates  (1.5, 8),  (3, 4),  (4.5, 2),  (6, 1),  (7.5, 1/2).   Those x coordinates are linearly spaced at identical intervals of 1.5 between consecutive peaks.  Those  y  coordinates are geometrically spaced, with the  y  coordinate of each peak being  1/2  of the  y  value of the preceding peak.  Therefore, the 5 green square peaks lie along a straight line in the lower-left (log y axis versus linear x axis) plot.
The other 5 peaks marked by red circles are at coordinates  (1/2, 8),  (1, 2),  (2, 1/2),  (4, 1/8),  (8, 1/32).   Those x coordinates are geometrically spaced, where the  x  coordinate of each peak is 2 times the  x  coordinate of the preceding peak.  Those  y  coordinates are also geometrically spaced, with the  y  coordinate of each peak being  1/4  of the  y  coordinate of the preceding peak.  Therefore, the 5 red circle peaks lie along a straight line in the lower-right (log y axis versus log x axis) plot.
The upper-left (linear y versus linear x) plot is called a “linear” graph.
The lower-left (log y versus linear x) plot is the most common kind of “semilog” graph, with “log-linear” axes.
Increasing any positive number by  “n  octaves”  for any integer  n  means multiplying that number by  2n .   For example, increasing the frequency of a musical note from  110 Hz  (which is called the note A2)  by 3 octaves yields the frequency  23 (110 Hz) = 880 Hz  (which is called the note A5).   Similar to the base 10 logarithms already discussed, the base 2 logarithm of any positive number  x  is denoted by  log2(x) = a  such that  x = 2a .  Using a theorem about logarithms similar to one on the next slide,  log2(x2 / x1) = log2(x2) – log2(x1) = b = (the number of octaves that  x1  must be raised to equal  x2)  because   x2 / x1 = 2b  and so  x2 = 2b x1 .
The upper-right (linear y versus log x) plot is an alternate kind of “semilog” graph, with “linear-log” axes.
The lower-right (log y versus log x) plot is called a “log” graph, with “log-log” axes.

## Basic properties of powers of 10 and of common logarithms

- Basic properties of powers of 10 from algebra include10*a* 10*b*  =  10*a** *+*b*    and    10*a* / 10*b*  =  10*a** **b*    and    (10*a* )*b*  =  10(*a** **b*) for any real values       <  *a*  <      and       <  *b*  <   .

- The 3 corresponding properties of common logarithms follow, using the definitions*x*  =  10*a*    and    *y*  =  10*b* ,          so          log10 *x*  =  *a*    and    log10 *y*  =  *b*where     0  <  *x*  <   ,     0  <  *y*  <   ,        <  *a*  <   ,     and        <  *b*  <   .

- Theorem:    log10 (*x* *y*)   =   log10 *x  +  *log10 *y *. Proof:          log10 (*x* *y*)   =   log10 (10*a* 10*b*)   =   log10 (10*a** *+*b*)   =   *a* + *b*   =   log10 *x   +  * log10 *y *.

- Theorem:    log10 (*x* / *y*)   =   log10 *x*    log10 *y *.Proof:          log10 (*x* / *y*)   =   log10 (10*a* / 10*b*)   =   log10 (10*a** **b*)   =   *a*  *b*   =   log10 *x   ****  * log10 *y *.

- Theorem:    log10 (*x** **b*)   =   *b *  log10 *x *. Proof:          log10 (*x** **b*)   =   log10 ((10*a*)*b*)   =   log10 (10 (*a** * *b*))   =   *a* *b*   =   *b* *a*   =   *b*   log10 *x *.

- Examples with  *a* = 5  and *b *= 2:105 102   =   (10 · 10 · 10 · 10 · 10)  (10 · 10)   =   107   =   105+2 ;105 / 102   =   (10 · 10 · 10 · 10 · 10)  /  (10 · 10)   =   103   =   1052 ;(105)2   =   (10 · 10 · 10 · 10 · 10)  (10 · 10 · 10 · 10 · 10)   =   1010   =   10(5 · 2) .

**Basic properties of powers of 10 and of common logarithms**

**Notes:**
The 1st theorem   “log10(x y)  =  log10(x) + log10(y)”   can be remembered as  “the log of a product equals the sum of the logs”.  Essentially, logs convert multiplication into the “simpler” operation of addition.
The 2nd theorem   “log10(x / y)  =  log10(x) – log10(y)”   can be remembered as  “the log of a quotient equals the difference of the logs”.  Essentially, logs convert division into the “simpler” operation of subtraction.
The 3rd theorem   “log10(x b)  =  b  log10(x)”   can be remembered as  “the log of a power equals the exponent times the log”.   Essentially, logs convert a power (that is, raising a base to an exponent) into the “simpler” operation of multiplication.

## Measure sound pressure amplitude or intensity in decibels

**Measure sound pressure amplitude or intensity in decibels**

**Notes:**
Equations #1, #2, and #3:    A sound generated in an open space expands as a spherical wavefront whose total power is constant over time as its area   4  r2  =  4  (v t)2  increases.
Equations #3, #4, and #7:   The sound power  P(r)  and the maximum pressure amplitude squared  a2(r)  sensed by the microphone are both inversely proportional to the square of its distance  (r2)  from the source, and both are directly proportional to the given cross sectional area  A  of the microphone’s diaphragm (or the area of the eardrum if a human ear senses the sound).   The intensity  I(r)  of the sound waveform is inversely proportional to the square of its distance  (r2)  from the source, but  I(r)  is a property of the sound itself at that location independent of what sensor is used to measure the sound.  That is, for given values of  Psrc  and  r,  intensity  I(r)  does not depend on the cross sectional area  A  of the microphone’s diaphragm, whereas both  P(r)  and  a2(r)  are proportional to the area  A.  The symbol  “”  in equation #4 means “is proportional to”, so there is a constant  b  (independent of  Psrc  and  r  and  A)  such that  P(r)  =  b a2(r).
Equation #6:   The reference “threshold of hearing (TOH)” intensity level  ITOH = 10–12 W/m2  is considered the lowest intensity sound a person with “normal” hearing can hear.
Equation #7:   Throughout this slide, assume the microphone’s diaphragm of area  A  (measured in meter2)  is located at any particular given distance  r  (in meters)  from the sound source, which emanates any particular given power  Psrc  (in watts).   The intensity  I(r)  (in  watts / meter2)  and  IdB(r)  (in dimensionless decibels)  at distance  r  are constant for any given sound source, independent of area  A .   However, the sensed sound power  P(r) = A I(r)  (in watts)  and the sensed sound pressure maximum amplitude squared  a2(r)  (in SI units of  (newtons / meter2)2 = (kg / (m s2))2,  or else in American units of  (pounds / inch2)2 = psi2)  for the sound wave at distance  r  are both inversely proportional to the diaphragm area  A,  and both  P(r)  and a2(r) are inversely proportional to the squared distance  (r2)  from the sound source. The reference power PTOH = A ITOH  and the corresponding reference amplitude squared aTOH2  are each proportional to the diaphragm area  A,  and they represent the threshold of hearing (TOH) for a “normal” human.   The last  “=”  of equation #7 uses the fact thatP(r) / PTOH  =  a2(r) / aTOH2   =  (a(r) / aTOH)2    because power is proportional to pressure amplitude squared, and so10 log10 (P(r) / PTOH)  =  10 log10 (a(r) / aTOH)2  = 20 log10 (a(r) / aTOH)where the last “=” just above applies a property of logarithms from the previous slide.

## Common sounds with estimates of intensity and decibel level

| Source | Intensity  ( I ) | Decibel intensity level | Multiple of TOH intensity |
| --- | --- | --- | --- |
| Threshold of Hearing (TOH) | I TOH = 1012 W/m2 | 0 dB | 100 |
| Rustling leaves | 1011 W/m2 | 10 dB | 101 |
| Whisper | 1010 W/m2 | 20 dB | 102 |
| Normal conversation | 106 W/m2 | 60 dB | 106 |
| Busy street traffic | 105 W/m2 | 70 dB | 107 |
| Vacuum cleaner | 104 W/m2 | 80 dB | 108 |
| Large orchestra | 6.3*103 W/m2 | 98 dB | 109.8 |
| iPod at maximum volume level | 102 W/m2 | 100 dB | 1010 |
| Front rows of a rock concert | 101 W/m2 | 110 dB | 1011 |
| Threshold of pain | 101 W/m2 | 130 dB | 1013 |
| Military jet takeoff | 102 W/m2 | 140 dB | 1014 |
| Instant perforation of eardrum | 104 W/m2 | 160 dB | 1016 |

**Common sounds with estimates of intensity and decibel level**

- <_[http://](http://www.glenbrook.k12.il.us/gbssci/Phys/Class/sound/u11l2b.html)__[www.glenbrook.k12.il.us/gbssci/Phys/Class/sound/u11l2b.html](http://www.glenbrook.k12.il.us/gbssci/Phys/Class/sound/u11l2b.html)_>

## Power, intensity, and distance from a sound source

**Power, intensity, and distance from a sound source**

**Notes:**
For the 6-sided equation in item #1 stating  20 log10 (r2/r1)  =  ...  =  IdB1 – IdB2 ,  the 1st “=” applies the 3rd theorem at the bottom of slide #17,  the 2nd “=” applies the equation  I1/I2 = (r2/r1)2  derived on this slide’s line just above this equation,  the 3rd “=”  applies simple algebra,  the 4th “=” applies the 2nd theorem on slide #17,  and  the 5th “=” applies the definition of expressing sound intensity in decibels from item #7 at the bottom of the slide #18.
Based on the table in the previous slide, the example in item #2 of this slide assumes the estimate that the decibel intensity of sound is  IdB1 = 110 dB  at a front row distance of  r1 = 15 feet  from the source of the music (such as public address loudspeakers).

## Names of musical notes on a piano keyboard

- The frequency of any note (e.g., High C = C5) is twice the frequency of the note one octave below it (e.g., Middle C = C4),  so  *f*C5 = 2  *f*C4 .The ratio of the frequency of any note divided by the frequency of the note one semitone below it (corresponding to the next lower piano key) is always the same for the equal-tempered scale.  Denote that ratio by  *r* ,  where

**Frequency ratio of semitones for the equal-tempered scale**

- So,

- Therefore,   *r** *12  =  2 ,   so   *r*  =  21/12    1.059463094 ,   and hence
- raising a note by one semitone increases its frequency by 5.9463094 % .

**Names of musical notes on a piano keyboard**

**Notes:**
The Audacity program identifies frequencies by the names of the nearest musical notes (such as A4 for 440 Hz).
As shown on this slide, the piano keyboard includes 88 notes that cover more than 7 octaves.  The naming pattern shown above can be extended to notes lower or higher than those a piano can play.
The multisided equation2 fC4  =  fC5  =  r fB4  =  r2 fA#4  = r3 fA4  = r4 fG4#  =  ...  =  r11 fC4#  =  r12 fC4can be derived as follows.  The 1st “=” states that note C5 is one octave above note C4 as explained previously on this slide.  The 2nd “=” follows by multiplying the 1st and 2nd sides the previous equation  (r = fC5 / fB4)  by  fB4 .  The 3rd “=” follows by multiplying the 1st and 3rd sides the previous equation  (r = fB4 / fA4#)  by  r fA4# .  The 4th “=” follows by multiplying the 1st and 4th sides the previous equation  (r = fA4# / fA4)  by  r2 fA4 .  The 5th “=” follows by multiplying the 1st and 5th sides the previous equation  (r = fA4 / fG4#)  by  r3 fG4# .   Continue applying this iterative method 8 more times (explicitly including the 6 sides represented by “...” in each equation), finally yielding the last “=” in this multisided equation which states  r11 fC#4 = r12 fC4 .

## Compute frequencies & wavelengths of equal-tempered notes

- The frequency values in the equal-tempered scale commonly assume that the frequency of the note  A4  is exactly  *f*A4 = 440 Hz  (in units of  Hz  =  Hertz  =  cycles / second).
- The note  A  in any octave corresponds to note index  *n* = 9  because it is 9 semitones above the note  C  at the bottom of the octave.  The note  A4  has the octave index  *u* = 4 .
- The speed  *v*  of a wave that has wavelength  **  and frequency  *f*  is*v*  = **  *f** * ,   typically measured in units of
- Wavelength values in the table on the next slide assume the speed of sound is*v*  =  344 meters/second  =  34,400 cm/s,    which is approximate for dry air at 70 degrees Fahrenheit.
- The note  C0  (which corresponds to note index  *n* = 0  and octave index  *u* = 0)  is(12 semitones/octave) (4 octaves)  +  (9 semitones)  =  57  semitones below the reference note  A4.
- In general, the number of semitones from the note  A4  to the note with any note index  *n*  and any octave index  *u*  is    12 (*u* – 4) + (*n* – 9)  =  *n* – 57 + 12 *u* ,    so the number of octaves (with 12 semitone intervals per octave) from note  A4  of frequency  *f*A4 = 440 Hz  to the note with those indexes is    (*n* – 57) /12  +  *u* .
- For any note index  *n*  and any octave index  *u* ,  the frequency  *f*  and the wavelength  **  of the corresponding note are related by(344 m/s) / **        *v* / **    =    *f*    =    *f*A4  2(*n* – 57)/12 + *u*       (16.35159783 Hz)  2(*n*/12 + *u*) ,     so that**   =   *v* / *f*     (34,400 cm/s) / ((440 / s)  2(*n* – 57)/12 + *u*)      (2103.769941 cm)  2– (*n*/12 + *u*) .
- The lowest (leftmost) note on a piano keyboard is  A0 ,  which corresponds tonote index  *n*A0 = 9 ,    octave  *u*A0* *= 0 ,    frequency  *f*A0 = 27.50 Hz ,       and   wavelength  **A0  1250 cm .
- The highest (rightmost) note on a piano keyboard is  C8 ,  which corresponds tonote index  *n*C8 = 0 ,    octave  *u*C8* *= 8 ,    frequency  *f*C8  4186.01 Hz ,   and   wavelength  **C8   8.22 cm .
- Based on the previous two sentences, the number of keys on a piano is12 (*u*C8 – *u*A0) + *n*C8 – *n*A0 + 1   =   12 (8 – 0) + 0 – 9 + 1   =   88  keys,    covering more than 7 octaves .

**Compute frequencies & wavelengths of equal-tempered notes**

## Frequencies and wavelengths for the equal-tempered scale

| n | Note | Octave u=0 | Octave u=1 | Octave u=2 | Octave u=3 | Octave u=4 | Octave u=5 | Octave u=6 | Octave u=7 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | C | 16.35 Hz
2100 cm | 32.70 Hz
1050 cm | 65.41 Hz
526 cm | 130.81 Hz
263 cm | 261.63 Hz
131 cm | 523.25 Hz
65.7 cm | 1046.50 Hz
32.9 cm | 2093.00 Hz
16.4 cm |
| 1 | C#
= Db | 17.32 Hz
1990 cm | 34.65 Hz
993 cm | 69.30 Hz
496 cm | 138.59 Hz
248 cm | 277.18 Hz
124 cm | 554.37 Hz
62.1 cm | 1108.73 Hz
31.0 cm | 2217.46 Hz
15.5 cm |
| 2 | D | 18.35 Hz
1870 cm | 36.71 Hz
937 cm | 73.42 Hz
469 cm | 146.83 Hz
234 cm | 293.66 Hz
117 cm | 587.33Hz
58.6 cm | 1174.66 Hz
29.3 cm | 2349.32 Hz
14.6 cm |
| 3 | D#
= Eb | 19.45 Hz
1770 cm | 38.89 Hz
885 cm | 77.78 Hz
442 cm | 155.56 Hz
221 cm | 311.13 Hz
111 cm | 622.25 Hz
55.3 cm | 1244.51 Hz
27.6 cm | 2489.02 Hz
13.8 cm |
| 4 | E | 20.60 Hz
1670 cm | 41.20 Hz
835 cm | 82.41 Hz
417 cm | 164.81 Hz
209 cm | 329.63 Hz
104 cm | 659.26 Hz
52.2 cm | 1318.51 Hz
26.1 cm | 2637.02 Hz
13.0 cm |
| 5 | F | 21.83 Hz
1580 cm | 43.65 Hz
788 cm | 87.31 Hz
394 cm | 174.61 Hz
197 cm | 349.23 Hz
98.5 cm | 698.46 Hz
49.3 cm | 1396.91 Hz
24.6 cm | 2793.83 Hz
12.3 cm |
| 6 | F#
= Gb | 23.12 Hz
1490 cm | 46.25 Hz
744 cm | 92.50 Hz
372 cm | 185.00 Hz
186 cm | 369.99 Hz
93.0 cm | 739.99 Hz
46.5 cm | 1479.98 Hz
23.2 cm | 2959.96 Hz
11.6 cm |
| 7 | G | 24.50 Hz
1400 cm | 49.00 Hz
702 cm | 98.00 Hz
351 cm | 196.00 Hz
176 cm | 392.00 Hz
87.8 cm | 783.99 Hz
43.9 cm | 1567.98 Hz
21.9 cm | 3135.96 Hz
11.0 cm |
| 8 | G#
= Ab | 25.96 Hz
1330 cm | 51.91 Hz
663 cm | 103.83 Hz
331 cm | 207.65 Hz
166 cm | 415.30 Hz
82.8 cm | 830.61 Hz
41.4 cm | 1661.22 Hz
20.7 cm | 3322.44 Hz
10.4 cm |
| 9 | A | 27.50 Hz
1250 cm | 55.00 Hz
625 cm | 110.00 Hz
313 cm | 220.00 Hz
156 cm | 440.00 Hz
78.2 cm | 880.00 Hz
39.1 cm | 1760.00 Hz
19.5 cm | 3520.00 Hz
9.77 cm |
| 10 | A#
= Bb | 29.14 Hz
1180 cm | 58.27 Hz
590 cm | 116.54 Hz
295 cm | 233.08 Hz
148 cm | 466.16 Hz
73.8 cm | 932.33Hz
36.9 cm | 1864.66 Hz
18.4 cm | 3729.31 Hz
9.22 cm |
| 11 | B | 30.87 Hz
1110 cm | 61.74 Hz
557 cm | 123.47 Hz
279 cm | 246.94 Hz
139 cm | 493.88 Hz
69.7 cm | 987.77 Hz
34.8 cm | 1975.53 Hz
17.4 cm | 3951.07 Hz
8.71 cm |

**Frequencies and wavelengths for the equal-tempered scale**

**Notes:**
The frequency values in this table use the common assumption that the frequency of the note  A4  is exactly  fA4 = 440 Hertz.   The note  A4  corresponds to note index  n = 9  and  octave index  u = 4 .
The wavelength values in this table also assume that the speed of sound is  v = 344 meters/second = 34,400 cm/s,  which is approximately true in dry air at 70 degrees Fahrenheit.
The note  C0  (which corresponds to indexes  n = 0  and  u = 0)  is   12 (4) + 9  =  57  semitones below the reference note  A4.
The note  C4  is called “middle C” (the first C to the left of the center of a piano keyboard);  note  C5  is called “high C” (the first C to the right of the center of a piano keyboard).
In general, the number of semitones from the note  A4  to the note with any note index  n  and any octave index  u  is12 (u – 4) + (n – 9)  =  n – 57 + 12 u ,so the number of 12-semitone octaves from note  A4  to the note with those indexes is(n – 57 + 12 u) / 12  =  (n – 57)/12 + u .
For any note index  n  and any octave index  u,  the frequency  f  and the wavelength    of the corresponding note are related by(344 m/s) /     v /   =  f  =  fA4  2((n – 57)/12 + u)    (16.35159783 Hz)  2(n/12 + u),     so that  =  v / f    ((34,400 cm/s) / ((440 / s)  2((n – 57)/12 + u))    (2103.769941 cm)  2(n/12 + u) .
The lowest (leftmost) note on a piano keyboard is  A0 ,  which corresponds ton = 9, u = 0,  f = 27.50 Hz,  and    1250 cm.
The highest (rightmost) note on a piano keyboard is  C8 ,  which corresponds ton = 0, u = 8,  f  4186.01 Hz,  and    8.22 cm.
By items #8 and #7 just above, the number of keys on a piano is  12 (uC8 – uA0) + nC8 – nA0 + 1  =  12 (8 – 0) + 0 – 9 + 1  =  88 .

## Superposition (that is, adding) of waves can form beats

**Superposition (that is, adding) of waves can form beats**

- Beats are the periodic fluctuations heard in the intensity of a sound when two sound waves of very similar frequencies interfere with one another.  In the figure, the red sine wave at the top is added to the slightly lower frequency blue sine wave in the middle, forming the green beating waveform at the bottom.
- C.I. = Constructive Interference:  When two compressions come together, they combine to make a region of very compressed air (very high pressure).  When two rarefactions come together, they combine to make a region of very spread-out air (very low pressure).  Both of these are examples of constructive interference.  A location of continually constructive interference is called an antinode.
- D.I. = Destructive Interference:  When a compression from one wave meets a rarefaction from another wave with equal amplitude, they cancel out, so that there’s no disturbance in air pressure at that point.  A location of continually destructive interference is called a node.
**The  ****beat frequency****  (that is, the rate in  repetitions/second  at which the loud beats repeat)  is equal to the difference in frequency of the two notes that interfere to produce the beats.**

**Notes:**
If you listen to two tones that have the same intensity but have two very slightly different frequencies, you hear an oscillating pattern of loud sound and then silence, loud sound and then silence...called beats. The frequency of that oscillation (how often the beats occur) is called the beat frequency. 
For example, if two sound waves with frequencies of 300 Hz and 302 Hz are heard simultaneously, a beat frequency of  302 Hz – 300 Hz  =  2 Hz  will be detected;  that is, the resulting waveform will reach its maximum intensity 2 times per second.
In the plots shown on this slide, if the red wave 1 has the frequency 110 Hz (which will contain exactly 11 cycles in 0.1 second) then the blue wave 2 has the frequency 100 Hz (which will contain exactly 10 cycles in that same 0.1 second).  The resulting beat frequency of the green sum of those waves is then  110 Hz – 100 Hz  =  10 Hz,  which reaches its maximum intensity 10 times per second, which means it repeats after  1 / (10 cycles/second) = 0.1 seconds/cycle .
A piano tuner can use beats to tune a piano string.  She will pluck the string and tap a tuning fork for the proper note at the same time.  If the two sound sources -- the piano string and the tuning fork -- produce detectable beats then their frequencies are not identical.  She will then adjust the tension of the piano string and repeat the process until the beats can no longer be heard because the time between beats gets too long. 

## Two sources of sound with the same frequency interfere

**Two sources of sound with the same frequency interfere**

- Animated interference pattern formed by two sound wave sources having the same wavelengths and frequencies
- <http://www.glenbrook.k12.il.us/gbssci/phys/mmedia/waves/ipl.html>

**The number of antinodal lines in front of the two sources is about twice the number of wavelengths between the sources.**
- Java applets for interference:
- http://webphysics.davidson.edu/Applets/Ripple/Ripple_JS.html
- http://id.mind.net/~zona/mstm/physics/waves/interference/twoSource/TwoSourceInterference1.html

**Notes:**
The waveforms are like ripples caused on the surface of a pond when it is repeatedly tapped (at the same rate) by two sources  s1  and  s2.   The circular ripples expanding from source  s1  interfere with (that is, add to the instantaneous height of) the circular ripples expanding from source  s2  at each location and time instant.  This produces “antinodal lines” with high amplitude oscillation where the interference is constructive, and it produces “nodal lines” where destructive interference causes the ripples to continuously cancel each other.
This animation shows that the number of antinodal lines and nodal lines decreases as the wavelength of both sets of ripples increases (that is, as their frequency decreases) for the same spacing between the two sources (that is, for a constant “slit width”).

## Mathematical basis of spectrum analysis and the FFT

- _Any real function of continuous time equals the sum_ of a possibly infinite number _of sine waves_ of various frequencies.  The (continuous) Fourier transform computes the amplitude and initial phase angle for those sine waves at each frequency, where the frequencies may need to be infinitesimally closely spaced for some functions.  It was named after Jean Baptist Joseph Fourier, 1768 – 1830.
- In particular, _if the function of continuous time_  *g*(*t*)  _is periodic_ with a repetition rate of  *f*P  (typically in units of cycles/second = Hertz = Hz)  so its period is  1/*f*P  (seconds/cycle),  which means   *g*(*t*)  =  *g*(*t* + *u* / *f*P)   for all times  *t*  and for all integers   *u*  =  0, 1, 2, 3, ...,   then that function equals the sum of sine waves (called a Fourier series) whose frequencies are only integer multiples of the fundamental frequency  *f*P ,  where  *m* *f*P  is called the  *m*th  harmonic frequency for any positive integer   *m* = 1, 2, 3, ... .
- _If an analog to digital converter_ (ADC) _digitizes_ an even number  *N*  of samples of the function of time  *g*(*t*)  at a uniform sampling frequency of  *F*s  (samples/second)  spanning a duration of  *N* / *F*s  (seconds),  then each of those samples  (at times  *t**k* = *k* / *F*s  for each sample index   *k* = 0, 1, 2, ..., *N*–1)  equals a sum of  *N* / 2 + 1 sine waves at uniformly spaced frequencies  *f**n* = *n* *F*s / *N*  for frequency indexes  *n*  =  0, 1, 2, ..., *N** */ 2 .   That is,

- where the nonnegative amplitudes  *a**n*  0  and the phase angles  ***n*  of those  *N* / 2 + 1  sine waves can be computed from the  *N*  given samples by the fast Fourier transform (FFT) algorithm.

**Mathematical basis of spectrum analysis and the FFT**

**Notes:**
The definition of the discrete Fourier transform will be explained in these notes for this slide, although this involves some mathematical concepts (like a few trigonometric identities, complex number theory, and Euler’s formula) that are beyond the level assumed by the rest of this presentation.
The implicit assumption is made throughout this slide that the function  g(t)  is “purely real” in the sense of complex number theory;  that is, the imaginary part of  g(t)  is assumed to equal zero for all time  – < t <  .   This assumption gives the Fourier transforms “complex conjugate symmetry”.  In terms of data sampled by an ADC at a uniform rate of  Fs  (measured in Hz = samples/second),  complex conjugate symmetry means that   G(Fs –  fn)  =  G(fN–n)  =  conjugate(G(fn))   for all   n  =  0, 1, 2, ..., N – 1,   where  G(fn) = G(n Fs / N)   is the FFT complex spectrum of time-domain real samples  g(tk) = g(k / Fs)  as defined below in the notes for this slide.
The requirement that the total number of samples  N  should be an even integer is also assumed for the particular representation shown on this slide with the sum of only  N/2 + 1  sines.
For any frequency index  n  =  0, 1, 2, 3, ..., N  – 1  corresponding to the frequency  fn = n Fs / N ,  definecn  =  (1 / N)  (sum of   g(k / Fs)  cos(2   k n / N)  for all  k = 0, 1, 2, ..., N – 1)     anddn  =  (1 / N)  (sum of   g(k / Fs)  sin(2   k n / N)  for all  k = 0, 1, 2, ..., N – 1) .     Also definej  =  (one of the two imaginary unit constants of complex number theory, such that  j 2 = –1).
The discrete Fourier transform (the DFT, which can be computed by the much more efficient FFT algorithm) at any discrete frequency  fn  =  n Fs / N   (measured in Hz)  isG(fn)  =  G(n Fs / N)  =  cn + j dn  =  (1 / N) (sum of   g(k / Fs)  exp(j 2   k n / N)   for all  k = 0, 1, 2, ..., N – 1) ,using Euler’s formula that   e(j x)  =  exp(j x)  =  cos(x) + j sin(x)   for any real number  x  where  e  2.718281828495  is the base of natural (Naperian) logarithms.
Although that DFT function  G(fn)  can be evaluated for any integer  n ,  those values of the complex spectrum repeat with a period of  N  frequency-domain samples;  that is,  G(fn) = G(fn+N)  for any integer  n .
Let    =  G(0)  =  c0  =  (the average of all  N  digitized samples)            =  (1 / N)  (the sum of all  N  samples  g(k/Fs)  for  k = 0, 1, 2, ..., N – 1) .If     0   then   a0 =   0   and   0 =  / 2,   so the first summation term  (at frequency  f0 = 0 Hertz)  is   a0 sin 0 =  ;   otherwise,if    < 0   then   a0 = – > 0   and   0 = – / 2,   so the first summation term  (at frequency  f0 = 0 Hertz)  is again   a0 sin 0 =  .
Corresponding to  (half the sampling frequency)  =  Fs / 2  =  f(N / 2)  =  (n Fs / N  where  n = N / 2),let  h  =  G(Fs / 2)  =  c(N / 2)  =  (the sum of  (–1)k g(k/Fs)  for all  k = 0, 1, 2, ..., N – 1) .If   h  0   then   aN / 2 = h  0   and   N / 2 =  / 2,   so the last summation term  (at frequency  fN / 2 = Fs / 2)  is   aN / 2 sin( k + N / 2) = (–1)k h ;   otherwise,if   h < 0   then   aN / 2 = –h > 0   and   N / 2 = – / 2,   so the last summation term  (at frequency fN / 2 = Fs / 2)  is again   aN / 2 sin( k + N / 2) = (–1)k h .
For any  n = 1, 2, 3, ..., N / 2 – 1,  the amplitude of the sine term at frequency  n Fs / N   isan   =  2  | G(fn) |  =  2  sqrt(cn2 + dn2)   0 ,and the phase angle  n  of that sine term  an  sin(2   k n / N + n)  isn   =  (arg(G(fn))  +   / 2) mod (2 )  =  (atan2(dn ,  cn)  +   / 2) mod (2 ) =  atan2(cn ,  dn) mod (2 ) ,      sosin(n)  =  2 cn / an     and     cos(n)  =  2 dn / an ,    wherearg(z) = z / |z|  is the argument function of any nonzero complex number  z ,   whereatan2(y, x)  =     is the arctangent function such that   sin() = y / r  and  cos() = x / r  assuming  r = sqrt(x2 + y2), wherex mod y  =  x  –  y  floor(x / y)    is the “modulo” function which calculates the remainder of any real  x  divided by any nonzero real  y ,  and wherefloor(x)  =  (the greatest integer that is  x) .

## Graphical example and demos of spectrum analysis

**Graphical example and demos of spectrum analysis**

- Sum of 3 harmonics  (based on  http://zone.ni.com/cms/images/devzone/tut/a/8c34be30580.gif)

- Fourier series and waves animated applet:              http://www.kettering.edu/~drussell/Demos/Fourier/Fourier.html
- Applet to adjust amplitudes of first 8 harmonics:    http://www.earlevel.com/Digital%20Audio/harmonigraf.html
- Nice demo to listen to Fourier series harmonics:     http://www.jhu.edu/~signals/listen-new/listen-newindex.htm

**Notes:**
This graphical example shows that adding the green  (“f1”),  yellow (“2 f1”),  and red  (“3 f1”)  sine waves at each instant of time  t  produces the white (“sum”) waveform.  The Fourier transform (FFT) of the sum waveform calculates the frequencies, amplitudes, and initial phase angles of the sine waves that will add up to that sum waveform.
Because the 3 sine waves shown here have harmonic frequencies which are the first 3 multiples of the fundamental frequency  f1 ,  the sum waveform must repeat with a period of  1 / f1  (in seconds).
The three Web links at the bottom of this slide help to illustrate the FTT.  The last two are interactive, and the last one demonstrates the effect that changing the FFT spectrum has on the sound of its corresponding time-domain waveform.

## Anatomy of the human ear

- <http://www.glenbrook.k12.il.us/gbssci/phys/Class/sound/u11l2d.html>

- The hammer (malleaus), anvil (incus), and stirrup (stapes) bones and coiled cochlea are unique to mammals.
- <http://biology.clc.uc.edu/fankhauser/Labs/Anatomy_&_Physiology/A&P202/Special_Senses/Histology_Ear.htm>

- A traveling wave in the liquid- filled cochlea causes thousands of tiny, frequency-sensitive hair cells (cilia) to vibrate, which sends electrical impulses along the auditory nerve corresponding to the hairs that are moving.  Higher amplitude sounds at any particular pitch produce more rapidly repeating nerve impulses from the corresponding hair.

**(pi**** ****nna)**

- The tiniest hair cells are near the entrance of the cochlea and are sensitive to the highest frequencies of sound (up to about 20 KHz).  Somewhat larger hair cells are near the apex of the cochlea and respond to low frequencies (down to about 20 Hz).

**Anatomy of the human ear**

**Notes:**
The repetition rates of electrical impulses sent along the auditory nerve bundle to the brain convey information about the amplitudes of sounds at each of thousands of frequencies from about 20 Hz to about  20,000 Hz = 20 KHz.
Essentially, the frequency and magnitude information that could be computed by an FFT is sent to the brain, but the phase angle information is discarded as being irrelevant for the brain to discern information from the sound.
The fluid-filled “semicircular canals” in the inner ear above entrance to the cochlea provide a person’s sense of balance.
The Eustachian tube connects to the throat to allow air pressure to be balanced on both sides of the eardrum while swallowing.
The outer ear flap on the side of the head is also called the pinna or auricle.  It modifies the volume of sounds from in front or behind a person to help distinguish the direction the sound is coming from.  The tiny time delay (less than about 0.0005 second = 500 s) between when a sound arrives at a person’s left and right ears also helps the brain discern the direction the sound is coming from.

## Anatomy of the human vocal tract

- <http://cobweb.ecn.purdue.edu/~ee649/notes/figures/vocal_apparatus.gif>

**Anatomy of the human vocal tract**

**Notes:**
The “larynx” is also called the “voicebox” and contains the vocal cords (also called vocal folds).
When muscles pull on the vocal cords putting them in tension, they are caused to vibrate by air pressure rising from the lungs through the trachea (airway), producing periodic pulses of air that resonate through the upper parts of the vocal tract including the upper throat, mouth, and nasal cavity.  When a person sings, increasing the pull of the muscles that put vocal cords in tension makes them vibrate faster and produces a higher pitch.
The pharynx located just above the larynx splits the trachea (i.e., the airway or wind pipe to the lungs) and the esophagus (i.e., the food pipe to the stomach).

## English phonemes (elemental sounds)

**English phonemes (elemental sounds)**

| Pure vowels
(unchanging sound) |  |  |  |  | Diphthong vowels
(changing sound) |  |
| --- | --- | --- | --- | --- | --- | --- |
| Notation | Example | Notation | Example |  | Notation | Example |
| ee | heat | ah | father |  | ou | tone |
| I | hit | aw | call |  | ei | take |
| e | head | U | put |  | ai | might |
| ae | had | oo | cool |  | au | shout |
| uh | the |  | ton |  | oi | toil |
|  |  | er | bird |  |  |  |

| Place of articulating the consonant | Manner of articulating the consonant;  (unvoiced) or voiced |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | Plosive |  | Fricative |  | Semi-vowel | Liquids
(“l” = lateral) |  |  | Nasal |
| Labial  (lips) | (p) | b |  |  | w |  |  |  | m |
| Labio-dental  (lips-teeth) |  |  | (f) | v |  |  |  |  |  |
| Dental  (teeth) |  |  | () | th |  |  |  |  |  |
| Alveolar  (gums) | (t) | d | (s) | z | y | l | r |  | n |
| Palatal  (hard front roof) |  |  | (sh) | zh |  |  |  |  |  |
| Velar (soft back roof) | (k) | g |  |  |  |  |  |  | ng |
| Glottal  (glottis in back) |  |  | (h) |  |  |  |  |  |  |

**Notes:**
Speech recognition and speech synthesis are very important applications of acoustic signal processing.  Speech recognition involves programming a computer to determine what words are being spoken based on digitized samples of an acoustic signal.  Speech synthesis involves programming a computer to generate spoken words on a loudspeaker or earphone based on the text of the message to be spoken, which is especially helpful for people who are sight-impaired.
In order to discuss these applications, it is first necessary to understand that sentences consist of words, which consist of syllables, which consist of elemental sounds called phonemes.  The 3 tables on this slide show the phonemes used to speak English.  Other languages may use different phonemes.
All vowel phonemes and some consonant phonemes are “voiced”;  that is, they are produced while the vocal cords vibrate to emit pulses of air which resonate through the upper vocal tract.  Some consonant phonemes are “unvoiced”;  that is, they are produced by blowing air past relaxed vocal cords that do not vibrate significantly.  These tables ignore the fact that all whispered phonemes are unvoiced.
Vowels are classified as “pure” if their spectral content (that is, power at various frequencies) remains essentially constant as they are spoken, or else vowels are classified as “diphthongs” if their spectral content changes while being spoken.
The bottom table shows how consonant phonemes can be classified by whether they are unvoiced or voiced, by the way they are produced (such as “plosives” that suddenly release air, “fricatives” that force air through a constricted gap, or “nasal” phonemes that expel air through the nose while the mouth is closed), and by where in the vocal tract they are produced.

## Phonetic speech mouth, formants, wave, and spectrum

**Phonetic speech mouth, formants, wave, and spectrum**

**Notes:**
The left and right figures on this slide are both based on the book  Speech Synthesis: An Experiment in Electronic Speech Production  by Cecil H. Coker, Peter B. Denes, and Elliot N. Pinson, Bell Telephone Laboratories, © 1963.
The mouth and resonance spectra on the left side of this slide are from page 66 of that book.
The top time-domain waveform and spectrum on the right side of this slide are slightly edited from Fig. 4.18 (b) on page 68 of that book.
The lower two time-domain waveforms and spectra on the right side of this slide are slightly edited from Fig. 4.17 (a) and (b) on page 67 of that book.
The shape of the vocal tract for the phoneme “I” (as in “hit”) shown at the upper left has one formant (or resonance) with high magnitude at low frequency, plus two formants with lower magnitudes at higher frequencies.
The phoneme “aw” (as in “call”) shown at the middle left has two formants with high magnitude and low frequencies, plus one formant with lower magnitude at higher frequency.
The phoneme “oo” (as in “cool”) shown at the bottom left has three formants whose magnitudes decrease as their frequencies increase.
Each of the 3 plots in the 3rd column shows sound pressure versus time for about 24 milliseconds.  Therefore, the top 2 plots each show the response of the vocal tract to about  (0.024 s) (90 pulses/s)  2 pulses  of the vocal cords, and the bottom plot shows the response to about  (0.024 s) (150 pulses/s)  4 pulses  of the vocal cords.
In the spectral plots at the far right column, the vertical lines under the formant curves of the top and middle plots are spaced 90 Hz apart, while the vertical lines of the bottom plot are spaced 150 Hz apart.  The 3 formants for “uh” in the top spectral plot (for the phoneme “uh” as in “the”) have greater magnitude at higher frequencies compared with the 3 formants in the middle and bottom spectral plots (for the phoneme “ah” as in “father”).

## Phonetic speech recognition and synthesis

**Phonetic speech recognition and synthesis**

**Notes:**
The left and right figures on this slide are both based on the book  Speech Synthesis: An Experiment in Electronic Speech Production  by Cecil H. Coker, Peter B. Denes, and Elliot N. Pinson, Bell Telephone Laboratories, © 1963.
The labeling of the graph on the left side of this slide showing clustering of the first and second formant frequencies for a variety of vowels is slightly edited from page 92 of that book.
The labeling of the spectrograms on the right side of this slide is slightly edited from page 98 of that book.  The 3 spectrograms in the top row show that the magnitude (shown by the darkness of the spectrogram signal) stays essentially constant with time for each of the 3 pure vowels “ee” as in “heat”, “ae” as in “had”, and “ah” as in “father”.  In contrast, the 3 spectrograms in the middle row show that the magnitudes change considerably (increasing or decreasing the magnitudes at various frequencies) with time as each of the 3 diphthong vowels “ai” as in “might”, “au” as in “shout”, and “oi” as in “toil” is pronounced).  The 3 spectrograms in the bottom row show how phonemes are combined into words, including the essentially uniform excitation of a broad range of frequencies (that is, “broadband noise”) for the unvoiced fricative consonant “s” in “seal”.