You are on page 1of 8

Chapter 6 [Department of IT]

Chapter 6
Basics of Digital Audio
Audio information is crucial for multimedia presentations. It is one of the simplest types of
multimedia data. The element of sound can be important to achieve the goals of a multimedia
product. Sound adds another dimension. If used well, sound is an extremely powerful element
which can stimulate emotional responses that would never be activated from text and graphics
alone. Sound helps convey the intended message or complement the purpose of multimedia
applications. To help ensure effectiveness, it is important to incorporate sound files that are of
high quality, appropriate, and consistent with the goals of the multimedia product.

What is Sound?
Sound is a continuous wave that travels through the air.
Without air there is no sound. 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.). When we speak,
vibrations, called sound waves, are created. Sound waves have
a recurring pattern or an analog wave pattern called a waveform. Humans can hear frequencies
in the range 20 - 20,000 Hz.

Basic Principles of Sound


E A sound wave has several different properties:

Amplitude (loudness/intensity)
Frequency (pitch)
Envelope (waveform)
E Amplitude: Distance between the valley and the peak of a waveform; determines volume.
Volume is measured in decibels (dB) Decibel (dB) is a logarithmic unit used to describe a
ratio. One dB is close to Just Noticeable Difference (JND) for sound level.

E Frequency: Number of peaks that occur in one second measured by the distance between
the peaks; it determines pitch.

1|Page
Chapter 6 [Department of IT]

Audio has normal wave properties: Reflection, Refraction and Diffraction

Why to Digitize?
Sound is required input into a computer. Therefore it needs to sampled or digitized. For
example microphones, video cameras produce analog signals (continuous-valued voltages) as
illustrated in Fig below:

Digitization
To get audio or video into a computer, we have to digitize it (convert it into a stream of
numbers).We need to special hardware Analog-to-Digital Converter for the purpose. Digitization
process involves discrete sampling and quantization methods.

Sampling: The process of converting continuous time


into discrete values. It divides the horizontal axis (the
time dimension) into discrete pieces (fixed intervals).
Reading of the instantaneous value of the analog
signal is taken at the beginning of each time interval
(interval determined by a clock pulse). Frequency of
clock is called sampling rate or sampling frequency.
The sampled value is held constant for the next time
interval Sound samples (the volumes of sound at time instants) cannot be stored precisely.
Instead, only quantified values can be stored. The feasible quantified values are known as
quantization levels

Quantization: The process of converting continuous sample values into discrete values. It
divides the vertical axis (signal strength) into pieces. Sometimes, a non-linear function is applied.
8-bit quantization divides the vertical axis into 256 levels. 16-bit gives you 65536 levels. Size of
quantization interval is called quantization step. The number of quantization levels is related to
the quality of digital audio. The higher the quantization, the better the resulting sound quality. If
more quantization levels are allowed, the difference between the original value and the quantified

2|Page
Chapter 6 [Department of IT]

value will be smaller and we will get a better quality of the digital representation. However, this
would also mean a higher cost for storage and processing of these values inside a computer
(disks of larger capacity and more powerful CPUs are required).

Quantization Example Analog to Digital Conversion

Amplitude Amplitude

Coding: The process of representing quantized values digitally. In fig below, Sound sampling converts
analog sound to digital audio is shown below. Here 4-bit quantization used.

Nyquist's Sampling Theorem


3|Page
Chapter 6 [Department of IT]

The Sampling Frequency is critical to the accurate reproduction of a digital version of an


analog waveform. Nyquist made a study on this aspect and proposed the Nyquist's Sampling
Theorem. It states that the sampling frequency for a signal must be at least twice the highest
frequency component in the signal.
Sound Quality: - Factors that determine the sound quality of digital audio
Sample rate
Number of sound samples taken per second .It is also known as sampling rate

Measured in kilohertz (kHz), Common values: 11 kHz, 22 kHz, 44 kHz

Sample Rate and Bit Size


