To develop the connection between sine waves and the sounds that they can generate. (This is an elementary example of sonification; see the auxiliary resources.)
Return to Top.
This demo can be used at the precalculus or calculus level. It may also be used in introductory courses on speech and hearing.
Return to Top.
Familiarity with the graphs of sine functions and the properties of amplitude, period, and phase shift together with knowledge of angular measure in degrees and radians. Basic knowledge of Excel if the included interactive Excel worksheet is used. Basic knowledge of MATLAB if the included MATLAB experiments are used.
Return to Top.
Portions of the demo can be done within a browser. Excel or MATLAB are needed if the accompanying activities are used.
Return to Top.
Background on sound:
The trigonometric functions of sine and cosine are used to build models for processes that repeat in cycles or involve oscillations. Typical biological examples that involve oscillations are heartbeats and breathing. Examples that involve cycles include the daily and seasonal cycles of the earth, population cycles, and tides. What we refer to as sound, and experience as noise, music, and speech, etc., involves oscillations. An object produces sound when it vibrates in a solid, liquid, or gas. The situation we focus on in this demo is the sounds we hear made by an object vibrating in our atmosphere. So the sound will be traveling through air.
When an object vibrates is flexes in and out. This mechanical movement affects the surrounding air particles such that the outward movements causes the particles to compress (move closer to one another), while the inward movement causes the particles to move away from one another, which is called a rarefaction. This sets up high pressure and low pressure regions respectively. The alternating outward and inward flexing causes a series of high then low pressure regions that forms a pressure wave. As this pressure wave hits our ear drum its mechanical energy is converted to signals which are brain can be trained to interpret.
Compression is a slightly higher pressure than the surrounding air, rarefaction is slightly lower. The simplest sound would consist of what we would hear as a "pure tone," and would consist of a gentle smooth curve which would increase to a maximum level and then decrease to a minimum level and back again. If such a curve was graphed it would strongly resemble a sine wave. The pure tone is the sort of sound produced by a very simple physical oscillating device, like a tuning fork.
There are three very good sites that summarize the action of a pressure wave and provide animations. We provide a summary of these sites together with a link to each of them.
This site shows a vibrating bell and animates the pressure wave as the bell is rung to show the compression/rarefaction cycles. See Figure 1. The animation is nicely done. There is also a brief discussion of the frequency, pitch, and amplitude. We discuss these concepts in detail below.
Prior to outward flex.
After outward flex.
This site consists of four pages:
1. Introduction to what sound is
2. Sounds: Allow the wave to expand
3. How We Hear
4. Play Some Pure Tones
Pages 1-3 each have a simple informative animations together with a nice focused discussion. On page 4 you can hear selected tones. In this demo we explain the wave form for such tones and provide an opportunity to create tones.
This site consists of a collection of Flash files that cover the topics, What is sound?, Sound Waves, Wave Equation, and Wave Behavior. In addition, there is a segment about a Recording Studio and another on the Science of Sound. The site also includes an extensive index of key words and phrases that references portions of the Flash files. This site has some excellent animations and with clear explanations that include visual components. For example, to illustrate a wave there is an animation of a 'human wave'; a sample of which appears in Figure 2.
Review of sine waves:
For an introduction to the generation of the graphs of sine and cosine by 'wrapping' around a circle click here to go to our Circular Functions demo. Here we interested in the family of functions of the form
|A| = amplitude, which is half the distance between the maximum and minimum values.
The period is and is the smallest time t needed for the function to execute on complete oscillation or cycle.
is called the phase shift and represents a horizontal shift of the sine curve by the amount .
As A, B, and are varied the shape of the sine wave changes. To execute or download an Excel file that lets you vary each of these parameters click on the Excel screen shown in Figure 3.
To see animations of varying the parameters one at a time, click one of the following: Amplitude animation, Period animation, Phase Shift animation. These animations can be used for classroom demos; the axes a labeled with multiples of and labels change indicating the value of the parameter. These animations as gif and QuickTime files can be download as a zipped file by clicking here. For an animated Excel file that demonstrates the change of amplitude in a sine wave click here and for another Excel file that demonstrates the change of period click here.
The language of mathematics for describing sine waves and that used by acoustic engineers, physicists, and the speech and hearing sciences varies somewhat. This section provides connections for the terminologies used by these different groups.
Frequency: The number of times something is repeated. In acoustics, it refers to the number of complete sound waves that pass a given point in a given time. Usually measured in Hertz (one cycle per second). Typically refers to the pitch of a sound, how high or low it is. The higher the number, the higher the pitch.
Source: Church Audio & Acoustics Glossary
Hertz: The unit of frequency, abbreviated Hz. The same as cycles per second. The measure of how long it takes one complete (sound) wave to pass by a given point.
Pitch: We use the term pitch to be the same as (the fundamental) frequency. Its meaning can vary depending upon whether you are processing sound or working in psychoacoustics where it is taken to mean an auditory (subjective) attribute.
Amplitude: The amplitude of a sound wave is most commonly characterized by its sound pressure which is related to how loud the sound is registered to the ear. The larger the amplitude the louder the sound generated. For more details on this acoustic characteristic go to http://en.wikipedia.org/wiki/Acoustics .
In acoustics an expression for a sine wave is often written in the form
where f is the frequency of the wave measured in Hertz. Comparing the mathematical form with this acoustical form we see that hence we have
Sounds from Sine Waves:
The upper and the lower limits of the audible frequency range for the human ear is about 20 to 20,000 Hz. The actual range for an individual depends on many factors such as the age of the listener and the physical environment. In this demo we will use "wave" files which are described as follows.
"A Wave file is an audio file format, created by Microsoft, that has become a standard PC audio file format for everything from system and game sounds to CD-quality audio. A Wave file is identified by a file name extension of WAV (.wav). Used primarily in PCs, the Wave file format has been accepted as a viable interchange medium for other computer platforms, such as Macintosh. This allows content developers to freely move audio files between platforms for processing, for example."
We will provide a set of wave files for common frequencies that can be used for demonstrations. In addition, we provide an interactive Excel program that can be used to create files or have your students create files. A MATLAB routine for creating wave files is also included with some suggestions for experiments.
The frequencies for musical notes for an equal tempered scale can be found at http://www.phy.mtu.edu/~suits/notefreqs.html .
"The 'equal tempered scale' was developed for keyboard instruments, such as the piano, so that they could be played equally well (or badly) in any key. It is a compromise tuning scheme. The equal tempered system uses a constant frequency multiple between the notes of the chromatic scale. Hence, playing in any key sounds equally good (or bad, depending on your point of view).' Source: http://www.phy.mtu.edu/~suits/scales.html For additional information on scales see http://www.jimloy.com/physics/scale.htm
Middle C (also called C4) has a frequency of about 261 Hz, G above Middle C (also called G4) has a frequency of about 392Hz, and C above middle C (also called C5) has a frequency of about 523Hz. In Figure 5 click on a note to hear a wave file corresponding to the sine wave equation displayed. As you listen to the wave files note the change in pitch of the notes.
In Figure 6 are two notes of the same frequency. Click on the notes to listen to them. Which note has the has the larger amplitude?
Male voices start with a frequency of about 100Hz, females about 200Hz, and children about 300Hz. This activity involves using the acoustic sine wave equation
and Excel to generate wave files for male, female, and children voice frequencies. Some experience entering equations, dragging to a create column of data, and playing a sound file will be helpful. Directions are included in a set of notes and in Comments imbedded within the Excel worksheet. Click here to access or save the Excel worksheet.
MATLAB Activity and Experiments:
MATLAB contains functions that can create, play, and save wave files. Wave sound files stored in 8-bit or 16-bit format that contain data with amplitude outside the range [-1, 1] are clipped prior to saving the file. Thus for simplicity, in this demo we will set the amplitude to 1 and we set the phase shift f to zero. The MATLAB function sine_tone.m which can be downloaded by clicking here can create and save wave files by specifying the frequency and file name. A brief description of the function follows.
%SINE_TONE A routine to generate pure tone using a sine wave with frequency nfreq.
%INPUT: nfreq = frequency of the tone
% fname = a string with the filename; it can contain folder info
%OUTPUT: <> a graph with several cycles of the wave
% <> a wave file containing the tone with name = fname
% default values of 8000 samples per second & 16 bits per sample
% <> t is the array of time steps
% <> y is the array of the sine wave
%NOTES: <> the time interval is 0 to 8 with steps of 1/8192
% <> several warning messages may appear because of clipping the amplitude to
% be between -1 and 1 when saving the file; these can be ignored
To hear the wave file created by this function with frequency f = 50, click here.
For an activity or lab use function sine_tone.m to create wave files for male voices which start with a frequency of about 100Hz, females about 200Hz, and children about 300Hz, respectively.
Experiment 1. The function sine_tone.m can easliy be modified to create other sounds. The mathematical expression
is an example of a damped sine wave. It has a decreasing amplitude as shown in Figure 6. Click here to hear a corresponding wave file in which we set the frequency to f = 50.
Experiment 2. Another interesting sound is one in which there is an oscillation in the damping. Modify the sine_tone.m function using frequency f = 50 to generate a wave file that corresponds to the mathematical expression
whose graph appears in Figure 7.
1. The physics of hearing at
contains an excellent discussion of general principles of sound waves.
2. For a nice discussion of the human hear go to http://health.howstuffworks.com/adam-200010.htm where there is a very nice narrated Flash animation.
3. See http://health.howstuffworks.com/hearing.htm for a brief discussion of the mechanical phenomenon within the ear that converts sounds to impulses that your brain can process. Another nice discussion on this theme is at http://hep.physics.indiana.edu/~rickv/Ear.html .
4. See http://www.bbc.co.uk/science/humanbody/body/factfiles/hearing/hearing_animation.shtml for a very nice animation that illustrates the interplay between sound, the mechanics of the ear, the conversion to impulses for brain interpretation, and the corresponding determination of the sound source.
5. For a more robust example of generating sounds in Excel see the Realtime Fourier Synthesis - Sound Generation on Erich Neuwrith's site at http://sunsite.univie.ac.at/Spreadsite/fourier/fourtone.htm . His Excel application will allow you to synthesize sounds by playing with the sliders. Mathematically speaking the sliders control the amplitudes of the overtones of the base frequency.
6. Sonification is the use of non-speech audio to convey information. A search in your favorite browser will reveal a large body of work. In particular, the work of Steve Hetzler and Robert Tardiff at Salisbury University on "Integrating Sonification into Calculus Instruction", NSF 0442450 may be of interest. Also the software Goldwave, a digital audio editor http://www.goldwave.com/ can create special effects.
Acknowledgement: Portions of this demo are based
on materials from a project
that is part of Mathematical Foundations
of Speech and Hearing at Indiana University. A special thanks to Diane Kewley-Port,
Professor of Speech and Hearing Sciences and Professor of Cognitive Sciences,
Indiana University, for permission to use the WaveWriter macro which is in an Excel
activity for one of her classes.
Return to Top.
This demo was submitted by David R. Hill, Temple University and is included in Demos with Positive Impact with his permission.
Return to Top.
Web Address: http://www.mathdemos.org DRH 8/15/2005 Last updated 1/2/2006 Visitors since 12/24/2005