Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

Chapter 3

Basics of Digital Audio

1 Tadesse Beyene (MSc.) 03/22/2024


Objectives
 To Understand the basic concepts of Audio
 To differentiate Quantization and Transmission of Audio

2 By Tadesse Beyene (MSc.) 03/22/2024


Digitization of Sound
What is Sound?
 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.).

A variety of sound sources:


Source
-- Generates Sound
Air Pressure changes
Electrical -- Loud Speaker
Acoustic -- Direct Pressure Variations

3 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Thedestination receives (sensed the sound wave pressure changes) and has to deal
with accordingly:

Destination
 Receives Sound
 Electrical -- Microphone produces electric signal
 Ears -- Responds to pressure hear sound

Acoustics:
 A branch of science which studies sound.

Decibels(dB):
 It is the measurement of sound pressure (volume).

4 By Tadesse Beyene (MSc.) 03/22/2024


Sound Facts
 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.)

The human Ear detecting Sound

5 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
Wave Characteristics
 Frequency: Represents the number of periods in a second and is measured in hertz
(Hz) or cycles per second.
 Human hearing frequency range: 20Hz to 20kHz (audio)
 Amplitude: The measure of displacement of the air pressure wave from its mean.
 Related to but not the same as loudness

One particular frequency component


6 By Tadesse Beyene (MSc.) 03/22/2024
Principles of Digitization
 Why Digitize?
 Microphones, video cameras produce analog signals (continuous-valued voltages)
 To store audio or video data into a computer, we must digitize it by converting it into a
stream of numbers.

Time

Sound as analog signal

7 By Tadesse Beyene (MSc.) 03/22/2024


Digital Audio

 Digital
audio Is created when you represent the characteristics of a sound wave using
numbers—a process referred to as digitizing.

8 By Tadesse Beyene (MSc.) 03/22/2024


Digitization of Sound
 Digitization is a process of converting the analog signals to a digital signal.
 There are three steps of digitization of sound.
 Sampling: Change from continuous in time to discrete in time.
 Quantization: Change from continuous in value to discrete in value.
 Coding: Code value of sample into 1s and 0s.

9 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
Sampling
 It is a process of measuring air pressure amplitude at equally spaced moments in time,
where each measurement constitutes a sample.
 The quality of digital sound depends on two factors:
Sample Rate: How often samples are taken per second and is measured in kilohertz
(thousands of samples per second)
Sample Size (Bit Depth): how many numbers are used to represent the value of each
sample. Sound is recorded either in 8 bits or 16 bits rate.
 A higher sampling rate implies that more samples are taken during the given time
interval and ultimately, the quality of reconstruction is better.

10 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
Quantization
 Quantization is a process of representing the amplitude of each sample as integers or
numbers.
 How many numbers are used to represent the value of each sample known as sample
size or bit depth or resolution.
 Commonly used sample sizes are either 8 bits or 16 bits.
 An 8-bit sample size provides 256 equal measurement units to describe the level and
frequency of the sound in that slice of time.
 A 16-bit sample size provides 65,536 equal units to describe the sound in that sample
slice of time.
 The value of each sample is rounded off to the nearest integer (quantization) and if the
amplitude is greater than the intervals available, clipping of the top and bottom of the
wave occurs.
11 By Tadesse Beyene (MSc.) 03/22/2024
Cont. …
Encoding
 Encoding converts the integer base-10 number to a base-2 that is a binary number.
 The output is a binary expression in which each bit is either a 1(pulse) or a 0(no
pulse).

12 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Sampling: Divide the horizontal axis (time) into discrete pieces
 Quantization: Divide the vertical axis (signal strength - voltage) into pieces.

For example,
 8-bit quantization divides the vertical axis into 256 levels.
 16 bit gives you 65536 levels. Lower the quantization, lower the quality of the sound

 Linear vs. Non-Linear quantization:


 If the scale used for the vertical axis is linear we say its linear quantization;
 If its logarithmic then we call it non-linear (-law or A-law in Europe).
 The non-linear scale is used because small amplitude signals are more likely to
occur than large amplitude signals, and they are less likely to mask any noise.

13 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Sampling and Quantization

Sample
Sample

Time

Time

3-bit quantization
Sampling  3-bit quantization gives 8 possible sample
 Sampling rate: Number of samples values
per second (measured in Hz)  E.g., CD standard audio uses 16-bit
 E.g., CD standard audio uses a quantization giving 65536 values.