Audio resolution
Also known as sample size or bit resolution .It is number of binary bits used to
represent each sound sample
As the audio resolution increases, the quality of the digital audio also improves.
Audio resolution determines the accuracy with which sound can be digitized.

4|Page
Chapter 6 [Department of IT]

Common values: 8 bits, 16 bits , CD quality: 16 bits

Signal to Noise Ratio (SNR)


In any analog system, some of the voltage is what you want to measure (signal), and
some of it is random fluctuations (noise).
Ratio of the power of the two is called the signal to noise ratio (SNR).
SNR is a measure of the quality of the signal. SNR is usually measured in decibels (dB).
Each bit adds about 6 dB of resolution, so 8 bits has a SNR of 50 dB and 16 bits has a
SNR of 96 dB.
Practical Implications of Nyquist Sampling Theory
Must (low pass) filter signal before sampling:

We must pass input through a Low Pass Filter before sampling. Otherwise strange
artifacts from high frequency signals appear and are audible.

Decisions on Digitizing Audio:


The questions for producing digital audio (Analog-to-Digital Conversion) are
1. How often do you need to sample the signal?
2. How good is the signal? (i.e. how finely is the data to be quantized and is the quantization
uniform?)
3. How is audio data formatted? (i.e. file format used)
Monophonic vs. Stereo Sound
Monophonic sounds: flat and unrealistic when compared to stereo sounds. Monophonic
sound files are sometimes a more appropriate choice where storage and transfer time are major
concerns. Narration and voiceovers can effectively be saved in a monophonic format.

5|Page
Chapter 6 [Department of IT]

Stereo sounds: much more dynamic and lifelike Music almost always must be recorded and
saved in stereo.
Digital Audio File Size

Audio Compression
Similar to image compression, mathematical algorithms are used to reduce audio file sizes.
File size is the primary consideration when using audio files on the Web. Compression is
beneficial for storing and transferring audio files. Different compression schemes are available
for different file formats, and some file formats include the compression scheme within the
format itself. The compression scheme applied impacts both the quality of audio file and the file
size. A simple and widely used audio compression method is Adaptive Delta Pulse Code

Modulation (ADPCM).

Downloaded vs. Streamed


Web audio is either: downloaded or streamed.
Downloaded audio file must be entirely saved to the users computer before it can be played.
Streaming: a more advanced process that allows audio file to be played as it is downloading (i.e.
before the entire file is transferred to the users computer) .If we want our audio files to be
streamed over the Internet, the web-hosting service must support streaming. If the users

6|Page
Chapter 6 [Department of IT]

computer receives streaming audio data more quickly than required, the excess data will be
stored in a buffer. If the users computer receives streaming audio data slower than required, the
data stored in the buffer will be used. If the buffer becomes empty, the user will experience a
break.
Two types of streamed audio:
On demand: Streamed audio is stored on a server for a long period of time, and is
available for transmission at a users request.
Live: Live streams are only available at one particular time.
Example: live radio program

Digital Audio Software


Traditional sound studio equipment is utilized to
record, mix and edit audio. The cost can be tens of
thousands of dollars. With sound editing and mixing
software, audio files can be produced for much less money.
Examples:
Peak for Macintosh platform
Sound Forge for Windows platform

Adobe Audition for Windows platform formerly called Cool Edit

Basic sound editing operations

Multiple tracks editing: Edit and combine multiple tracks and then merge the tracks and
export them in a final mix to a single audio file.
Trimming: Remove dead air or blank space from the front of a recording and any
unnecessary extra time off the end.

7|Page
Chapter 6 [Department of IT]

Splicing and assembly: Remove the extraneous noises that inevitably creep into a recording.

Volume adjustments: Provide a consistent volume level

Format conversion: Import and save files in various formats

Resampling or down sampling: Increase or reduce sample rates

Fade-ins and fade-outs: Smooth out the very beginning and the very end of a sound file

Reversing sounds: Reverse all or a portion of a digital audio recording

8|Page

You might also like