Proposal
WWW has grown fast since its introduction to the world in the early 1990s.
It has enlarged its application fields and many people use it as a tool.
The Education may be a exact the example of the application field. Web
page can be used as a tool for teaching acoustics. Acoustics is not easy
to understand the concept with reading books and listening the instruction.
This application shows the basic idea of acoustics with audio and visual
demonstration. It will make people easy to understand acoustics.
To explain about acoustics, much principles should be described including
loudness, timbre, sound velocity, psychophysical variables and pitch.
However, only some basic concepts like phase, amplitude and frequncy are
illustrated in this project. Japa applet is used for implementation of
sound generating and graph displaying.
Project Report
Structure
-
Explanation of acoustics part
This part describes the concept of acoustics with HTML.
-
Select Sound Generator part
This part invokes the sound generator using perl. There are two
choices. Single wave shows a sound graph with multple choice.
Sine, Rectagluar or Triangle wave can be selected. It will explain
about kinds of sound waves and make a second length sound.
This HTML can be implemented with clicking on
.
-
Sound Generator part
This part shows single graph or combined graph. User can adjust phase,
amplitude and frequency with clicking each buttons. "<" button will
decrease the phase and ">" will increase as amount of 1/8 period.
"-" button will reduce the current amplitude as 10%. "+" button
will increase as 10% ratio. "L" button will change frequency down 10%
of current frequency and make sound low. "H" button will change
frequency 10% up. 'Combine' button of double sound generator will
produce a new sound wave with caclulate the mean value of two graphs.
It does not mean the mix of two different sound but generating a new
patern. 'Play' button will makes a sound. It will make user easy to
understand the relation between the shape of graph and actual sound.
Sound Generator
- Design Factors
- Sampling Frequency
- 8000 Hz. An "au" file format supports this frequency.
- Default Frequency
- It has been designed the default period 2 * PI * 5.
So, the default frequency is about 254.6 Hz
( 8000 / (2 * PI * 5)).
- The rate of increase/decrease.
- All the factor of increase/decrease are fixed as 0.1.
So, it will be changed 10 %
when an adjustment button is clicked.
- The order of Sound generating
- Measure the amplitude at the particular point.
- Get the ratio of height comparing to the height of drawing canvas.
It reflects the ratio of the amplitude.
- Convert the amplitude as 16 bit linear value.
- The first value of the amplitude just reflects the ratio to height
of canvas. It could be converted as 16 bits with multiplying 2^15 or
-2^15. Unlike the actual displaying waves, the actual sound value has
the reverse sign. It dues to the graphic coordination. (Topleft corner
is the origin and no negative.) I did not adjust it because it hardly
affects the actual sound.
- Convert 16 bit linear value to mu-law value.
- Using the mu-law conversion formular, 16 bit linear value can be
converted as mu-law 8 bit value.
- Collect the 8 bit mu-law value as many as 8000 and play it.
- 8000 means the 1 second length sound because 8000 Hz sampling
frequency has been used.
Used Web Technology and Sources
HTML
Java Script
Perl
- sound.pl
- perl for selecting the sound generator.
Java
Used tools
Reference
Acoustics
Mu-law audio file format

Go back to project page