You are on page 1of 22

Multimedia Systems

Lecture 6
Definition of sound
• It is basically a pattern formed in the vibration or movement of
molecules of air. When a sound is made, air molecules move out from
the source in waves (compressed and expanded under the action of
some physical device).
• Sound is a physical phenomenon produced by the vibration of matter.
• Sound is a continuous wave that travels through the air.
• The wave is made up of pressure differences.
• Sound is detected by measuring the pressure level at a location.
• Sound waves have normal wave properties (reflection, refraction,
diffraction etc.)
Definition of sound
• sound consists of measurable pressures we
can detect it by measuring the pressure
level at a location, using a transducer to
convert pressure to voltage levels.
• The amplitude value is a continuous
quantity. Since we are interested in
working with such data in computer
storage, we must digitize the analog
Analog signal: continuous
signals. measurement of pressure wave
• Continuously varying signals are
represented by analog signal.
Analog and Digital audio

• Analog refers to a continuously changing representation of a continuously


variable quantity.
• Digital, however, refers to representing these variable quantities in terms
of actual numbers, or digits.
Example:
• If you consider the numbers 1 and 2 on a number line, there are actually an
infinite number of points between 1 and 2. This is what analog
represents—the infinite number of possibilities between 1 and 2.
• Digital, on the other hand, only looks at a certain number of fixed points
along the line between 1 and 2 (for example, 1 ¼, 1 ½, 1 ¾, and 2).
Analog and Digital audio
• Signal is a continuous function f in the time domain. For value y=f(t), the argument t of
the function represents time. If we graph f, it is called wave.

• The waveform in repeats the same shape at regular intervals and this portion of the
waveform is called a period.
• A waveform with a clearly defined period occurring at regular intervals is called a
periodic waveform.
• Since they occur naturally, sound waveforms are never as perfectly smooth nor as
uniformly periodic.
Analog and Digital audio
• A wave has three characteristics: Amplitude, Frequency, and Phase.

❖ Amplitude: is the intensity of signal. This is can be determined by looking at the height
of signal. If amplitude increases, the sound becomes louder. Amplitude measures the
how high or low the voltage of the signal is at a given point of time.

❖ Frequency: is the number of times the wave cycle is repeated. This can be determined
by counting the number of cycles in given time interval. Frequency is related with
pitchness of the sound. Increased frequency= high pitch.

• Phase: related to the wave appearance. The wave’s phase is its position along the x-axis.
For a periodic waveform, the phase tells you the point along its shape where the wave’s
pattern begins.
Analog and Digital audio

• Amplitude
• A sound also has an amplitude (loudness). The amplitude of a sound
is the measure of the displacement of air pressure from its mean. The
greater the amplitude, the louder the sound. Measured in decibels.
0 db - essentially no sound heard
35 db - quiet home
70 db - noisy street
120db - discomfort
Analog and Digital audio
• Frequency
• The frequency of a sound is the reciprocal value of the period(T); it represents
the number of times the pressure rises and falls, or oscillates, in a second and is
measured in hertz (Hz) or cycles per second (cps).
• The frequency range of normal human hearing extends from around 20 Hz up to
about 20 kHz. Represents the number of periods in a second and is measured in
hertz (Hz) or cycles per second.
• Wavelength is the distance travelled in one cycle 20Hz is 56 feet, 20KHz is 0.7 in.
• Frequency represents the number of periods in a second (measured in hertz,
cycles/second).
• Human hearing frequency range: 20Hz - 20Khz, voice is about 500Hz to 2Khz.
Analog and Digital audio

• The frequency range is divided into:


Infrasound from 0 - 20 Hz
Human range from 20Hz - 20KHz
Ultrasound from 20kHz - 1GHz
Hypersound from 1GHz - 10THz

• Hertz (Hz) = number of cycles per second ,


• KHz = 1000Hz,
• MHz = 1000 KHz
Analog and Digital audio

• Phase

• “phase” describes a position, measured in degrees, within a single cycle of a sine