sampling rate of 44,100 Hz (44100  Why Quantize?
samples per second)  To Digitize!

14 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Sampling  Quantizing AND CLIPPING

15 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Quantization Error/Noise - The difference between sample and the value assigned to
it is known as quantization error or noise.
 Signal to Noise Ratio (SNR) - Signal to Ratio refers to signal quality versus
quantization error. Higher the Signal to Noise ratio, the better the voice quality.
Working with very small levels often introduces more error. So instead of uniform
quantization, non-uniform quantization is used as companding. Companding is a
process of distorting the analog signal in controlled way by compressing large values
at the source and then expanding at receiving end before quantization takes place.

16 By Tadesse Beyene (MSc.) 03/22/2024


Typical Audio Formats
 Audio format defines the quality and loss of audio data. Based on application
different type of audio format are used. Audio formats are broadly divided into three
parts:
 Uncompressed Format
 Lossy Compressed format
 Lossless Compressed Format
 1. Uncompressed Audio Format:PCM – It stands for Pulse-Code Modulation. It
represents raw analog audio signals in digital form.
 It is the most common audio format used in CDs and DVDs
 WAV – It stands for Waveform Audio File Format
It is compatible with both Windows and Mac.
 AIFF – It stands for Audio Interchange File Format.
 It is compatible with both Windows and Mac.

17 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Lossy Compressed Format: It is a form of compression that loses data during the
compression process.
 MP3 – It stands for MPEG-1 Audio Layer 3.
 Main aim of MP3 is to remove all those sounds which not hearable or less noticeable by humans
ears. Hence making size of music file small. MP3 is like universal format which is compatible
almost every device.
 AAC – It stands for Advanced Audio Coding.
 It is the standard audio compression method used by YouTube, Android, iOS, iTunes, and
PlayStations.
 WMA – It stands for Windows Media Audio.
 It was designed to remove some of the flaws of MP3 compression method. In terms of quality it
is better than MP3. But is not widely used.

18 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
 Lossless compression: This method reduces file size without any loss in quality.
 But is not as good as lossy compression as the size of file compressed to lossy
compression is 2 and 3 times more.
 FLAC – It stands for Free Lossless Audio Codec. It can compress a source file by up to 50%
without losing data. It is most popular in its category and is open-source.
 ALAC – It stands for Apple Lossless Audio Codec.
 It was developed by Apple.

19 By Tadesse Beyene (MSc.) 03/22/2024


Audio Quality vs. Data Rate

Quality Sample Rate Bits Mono/ Data Rate Frequency


(kHz) pe Stereo (kBytes/sec) Band
r (uncompressed)
Sample

Telephone 8 8 Mono 8 200-3400 Hz

AM Radio 11.025 8 Mono 11.0 540-1700


KHz

FM Radio 22.050 16 Stereo 88.2

CD 44.1 16 Stereo 176.4 20-20000 Hz

DAT 48 16 Stereo 192.0 20-20000 Hz

20 By Tadesse Beyene (MSc.) 03/22/2024


MIDI
Musical Instrument Digital Interface
 a protocol that enables computer, synthesizers, keyboards, and other musical devices to communicate
with each other.
 Setup:
 MIDI OUT of synthesizer is connected to MIDI
IN of sequencer.
 MIDI OUT of sequencer is connected to MIDI
IN of synthesizer and "through" to each of the
additional sound modules.
 Working:
 During recording, the keyboard-equipped
synthesizer is used to send MIDI message to the
sequencer, which records them.
 During play back, messages are sent out from the
sequencer to the sound modules and the
synthesizer which will play back the music.

21 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …
MIDI Format
Information traveling through the hardware is encoded in MIDI data format.
The encoding includes note information like beginning of note, frequency and sound
volume; upto 128 notes
The MIDI data format is digital
The data are grouped into MIDI messages
Each MIDI message communicates one musical event between machines. An event
might be pressing keys, moving slider controls, setting switches and adjusting foot
pedals.
10 mins of music encoded in MIDI data format is about 200 Kbytes of data. (compare
against CD-audio!)

22 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …

23 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …

24 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …

25 By Tadesse Beyene (MSc.) 03/22/2024


Cont. …

26 By Tadesse Beyene (MSc.) 03/22/2024


Cont. … Chapter-Three
Basics of Digital Audio

You might also like