cs525 logo
animation ranibow gif

Audio Processing
by Edward Chow

Reference: Material here adapted from the following Related web pages and literature.

Element of Sound Material here adapted from “Modern Audio Technology” by Martin Clifford, 1992, Prentice Hall, and “Data and Computer Communications”, by William Stallings, 4th edition, 1994, Macmillan.

Hearing-response Characteristics

Basic characteristics of a sound wave

Harmonics and Tone Color

The same note play on different musical instruments generate different tone.
The harmonics composed in tones make them different.

Here are some math related to the harmonics

Example of periodical signals

Example of phase difference

Time domain and frequency domain

Fletcher-Munson Curve

Human hearing does not have flat frequency response.
More audio energy is needed for low and high audio frequencies to produce the same sensation of loudness as for midrange tones.
But once it is too loud, the “sensation” of loudness is relatively uniform.

Noise and frequency range of musical instruments

Sound Measurement

The Decibel is used for comparing strengths of a pair of acoustical or electrical powers, voltages, currents. It is a ratio not specific absolute value.
db formula
where PRL is strength of the reference signal and P1 is the strength of signal to be compared.

When P1=3.1PRL, dB=20*Log10(3.1PRL/PRL)=20*Log10(3.1)=20*0.49993=9.827 ~ 10. If we use 3.162 instead 3.1, it will closer to 10.

Measurement of Sound Pressure

bar (barometric)- an CGS unit of atmospheric pressure
= 106 dyn/cm2.
= 14.7 lb/in2 at sea level
The sound pressure received by microphone is much smaller and is measured in terms of a millionth of an atmosphere or in microbars.
a threshold of hearing begin ~ 0.0002 mbar.
Dyn is defined as the force that will produce a velocity of 1 cm/sec when acting on a mass of

Microphone Measurements

Sound range in dBs

Digital vs. Analog

Reality: signal got distorted over distance because

  1. impedance (within transmission medium)
  2. interference (outside force, e.g. cloud, lightening)

 Data Encoding and Modulation

Modulation of analog signals for digital data

Pulse Code Modulation (PCM)

Quantization error can be reduced by having higher sampling rate (sample more frequently) and more quantization level (more bits for each sample).

Example: With Stereo, 16 bits/sample, 44kHz sampling rate, PCM encoding, how many bits of data will be generated by a three minute sound recording?
Ans: 3min*60sec/min*44000samples/sec*16bits/sample*2(channel)/8bits/byte=31.68MB/s


Sub Band Coding (SBC) MP3: MPEG Audio Layer 3 Audio Recording and Editing Tool: Adobe Audition

Audition can save sound as .wav or .mp3 but not .ra file. Real Audio encoding considers the speed of the transmission media and provides even higher compression ratio. See the example below. It is more than 5:1 ratio.

To convert among wave, mp3, to rm audio file, you can use file converter such as mp3 rm converter, http://www.mp3towav.org/MP3-RM-Converter/

To play back real audio file, download the basic real player 10 from http://www.real.com/.

Here are three sample audio files generated by CoolEdit an earlier version of Audition:
Vincent singing 176KB, au format and

Vincent singing, 178KB, wav format,

Vincent singing, 113KB, mp3 format and

Vincent singing, 33KB, realaudio format,



  1. With mono, 16 bits, 22kHz, PCM encoding, how many bytes of data will be generated by a three minute sound recording?
  2. Use Audition to record a less than 5 second voice with mono, 16 bit, 22kHz, encoding. Edit out the unnecessary silence portion of the sound track and apply the normalized special effect. Save it in .wav file and .mp3 formats. sFtp the two audio files to your cs525 home page directory and create a hyperlink in your class personal web page.
  3. In EN233/EN138/A210 lab, we have MATLAB software package which allows to specify waveform and generate the correponding audio wave file for testing. We can use it to verify the audio masking concept used in MP3. The following MATLAB code from Mirinal Mandal's "Multimedia Signals and Systems" textbook example 2.1 will generate three wave files that demo strate the audio masking concept.

    fs=44100; % sampling frequency
    nb=16; % 16-bit/sample
    sig1=0.5*sin(2*pi*(2000/44100)*[1:1*44100]); % 2000 Hz, 1 sec audio
    sig2=0.5*sin(2*pi*(2150/44100)*[1:1*44100]); % 2150 Hz, 1 sec audio
    sig3=[sig1 sig1+sig2]; % 2000 Hz and 2150 Hz tones are equally strong
    sig4=[sig1 sig1+0.1*sig2]; % 2000 Hz is 20dB stronger than 2150 Hz
    sig5=[sig1 sig1+0.01*sig2]; % 2000 Hz is 40dB stronger than 2150 Hz
    wavwrite(sig1, fs, nb, 'C:\work\cs525\S2010\chow\sig1.wav');
    wavwrite(sig2, fs, nb, 'C:\work\cs525\S2010\chow\sig2.wav');
    wavwrite(sig3, fs, nb, 'C:\work\cs525\S2010\chow\test1.wav');
    wavwrite(sig4, fs, nb, 'C:\work\cs525\S2010\chow\test2.wav');
    wavwrite(sig5, fs, nb, 'C:\work\cs525\S2010\chow\test3.wav');

    Follow the following step to generate the wave files.