wave.
• Phase specifies the location or timing of a point within a wave cycle of a
repetitive waveform.
• When two sound waves are added, the difference between the phases of the
two waves is important in determining the resulting waveform.
• Phase
• Two sound waves of the same frequency that are perfectly aligned have a phase
difference of 0 and are said to be “in phase.”
• Two waves that are in phase add to produce a sound wave with an amplitude
equal to the sum of the amplitudes of the two waves. This process is called
“constructive interference.”
• Phase
• If one of the two sound waves of the same frequency is shifted by one-half cycle,
so that one wave is at its maximum amplitude while the other is at its minimum
amplitude, the sound waves are said to be “out of phase.”
• Two waves that are out of phase exactly cancel each other when added together.
This principle, which is used in noise-cancelling headphones, is called
“destructive interference”.
Analog to Digital Conversion

• Converting an analog audio to digital audio requires that the analog signal is
sampled.
• Sampling is the process of taking periodic measurements of the continuous
signal.
• Samples are taken at regular time interval, i.e. every T seconds.
• How often these samples are taken is referred to as sampling rate.
• The amount of information stored about each sample is referred to as sample
size.
Analog to Digital Conversion
• The mechanism that converts an audio signal into digital samples is
called an analog-to-digital converter, or ADC.
• To convert a digital signal back to analog, you need a digital-to-analog
converter, or DAC.
• A transducer converts pressure to voltage levels.
• Discretization both in time and amplitude (quantization).
• A computer measures the amplitude of the waveform at regular time
intervals to produce a series of numbers (samples).
Sampling means measuring
the value of the signal at a
given time period. The
samples are then quantized.

Quantization is rounding
the value of each sample to
the nearest amplitude
number in the graph.

For example, if amplitude of


a specific sample is 5.6, this
should be rounded either
up to 6 or down to 5.
Sampling Audio
• Sample Rate:
• In digital audio recordings, sample rate is analogous to the framerate
in video. The more sound data (samples) gathered per period of time,
the closer to the original analog sound the captured data becomes.
• we must choose a sample rate high enough to represent all of these
frequencies that fall within the range of human perception, generally
accepted as 20Hz-20KHz.
• Because every cycle of a waveform has both a positive and negative
amplitude we need at least two samples for every cycle resulting in a
sample rate of at least 40 KHz.
Sampling Audio
sample resolution
• The accuracy is dependent on the number of
bits used to represent the amplitude, which is
also known as the sample resolution.

Bit Rate
• Bitrate (or bit rate, if you prefer) refers to the
number of bits conveyed or processed per
second, or minute, or whatever unit of time is
used as measurement.
Stereo vs Mono signals
• Mono signals are recorded and played back using a single audio
channel, while stereo sounds are recorded and played back using two
audio channels.
• Stereo audio files, such as stereo MP3 and WAV files, contain left
channel and right channel information that tell the left and right
speaker when to push and pull air.
• Stereo systems are capable of creating the impression of sound
source localization. Sound source localization refers to the human
ability to locate the position of a sound source within a space.
Sample Size
• The amount of memory required to store t seconds long sample is as follows:

Sample rate (in hertz not kilohertz) x Number of seconds x Bit rate x Number of channels =
total bits

• If we use 8 bit resolution, mono recording memory = f * t* 8* 1


• If we use 8 bit resolution, stereo recording memory = f * t* 8* 2
• If we use 16 bit resolution, and mono recording memory = f *t* 16* 1
• If we use 16 bit resolution, and stereo recording memory = f * t* 16* 2

Where f is sampling frequency and t is time duration in seconds


Total bits/8 = bytes
Bytes/1,000,000 = megabytes or MBs
Sample Size
Example: An audio is sampled for 10 seconds How much storage space is required if:
a) 22.05 KHz sampling rate is used, and 8 bit resolution with mono recording?
b) 44.1 KHz sampling rate is used, and 8 bit resolution with mono recording?
c) 44.1 KHz sampling rate is used, 16 bit resolution with stereo recording?
d) 11.025 KHz sampling rate, 16 bit resolution with stereo recording?

• Solution:
a) m=22050*8 *10*1 = 1764000 bits = 220500 bytes = 220.5 KB
b) m=44100 *8 *10 *1 = 3528000 bits = 441000 bytes = 441KB
c) m=44100* 16*10* 2 = 14112000 bits = 1764000 bytes= 1764KB
d) m=11025* 16* 10* 2 = 3528000 bits = 441000 bytes= 441KB

You might also like