Objectives Level Prerequisites Platform Instructor's Notes Credits

Waves come in many different forms.

Used with permission
all rights reserved.

See auxiliary resources.

Click here for an acoustic wave!

DEMOS with POSITIVE IMPACT, www.mathdemos.org


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.

Instructor's Notes

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.

Prior to outward flex.

After outward flex.

Figure 1.

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.

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

Thus whether you specify the coefficient B in or the frequency f in the sound wave that is generated will be the same. To execute or download an Excel file that lets you experiment with the acoustics form of the sine wave equation click on the Excel screen shown in Figure 4.

Figure 4.

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."
Source: http://searchsmb.techtarget.com/sDefinition/0,,sid44_gci213473,00.html

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.

Figure 5.

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?

Figure 6.

Excel Activity:
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.

function [t,y]=sine_tone(nfreq,fname)
%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.

Figure 6.

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.

Figure 7.

Auxiliary Resources:

1. The physics of hearing at http://www.audioholics.com/techtips/audioprinciples/interconnects/PhysicsofHearing.html
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.

Demos with Positive Impact
Web Address: http://mathdemos.org
DRH 8/15/2005     Last updated 5/24/2006
Visitors since 12/24/2005