Overview/Questions How do we hear sounds? How can audio - - PDF document

overview questions
SMART_READER_LITE
LIVE PREVIEW

Overview/Questions How do we hear sounds? How can audio - - PDF document

CS101 Lecture 14: Digital Audio Aaron Stevens 18 February 2009 Some images from www.mediacollege.com, Wikipedia. 1 Overview/Questions How do we hear sounds? How can audio information (sounds) be stored on a computer? How


slide-1
SLIDE 1

1

1

Aaron Stevens

18 February 2009

Some images from www.mediacollege.com, Wikipedia.

CS101 Lecture 14: Digital Audio

2

Overview/Questions

– How do we “hear” sounds? – How can audio information (sounds) be stored

  • n a computer?

– How come you get more music per compact disc in MP3 format than in CD audio format?

slide-2
SLIDE 2

2

3

Analog and Digital Information

Computers are finite! How do we represent an infinite world?

We represent enough of the world to satisfy

  • ur computational needs and our senses of

sight and sound.

4

Analog and Digital Information

We say that information can be represented in one of two ways: analog or digital. Analog A continuous representation, analogous to the actual information it represents. Digital A discrete representation, breaking the information up into finite elements.

slide-3
SLIDE 3

3

5

Analog Information

Example: Analog Thermometer The mercury (or alcohol) rises continuously in direct proportion to the temperature. What exactly is this reading?

6

Digital Information

Example: Digital Thermometer

This reading is discrete. Some

detail is lost in converting to digital information. What is the actual temperature?

slide-4
SLIDE 4

4

7

Analog and Digital Information

Computers store information in a discrete form (binary). To represent analog information, we need to digitize the data.

Digitizing

Creating a discrete representation of analog data, suitable for storage and manipulation by a digital computer.

8

Hearing

We “hear” sound when a series of air compressions vibrate a membrane in our ear. The inner ear sends signals to our brain. The rate of this vibration is measured in Hertz, and the human ear can hear sounds in the range of roughly 20Hz - 20KHz.

slide-5
SLIDE 5

5

9

Microphones and Speakers

Microphones convert acoustical energy (sound waves) into electrical energy (the audio signal). Speakers do the same thing in reverse: convert electrical energy into acounstical energy.

10

Sound Wave Properties

Wavelength: distance between waves (affects pitch -- high or low sounds) Amplitude: strength of power of waves (volume) Frequency: the number of times a wave

  • ccurs in a second.
slide-6
SLIDE 6

6

11

Audio Playback

A stereo sends an electrical signal to a speaker to produce sound. This signal is an analog representation of the sound wave. The voltage in the signal varies in direct proportion to the sound wave.

12

Important Note about Electronic Signals

An analog signal continually fluctuates in voltage up and down. A digital signal has only a high

  • r low state, which we model

as binary digits.

slide-7
SLIDE 7

7

13

Digitizing Audio Information

How can we store this continuous information in a finite machine? Digitize the signal by sampling:

– periodically measure the voltage – record the numeric value

14

Representing Audio Information

Sampling: periodically measure the voltage and record the numeric value. Some data is lost, but a reasonable sound is reproduced.

slide-8
SLIDE 8

8

15

Representing Audio Information

History of Sony’s music technology:

http://www.youtube.com/watch?v=V5I41PdAK0Y (6 minutes)

 part 1: walkman, headphones invented  part 2: digital audio: compact disc replaces vinyl and magnetic tape

16

Representing Audio Information

Digitize the signal by sampling

– periodically measure the voltage – record the numeric value

How often should we sample? A sampling rate of about 40,000 times per second is enough to create a reasonable sound reproduction

slide-9
SLIDE 9

9

17

Representing Audio Information

Compact Discs store audio information digitally. On the surface of the CD are microscopic pits that represent binary digits. A low intensity laser is pointed as the disc The laser light reflects

– strongly if the surface is smooth, and – poorly if the surface is pitted

18

CD Audio

http://electronics.howstuffworks.com/cd.htm

A CD player reading binary information

slide-10
SLIDE 10

10

19

Representing Audio Information

Compact Disc audio is encoded by sampling:

– 44,100 samples per second – 16 bits per sample per channel (2 channels) – thus: 44,100 * 16 * 2 = 1,411,200 bps – Or about 10,600,000 bytes per minute

CD Audio uses about 10 megabytes per minute of audio.

20

Digital Audio Formats

Audio Formats

– CDA, WAV, AU, AIFF, VQF, and MP3

MP3 (MPEG-2, audio layer 3 file) is dominant

– analyzes the frequency spread and discards information that can’t be heard by humans. – bit stream is compressed using a form of Huffman encoding to achieve additional compression. Is MP3 a lossy or lossless compression (or both)?

slide-11
SLIDE 11

11

21

Representing Audio Information

MP3 is compressed audio

– 128kbps ~ 128,000 bits per second – Or about 960,000 bytes per minute

Compare to CD Audio – 10,600,000 bytes per minute! A CD holds about 700 MB (700,000,000 bytes)

– About 70 minutes of CD audio format – Or about 700 minutes of MP3 audio format

22

Take-Away Points

– Hearing, sound waves – Sampling – CD audio, MP3

  • Quality, storage requirements
slide-12
SLIDE 12

12

23

Student To Dos

–Readings:

  • Reed ch 5, pp 90-95 (this week)