Sound Intro Tamara Berg Advanced Mul5media 1 - - PowerPoint PPT Presentation

sound intro
SMART_READER_LITE
LIVE PREVIEW

Sound Intro Tamara Berg Advanced Mul5media 1 - - PowerPoint PPT Presentation

Fundamentals of Mul/media, Chapter 6 Sound Intro Tamara Berg Advanced Mul5media 1 Fundamentals of Mul/media, Chapter 6 Reminder HW1 due Thurs, Feb 24.


slide-1
SLIDE 1

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Sound ¡Intro ¡

Tamara ¡Berg ¡ Advanced ¡Mul5media ¡

1 ¡

slide-2
SLIDE 2

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Reminder ¡

HW1 ¡due ¡Thurs, ¡Feb ¡24. ¡ ¡deadline ¡extended ¡to ¡Sunday, ¡Feb ¡27. ¡ Ques5ons? ¡

Li ¡& ¡Drew ¡ 2 ¡

slide-3
SLIDE 3

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

What ¡is ¡sound? ¡

  • ¡ Sound ¡ is ¡ a ¡ wave ¡ phenomenon ¡ like ¡ light, ¡ but ¡ is ¡

macroscopic ¡ and ¡ involves ¡ molecules ¡ of ¡ air ¡ being ¡ compressed ¡ and ¡ expanded ¡ under ¡ the ¡ ac5on ¡ of ¡ some ¡ physical ¡device. ¡

(a) ¡For ¡example, ¡a ¡speaker ¡in ¡an ¡audio ¡system ¡vibrates ¡back ¡ and ¡forth ¡and ¡produces ¡a ¡longitudinal ¡pressure ¡wave ¡that ¡ we ¡perceive ¡as ¡sound. ¡ (b) ¡ Since ¡ sound ¡ is ¡ a ¡ pressure ¡ wave, ¡ it ¡ takes ¡ on ¡ con5nuous ¡ values, ¡as ¡opposed ¡to ¡digi5zed ¡ones. ¡

3 ¡ Li ¡& ¡Drew ¡

Physics ¡of ¡Sound ¡

slide-4
SLIDE 4

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Sound ¡Wave ¡

Li ¡& ¡Drew ¡ 4 ¡

slide-5
SLIDE 5

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

How ¡does ¡the ¡ear ¡work? ¡

Li ¡& ¡Drew ¡ 5 ¡

As ¡the ¡sound ¡waves ¡enter ¡the ¡ear, ¡the ¡ear ¡canal ¡ ¡ increases ¡the ¡loudness ¡of ¡those ¡pitches ¡that ¡make ¡it ¡ easier ¡to ¡understand ¡speech ¡and ¡protects ¡the ¡eardrum ¡

  • ­‑ ¡a ¡flexible, ¡circular ¡membrane ¡which ¡vibrates ¡when ¡

touched ¡by ¡sound ¡waves. ¡

slide-6
SLIDE 6

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

How ¡does ¡the ¡ear ¡work? ¡

Li ¡& ¡Drew ¡ 6 ¡

As ¡the ¡sound ¡waves ¡enter ¡the ¡ear, ¡the ¡ear ¡canal ¡ ¡ increases ¡the ¡loudness ¡of ¡those ¡pitches ¡that ¡make ¡it ¡ easier ¡to ¡understand ¡speech ¡and ¡protects ¡the ¡eardrum ¡

  • ­‑ ¡a ¡flexible, ¡circular ¡membrane ¡which ¡vibrates ¡when ¡

touched ¡by ¡sound ¡waves. ¡ The ¡sound ¡vibra5ons ¡con5nue ¡their ¡journey ¡into ¡the ¡ middle ¡ear, ¡which ¡contains ¡three ¡5ny ¡bones ¡called ¡the ¡

  • ssicles, ¡which ¡are ¡also ¡known ¡as ¡the ¡hammer, ¡anvil ¡

and ¡s5rrup. ¡These ¡bones ¡form ¡the ¡bridge ¡from ¡the ¡ eardrum ¡into ¡the ¡inner ¡ear. ¡They ¡increase ¡and ¡amplify ¡ the ¡sound ¡vibra5ons ¡even ¡more, ¡before ¡safely ¡ transmiWng ¡them ¡on ¡to ¡the ¡inner ¡ear ¡via ¡the ¡oval ¡

  • window. ¡
slide-7
SLIDE 7

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

How ¡does ¡the ¡ear ¡work? ¡

Li ¡& ¡Drew ¡ 7 ¡

As ¡the ¡sound ¡waves ¡enter ¡the ¡ear, ¡the ¡ear ¡canal ¡ ¡ increases ¡the ¡loudness ¡of ¡those ¡pitches ¡that ¡make ¡it ¡ easier ¡to ¡understand ¡speech ¡and ¡protects ¡the ¡eardrum ¡

  • ­‑ ¡a ¡flexible, ¡circular ¡membrane ¡which ¡vibrates ¡when ¡

touched ¡by ¡sound ¡waves. ¡ The ¡sound ¡vibra5ons ¡con5nue ¡their ¡journey ¡into ¡the ¡ middle ¡ear, ¡which ¡contains ¡three ¡5ny ¡bones ¡called ¡the ¡

  • ssicles, ¡which ¡are ¡also ¡known ¡as ¡the ¡hammer, ¡anvil ¡

and ¡s5rrup. ¡These ¡bones ¡form ¡the ¡bridge ¡from ¡the ¡ eardrum ¡into ¡the ¡inner ¡ear. ¡They ¡increase ¡and ¡amplify ¡ the ¡sound ¡vibra5ons ¡even ¡more, ¡before ¡safely ¡ transmiWng ¡them ¡on ¡to ¡the ¡inner ¡ear ¡via ¡the ¡oval ¡

  • window. ¡

The ¡Inner ¡Ear ¡(cochlea), ¡houses ¡a ¡system ¡of ¡tubes ¡filled ¡ with ¡a ¡watery ¡fluid. ¡As ¡the ¡sound ¡waves ¡pass ¡through ¡ the ¡oval ¡window ¡the ¡fluid ¡begins ¡to ¡move, ¡seWng ¡5ny ¡ hair ¡cells ¡in ¡mo5on. ¡In ¡turn, ¡these ¡hairs ¡transform ¡the ¡ vibra5ons ¡into ¡electrical ¡impulses ¡that ¡travel ¡along ¡the ¡ auditory ¡nerve ¡to ¡the ¡brain ¡itself. ¡ ¡

link ¡

slide-8
SLIDE 8

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

(c) ¡ Even ¡ though ¡ such ¡ pressure ¡ waves ¡ are ¡ longitudinal, ¡ they ¡ s5ll ¡ have ¡ ordinary ¡ wave ¡ proper5es ¡ and ¡ behaviors, ¡ such ¡ as ¡ reflec5on ¡ (bouncing), ¡refrac5on ¡(change ¡of ¡angle ¡when ¡ entering ¡ a ¡ medium ¡ with ¡ a ¡ different ¡ density) ¡ and ¡diffrac5on ¡(bending ¡around ¡an ¡obstacle). ¡ (d) ¡If ¡we ¡wish ¡to ¡use ¡a ¡digital ¡version ¡of ¡sound ¡ waves ¡we ¡must ¡form ¡digi5zed ¡representa5ons ¡

  • f ¡audio ¡informa5on. ¡

 ¡Link ¡to ¡physical ¡descrip5on ¡of ¡sound ¡waves. ¡

8 ¡ Li ¡& ¡Drew ¡

slide-9
SLIDE 9

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Digi/za/on ¡

  • ¡Digi/za/on ¡means ¡conversion ¡to ¡a ¡stream ¡of ¡

numbers, ¡ and ¡ preferably ¡ these ¡ numbers ¡ should ¡be ¡integers ¡for ¡efficiency. ¡

9 ¡ Li ¡& ¡Drew ¡

slide-10
SLIDE 10

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

An ¡analog ¡signal: ¡con5nuous ¡measurement ¡of ¡pressure ¡wave. ¡

10 ¡ Li ¡& ¡Drew ¡

  • ¡Sound ¡is ¡1-­‑dimensional ¡(amplitude ¡values ¡depend ¡on ¡a ¡1D ¡variable, ¡5me) ¡

as ¡opposed ¡to ¡images ¡(which ¡are ¡how ¡many ¡dimensions)? ¡

slide-11
SLIDE 11

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡ The ¡ graph ¡ in ¡ Fig. ¡ 6.1 ¡ has ¡ to ¡ be ¡ made ¡ digital ¡ in ¡ both ¡ 5me ¡ and ¡
  • amplitude. ¡ To ¡ digi5ze, ¡ the ¡ signal ¡ must ¡ be ¡ sampled ¡ in ¡ each ¡

dimension: ¡in ¡5me, ¡and ¡in ¡amplitude. ¡

(a) ¡Sampling ¡means ¡measuring ¡the ¡quan5ty ¡we ¡are ¡interested ¡in, ¡usually ¡ at ¡evenly-­‑spaced ¡intervals. ¡ (b) ¡The ¡first ¡kind ¡of ¡sampling, ¡using ¡measurements ¡only ¡at ¡evenly ¡spaced ¡ 5me ¡ intervals, ¡ is ¡ simply ¡ called, ¡ sampling. ¡ The ¡ rate ¡ at ¡ which ¡ it ¡ is ¡ performed ¡is ¡called ¡the ¡sampling ¡frequency. ¡ (c) ¡For ¡audio, ¡typical ¡sampling ¡rates ¡are ¡from ¡8 ¡kHz ¡(8,000 ¡samples ¡per ¡ second) ¡to ¡48 ¡kHz. ¡This ¡range ¡is ¡determined ¡by ¡the ¡Nyquist ¡theorem, ¡ discussed ¡later. ¡ (d) ¡Sound ¡is ¡a ¡con5nuous ¡signal ¡(measurement ¡of ¡pressure). ¡Sampling ¡in ¡ the ¡ amplitude ¡ or ¡ voltage ¡ dimension ¡ is ¡ called ¡ quan/za/on. ¡ We ¡ quan5ze ¡ so ¡ that ¡ we ¡ can ¡ represent ¡ the ¡ signal ¡ as ¡ a ¡ discrete ¡ set ¡ of ¡

  • values. ¡

11 ¡ Li ¡& ¡Drew ¡

slide-12
SLIDE 12

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • Fig. ¡ 6.2: ¡ Sampling ¡ and ¡ Quan5za5on. ¡ (a): ¡ Sampling ¡ the ¡

analog ¡signal ¡in ¡the ¡5me ¡dimension. ¡(b): ¡Quan5za5on ¡is ¡ sampling ¡the ¡analog ¡signal ¡in ¡the ¡amplitude ¡dimension. ¡

12 ¡ Li ¡& ¡Drew ¡

(a) ¡ (b) ¡

slide-13
SLIDE 13

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

13 ¡ Li ¡& ¡Drew ¡

Frequency ¡of ¡sound ¡waves. ¡

slide-14
SLIDE 14

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

14 ¡

Ar5cle ¡

Hearing ¡by ¡Age ¡Group ¡

Mosquito ¡Ringtones ¡

slide-15
SLIDE 15

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡ Whereas ¡ frequency ¡ is ¡ an ¡ absolute ¡ measure, ¡ pitch ¡ is ¡ generally ¡

rela5ve ¡— ¡a ¡perceptual ¡subjec5ve ¡quality ¡of ¡sound. ¡

(a) ¡Pitch ¡and ¡frequency ¡are ¡linked ¡by ¡seWng ¡the ¡note ¡A ¡above ¡middle ¡C ¡ to ¡exactly ¡440 ¡Hz. ¡ (b) ¡An ¡octave ¡above ¡that ¡note ¡takes ¡us ¡to ¡another ¡A ¡note. ¡ ¡An ¡octave ¡ corresponds ¡to ¡doubling ¡the ¡frequency. ¡Thus ¡with ¡the ¡middle ¡“A” ¡on ¡a ¡ piano ¡(“A4” ¡or ¡“A440”) ¡set ¡to ¡440 ¡Hz, ¡the ¡next ¡“A” ¡up ¡is ¡at ¡880 ¡Hz, ¡or ¡

  • ne ¡octave ¡above. ¡

(c) ¡Harmonics: ¡any ¡series ¡of ¡musical ¡tones ¡whose ¡frequencies ¡are ¡integral ¡ mul5ples ¡of ¡the ¡frequency ¡of ¡a ¡fundamental ¡tone. ¡ (d) ¡ If ¡ we ¡ allow ¡ non-­‑integer ¡ mul5ples ¡ of ¡ the ¡ base ¡ frequency, ¡ we ¡ allow ¡ non-­‑“A” ¡notes ¡and ¡have ¡a ¡more ¡complex ¡resul5ng ¡sound. ¡

15 ¡ Li ¡& ¡Drew ¡

slide-16
SLIDE 16

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡ Whereas ¡ frequency ¡ is ¡ an ¡ absolute ¡ measure, ¡ pitch ¡ is ¡ generally ¡

rela5ve ¡— ¡a ¡perceptual ¡subjec5ve ¡quality ¡of ¡sound. ¡

(a) ¡Pitch ¡and ¡frequency ¡are ¡linked ¡by ¡seWng ¡the ¡note ¡A ¡above ¡middle ¡C ¡ to ¡exactly ¡440 ¡Hz. ¡ (b) ¡An ¡octave ¡above ¡that ¡note ¡takes ¡us ¡to ¡another ¡A ¡note. ¡ ¡An ¡octave ¡ corresponds ¡to ¡doubling ¡the ¡frequency. ¡Thus ¡with ¡the ¡middle ¡“A” ¡on ¡a ¡ piano ¡(“A4” ¡or ¡“A440”) ¡set ¡to ¡440 ¡Hz, ¡the ¡next ¡“A” ¡up ¡is ¡at ¡880 ¡Hz, ¡or ¡

  • ne ¡octave ¡above. ¡

(c) ¡Harmonics: ¡any ¡series ¡of ¡musical ¡tones ¡whose ¡frequencies ¡are ¡integral ¡ mul5ples ¡of ¡the ¡frequency ¡of ¡a ¡fundamental ¡tone. ¡ (d) ¡ If ¡ we ¡ allow ¡ non-­‑integer ¡ mul5ples ¡ of ¡ the ¡ base ¡ frequency, ¡ we ¡ allow ¡ non-­‑“A” ¡notes ¡and ¡have ¡a ¡more ¡complex ¡resul5ng ¡sound. ¡

16 ¡ Li ¡& ¡Drew ¡

slide-17
SLIDE 17

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡ Whereas ¡ frequency ¡ is ¡ an ¡ absolute ¡ measure, ¡ pitch ¡ is ¡ generally ¡

rela5ve ¡— ¡a ¡perceptual ¡subjec5ve ¡quality ¡of ¡sound. ¡

(a) ¡Pitch ¡and ¡frequency ¡are ¡linked ¡by ¡seWng ¡the ¡note ¡A ¡above ¡middle ¡C ¡ to ¡exactly ¡440 ¡Hz. ¡ (b) ¡An ¡octave ¡above ¡that ¡note ¡takes ¡us ¡to ¡another ¡A ¡note. ¡ ¡An ¡octave ¡ corresponds ¡to ¡doubling ¡the ¡frequency. ¡Thus ¡with ¡the ¡middle ¡“A” ¡on ¡a ¡ piano ¡(“A4” ¡or ¡“A440”) ¡set ¡to ¡440 ¡Hz, ¡the ¡next ¡“A” ¡up ¡is ¡at ¡880 ¡Hz, ¡or ¡

  • ne ¡octave ¡above. ¡

(c) ¡Harmonics: ¡any ¡series ¡of ¡musical ¡tones ¡whose ¡frequencies ¡are ¡integral ¡ mul5ples ¡of ¡the ¡frequency ¡of ¡a ¡fundamental ¡tone. ¡ (d) ¡ If ¡ we ¡ allow ¡ non-­‑integer ¡ mul5ples ¡ of ¡ the ¡ base ¡ frequency, ¡ we ¡ allow ¡ non-­‑“A” ¡notes ¡and ¡have ¡a ¡more ¡complex ¡resul5ng ¡sound. ¡

17 ¡ Li ¡& ¡Drew ¡

slide-18
SLIDE 18

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

18 ¡ Li ¡& ¡Drew ¡

Frequency ¡of ¡sound ¡waves. ¡

slide-19
SLIDE 19

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡ Whereas ¡ frequency ¡ is ¡ an ¡ absolute ¡ measure, ¡ pitch ¡ is ¡ generally ¡

rela5ve ¡— ¡a ¡perceptual ¡subjec5ve ¡quality ¡of ¡sound. ¡

(a) ¡Pitch ¡and ¡frequency ¡are ¡linked ¡by ¡seWng ¡the ¡note ¡A ¡above ¡middle ¡C ¡ to ¡exactly ¡440 ¡Hz. ¡ (b) ¡An ¡octave ¡above ¡that ¡note ¡takes ¡us ¡to ¡another ¡A ¡note. ¡ ¡An ¡octave ¡ corresponds ¡to ¡doubling ¡the ¡frequency. ¡Thus ¡with ¡the ¡middle ¡“A” ¡on ¡a ¡ piano ¡(“A4” ¡or ¡“A440”) ¡set ¡to ¡440 ¡Hz, ¡the ¡next ¡“A” ¡up ¡is ¡at ¡880 ¡Hz, ¡or ¡

  • ne ¡octave ¡above. ¡

(c) ¡Harmonics: ¡any ¡series ¡of ¡musical ¡tones ¡whose ¡frequencies ¡are ¡integral ¡ mul5ples ¡of ¡the ¡frequency ¡of ¡a ¡fundamental ¡tone. ¡ (d) ¡If ¡we ¡allow ¡non-­‑integer ¡mul5ples ¡of ¡the ¡base ¡frequency, ¡we ¡produce ¡a ¡ more ¡complex ¡resul5ng ¡sound. ¡

19 ¡ Li ¡& ¡Drew ¡

slide-20
SLIDE 20

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

20 ¡ Li ¡& ¡Drew ¡

slide-21
SLIDE 21

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

21 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-22
SLIDE 22

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

22 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-23
SLIDE 23

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

23 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-24
SLIDE 24

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

24 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-25
SLIDE 25

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

25 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-26
SLIDE 26

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

26 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-27
SLIDE 27

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡To ¡decide ¡how ¡to ¡digi5ze ¡audio ¡data ¡we ¡need ¡

to ¡answer ¡the ¡following ¡ques5ons: ¡

  • 1. What ¡is ¡the ¡sampling ¡rate? ¡
  • 2. ¡ How ¡ finely ¡ is ¡ the ¡ data ¡ to ¡ be ¡ quan5zed, ¡ and ¡ is ¡

quan5za5on ¡uniform? ¡

  • 3. ¡How ¡is ¡audio ¡data ¡formaied? ¡(file ¡format) ¡

27 ¡ Li ¡& ¡Drew ¡

slide-28
SLIDE 28

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

28 ¡ Li ¡& ¡Drew ¡

  • Fig. ¡6.4: ¡Aliasing. ¡ ¡

(a): ¡A ¡single ¡frequency. ¡ ¡ ¡ (b): ¡Sampling ¡at ¡exactly ¡the ¡frequency ¡ produces ¡a ¡constant. ¡ ¡ ¡ (c): ¡Sampling ¡at ¡1.5 ¡5mes ¡per ¡cycle ¡ ¡ produces ¡an ¡alias ¡perceived ¡frequency. ¡

slide-29
SLIDE 29

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

29 ¡ Li ¡& ¡Drew ¡

  • Fig. ¡6.4: ¡Aliasing. ¡ ¡

(a): ¡A ¡single ¡frequency. ¡ ¡ ¡ (b): ¡Sampling ¡at ¡exactly ¡the ¡frequency ¡ produces ¡a ¡constant. ¡ ¡ ¡ (c): ¡Sampling ¡at ¡1.5 ¡5mes ¡per ¡cycle ¡ ¡ produces ¡an ¡alias ¡perceived ¡frequency. ¡

slide-30
SLIDE 30

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

30 ¡ Li ¡& ¡Drew ¡

  • Fig. ¡6.4: ¡Aliasing. ¡ ¡

(a): ¡A ¡single ¡frequency. ¡ ¡ ¡ (b): ¡Sampling ¡at ¡exactly ¡the ¡frequency ¡ produces ¡a ¡constant. ¡ ¡ ¡ (c): ¡Sampling ¡at ¡1.5 ¡5mes ¡per ¡cycle ¡ ¡ produces ¡an ¡alias ¡perceived ¡frequency. ¡

slide-31
SLIDE 31

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

31 ¡ Li ¡& ¡Drew ¡

  • Fig. ¡6.4: ¡Aliasing. ¡ ¡

(a): ¡A ¡single ¡frequency. ¡ ¡ ¡ (b): ¡Sampling ¡at ¡exactly ¡the ¡frequency ¡ produces ¡a ¡constant. ¡ ¡ ¡ (c): ¡Sampling ¡at ¡1.5 ¡5mes ¡per ¡cycle ¡ ¡ produces ¡an ¡alias ¡perceived ¡frequency. ¡

slide-32
SLIDE 32

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

32 ¡ Li ¡& ¡Drew ¡

  • Fig. ¡6.4: ¡Aliasing. ¡ ¡

(a): ¡A ¡single ¡frequency. ¡ ¡ ¡ (b): ¡Sampling ¡at ¡exactly ¡the ¡frequency ¡ produces ¡a ¡constant. ¡ ¡ ¡ (c): ¡Sampling ¡at ¡1.5 ¡5mes ¡per ¡cycle ¡ ¡ produces ¡an ¡alias ¡perceived ¡frequency. ¡

slide-33
SLIDE 33

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Aliasing ¡

The ¡ rela5onship ¡ among ¡ the ¡ Sampling ¡ Frequency, ¡ True ¡Frequency, ¡and ¡the ¡Alias ¡Frequency ¡is ¡as ¡ follows: ¡

¡falias = fsampling − ftrue, ¡for ¡ftrue < fsampling < 2 × ftrue

If ¡true ¡freq ¡is ¡5.5 ¡kHz ¡and ¡sampling ¡freq ¡is ¡8 ¡kHz. ¡ ¡ Then ¡what ¡is ¡the ¡alias ¡freq? ¡

Li ¡& ¡Drew ¡ 33 ¡

slide-34
SLIDE 34

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

34 ¡ Li ¡& ¡Drew ¡

  • Fig. ¡6.4: ¡Aliasing. ¡ ¡

(a): ¡A ¡single ¡frequency. ¡ ¡ ¡ (b): ¡Sampling ¡at ¡exactly ¡the ¡frequency ¡ produces ¡a ¡constant. ¡ ¡ ¡ (c): ¡Sampling ¡at ¡1.5 ¡5mes ¡per ¡cycle ¡ ¡ produces ¡an ¡alias ¡perceived ¡frequency. ¡

slide-35
SLIDE 35

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Building ¡up ¡a ¡complex ¡signal ¡by ¡superposing ¡sinusoids ¡

35 ¡ Li ¡& ¡Drew ¡

Signals ¡can ¡be ¡decomposed ¡into ¡a ¡weighted ¡sum ¡of ¡sinusoids: ¡

slide-36
SLIDE 36

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡Nyquist ¡Theorem: ¡If ¡a ¡signal ¡is ¡band-­‑limited, ¡

i.e., ¡there ¡is ¡a ¡lower ¡limit ¡f1 ¡and ¡an ¡upper ¡limit f2 of ¡frequency ¡components ¡in ¡the ¡signal, ¡then ¡ the ¡sampling ¡rate ¡should ¡be ¡at ¡least ¡2(f2 ¡− ¡f1). ¡

  • ¡Nyquist ¡frequency: ¡half ¡of ¡the ¡Nyquist ¡rate. ¡

– ¡ Since ¡ it ¡ would ¡ be ¡ impossible ¡ to ¡ recover ¡ frequencies ¡higher ¡than ¡Nyquist ¡frequency ¡in ¡any ¡ event, ¡ most ¡ systems ¡ have ¡ an ¡ an/aliasing ¡ filter ¡ that ¡restricts ¡the ¡frequency ¡content ¡in ¡the ¡input ¡to ¡ the ¡ sampler ¡ to ¡ a ¡ range ¡ at ¡ or ¡ below ¡ Nyquist ¡

  • frequency. ¡

36 ¡ Li ¡& ¡Drew ¡

slide-37
SLIDE 37

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Signal ¡to ¡Noise ¡Ra/o ¡(SNR) ¡

  • ¡The ¡ra5o ¡of ¡the ¡power ¡of ¡the ¡correct ¡signal ¡and ¡the ¡noise ¡is ¡called ¡

the ¡signal ¡to ¡noise ¡ra/o ¡(SNR) ¡— ¡a ¡measure ¡of ¡the ¡quality ¡of ¡the ¡

  • signal. ¡
  • ¡The ¡SNR ¡is ¡usually ¡measured ¡in ¡decibels ¡(dB), ¡where ¡1 ¡dB ¡is ¡a ¡tenth ¡
  • f ¡ a ¡ bel. ¡ The ¡ SNR ¡ value, ¡ in ¡ units ¡ of ¡ dB, ¡ is ¡ defined ¡ in ¡ terms ¡ of ¡

base-­‑10 ¡logarithms ¡of ¡squared ¡amplitudes, ¡as ¡follows: ¡ (6.2) ¡

Li ¡& ¡Drew ¡ 37 ¡

slide-38
SLIDE 38

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

a) For ¡example, ¡if ¡the ¡signal ¡amplitude ¡Asignal is ¡ 10 ¡5mes ¡the ¡noise, ¡then ¡the ¡SNR ¡is ¡ ¡ ¡20 ¡∗ ¡log10(10) ¡= ¡20dB. ¡ b) ¡dB ¡always ¡defined ¡in ¡terms ¡of ¡a ¡ra/o. ¡

38 ¡ Li ¡& ¡Drew ¡

slide-39
SLIDE 39

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

a) For ¡example, ¡if ¡the ¡signal ¡amplitude ¡Asignal is ¡ 10 ¡5mes ¡the ¡noise, ¡then ¡the ¡SNR ¡is ¡ ¡ ¡20 ¡∗ ¡log10(10) ¡= ¡20dB. ¡ b) ¡dB ¡always ¡defined ¡in ¡terms ¡of ¡a ¡ra/o. ¡

39 ¡ Li ¡& ¡Drew ¡

slide-40
SLIDE 40

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡The ¡usual ¡levels ¡of ¡sound ¡we ¡hear ¡around ¡us ¡are ¡described ¡in ¡terms ¡of ¡decibels, ¡as ¡a ¡

ra5o ¡to ¡the ¡quietest ¡sound ¡we ¡are ¡capable ¡of ¡hearing. ¡Table ¡6.1 ¡shows ¡approximate ¡ levels ¡for ¡these ¡sounds. ¡ Table ¡6.1: ¡Magnitude ¡levels ¡of ¡common ¡sounds, ¡in ¡decibels ¡

40 ¡ Li ¡& ¡Drew ¡

Threshold ¡of ¡hearing ¡ 0 ¡ Rustle ¡of ¡leaves ¡ ¡ 10 ¡ Very ¡quiet ¡room ¡ ¡ 20 ¡ Average ¡room ¡ ¡ 40 ¡ Conversa5on ¡ ¡ 60 ¡ Busy ¡street ¡ ¡ 70 ¡ Loud ¡radio ¡ ¡ 80 ¡ Train ¡through ¡sta5on ¡ ¡ 90 ¡ Riveter ¡ ¡ 100 ¡ Threshold ¡of ¡discomfort ¡ ¡ 120 ¡ Threshold ¡of ¡pain ¡ ¡ 140 ¡ Damage ¡to ¡ear ¡drum ¡ ¡ 160 ¡

slide-41
SLIDE 41

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Merits ¡of ¡dB ¡

* ¡ The ¡ decibel's ¡ logarithmic ¡ nature ¡ means ¡ that ¡ a ¡ very ¡ large ¡ range ¡ of ¡ ra5os ¡can ¡be ¡represented ¡by ¡a ¡convenient ¡number. ¡This ¡allows ¡one ¡ to ¡clearly ¡visualize ¡huge ¡changes ¡of ¡some ¡quan5ty. ¡ ¡ * ¡ The ¡ mathema5cal ¡ proper5es ¡ of ¡ logarithms ¡ mean ¡ that ¡ the ¡ overall ¡ decibel ¡ gain ¡ of ¡ a ¡ mul5-­‑component ¡ system ¡ (such ¡ as ¡ consecu5ve ¡ amplifiers) ¡can ¡be ¡calculated ¡simply ¡by ¡summing ¡the ¡decibel ¡gains ¡

  • f ¡ the ¡ individual ¡ components, ¡ rather ¡ than ¡ needing ¡ to ¡ mul5ply ¡

amplifica5on ¡factors. ¡Essen5ally ¡this ¡is ¡because ¡log(A ¡× ¡B ¡× ¡C ¡× ¡...) ¡= ¡ log(A) ¡+ ¡log(B) ¡+ ¡log(C) ¡+ ¡… ¡ * ¡ The ¡ human ¡ percep5on ¡ of ¡ sound ¡ is ¡ such ¡ that ¡ a ¡ doubling ¡ of ¡ actual ¡ intensity ¡causes ¡perceived ¡intensity ¡to ¡always ¡increase ¡by ¡the ¡same ¡ amount, ¡irrespec5ve ¡of ¡the ¡original ¡level. ¡The ¡decibel's ¡logarithmic ¡ scale, ¡in ¡which ¡a ¡doubling ¡of ¡power ¡or ¡intensity ¡always ¡causes ¡an ¡ increase ¡of ¡approximately ¡3 ¡dB, ¡corresponds ¡to ¡this ¡percep5on. ¡

Li ¡& ¡Drew ¡ 41 ¡

slide-42
SLIDE 42

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Merits ¡of ¡dB ¡

* ¡ The ¡ decibel's ¡ logarithmic ¡ nature ¡ means ¡ that ¡ a ¡ very ¡ large ¡ range ¡ of ¡ ra5os ¡can ¡be ¡represented ¡by ¡a ¡convenient ¡number. ¡This ¡allows ¡one ¡ to ¡clearly ¡visualize ¡huge ¡changes ¡of ¡some ¡quan5ty. ¡ ¡ * ¡ The ¡ mathema5cal ¡ proper5es ¡ of ¡ logarithms ¡ mean ¡ that ¡ the ¡ overall ¡ decibel ¡ gain ¡ of ¡ a ¡ mul5-­‑component ¡ system ¡ (such ¡ as ¡ consecu5ve ¡ amplifiers) ¡can ¡be ¡calculated ¡simply ¡by ¡summing ¡the ¡decibel ¡gains ¡

  • f ¡ the ¡ individual ¡ components, ¡ rather ¡ than ¡ needing ¡ to ¡ mul5ply ¡

amplifica5on ¡factors. ¡Essen5ally ¡this ¡is ¡because ¡log(A ¡× ¡B ¡× ¡C ¡× ¡...) ¡= ¡ log(A) ¡+ ¡log(B) ¡+ ¡log(C) ¡+ ¡… ¡ * ¡ The ¡ human ¡ percep5on ¡ of ¡ sound ¡ is ¡ such ¡ that ¡ a ¡ doubling ¡ of ¡ actual ¡ intensity ¡causes ¡perceived ¡intensity ¡to ¡always ¡increase ¡by ¡the ¡same ¡ amount, ¡irrespec5ve ¡of ¡the ¡original ¡level. ¡The ¡decibel's ¡logarithmic ¡ scale, ¡in ¡which ¡a ¡doubling ¡of ¡power ¡or ¡intensity ¡always ¡causes ¡an ¡ increase ¡of ¡approximately ¡3 ¡dB, ¡corresponds ¡to ¡this ¡percep5on. ¡

Li ¡& ¡Drew ¡ 42 ¡

slide-43
SLIDE 43

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Merits ¡of ¡dB ¡

* ¡ The ¡ decibel's ¡ logarithmic ¡ nature ¡ means ¡ that ¡ a ¡ very ¡ large ¡ range ¡ of ¡ ra5os ¡can ¡be ¡represented ¡by ¡a ¡convenient ¡number. ¡This ¡allows ¡one ¡ to ¡clearly ¡visualize ¡huge ¡changes ¡of ¡some ¡quan5ty. ¡ ¡ * ¡ The ¡ mathema5cal ¡ proper5es ¡ of ¡ logarithms ¡ mean ¡ that ¡ the ¡ overall ¡ decibel ¡ gain ¡ of ¡ a ¡ mul5-­‑component ¡ system ¡ (such ¡ as ¡ consecu5ve ¡ amplifiers) ¡can ¡be ¡calculated ¡simply ¡by ¡summing ¡the ¡decibel ¡gains ¡

  • f ¡ the ¡ individual ¡ components, ¡ rather ¡ than ¡ needing ¡ to ¡ mul5ply ¡

amplifica5on ¡factors. ¡Essen5ally ¡this ¡is ¡because ¡log(A ¡× ¡B ¡× ¡C ¡× ¡...) ¡= ¡ log(A) ¡+ ¡log(B) ¡+ ¡log(C) ¡+ ¡… ¡ * ¡ The ¡ human ¡ percep5on ¡ of ¡ sound ¡ is ¡ such ¡ that ¡ a ¡ doubling ¡ of ¡ actual ¡ intensity ¡causes ¡perceived ¡intensity ¡to ¡always ¡increase ¡by ¡the ¡same ¡ amount, ¡irrespec5ve ¡of ¡the ¡original ¡level. ¡The ¡decibel's ¡logarithmic ¡ scale, ¡in ¡which ¡a ¡doubling ¡of ¡power ¡or ¡intensity ¡always ¡causes ¡an ¡ increase ¡of ¡approximately ¡3 ¡dB, ¡corresponds ¡to ¡this ¡percep5on. ¡

Li ¡& ¡Drew ¡ 43 ¡

slide-44
SLIDE 44

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Signal ¡to ¡Quan/za/on ¡Noise ¡Ra/o ¡(SQNR) ¡

  • ¡Aside ¡from ¡any ¡noise ¡that ¡may ¡have ¡been ¡present ¡

in ¡ the ¡ original ¡ analog ¡ signal, ¡ there ¡ is ¡ also ¡ an ¡ addi5onal ¡error ¡that ¡results ¡from ¡quan5za5on. ¡

(a) ¡If ¡voltages ¡are ¡actually ¡in ¡0 ¡to ¡1 ¡but ¡we ¡have ¡only ¡8 ¡ bits ¡in ¡which ¡to ¡store ¡values, ¡then ¡effec5vely ¡we ¡force ¡ all ¡con5nuous ¡values ¡of ¡voltage ¡into ¡only ¡256 ¡different ¡

  • values. ¡

(b) ¡ This ¡ introduces ¡ a ¡ roundoff ¡ error. ¡ It ¡ is ¡ not ¡ really ¡ “noise”. ¡ ¡Nevertheless ¡it ¡is ¡called ¡quan/za/on ¡noise ¡ (or ¡quan5za5on ¡error). ¡

Li ¡& ¡Drew ¡ 44 ¡

slide-45
SLIDE 45

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • ¡The ¡quality ¡of ¡the ¡quan5za5on ¡is ¡characterized ¡

by ¡ the ¡ Signal ¡ to ¡ Quan5za5on ¡ Noise ¡ Ra5o ¡ (SQNR). ¡

(a) Quan/za/on ¡noise: ¡the ¡difference ¡between ¡the ¡ actual ¡ value ¡ of ¡ the ¡ analog ¡ signal, ¡ for ¡ the ¡ par5cular ¡ sampling ¡ 5me, ¡ and ¡ the ¡ nearest ¡ quan5za5on ¡interval ¡value. ¡ (b) ¡At ¡most, ¡this ¡error ¡can ¡be ¡as ¡much ¡as ¡half ¡of ¡the ¡

  • interval. ¡

45 ¡ Li ¡& ¡Drew ¡

slide-46
SLIDE 46

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • Fig. ¡ 6.2: ¡ Sampling ¡ and ¡ Quan5za5on. ¡ (a): ¡ Sampling ¡ the ¡

analog ¡signal ¡in ¡the ¡5me ¡dimension. ¡(b): ¡Quan5za5on ¡is ¡ sampling ¡the ¡analog ¡signal ¡in ¡the ¡amplitude ¡dimension. ¡

46 ¡ Li ¡& ¡Drew ¡

(a) ¡ (b) ¡

slide-47
SLIDE 47

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

¡(c) ¡For ¡a ¡quan5za5on ¡accuracy ¡of ¡N ¡bits ¡per ¡sample, ¡the ¡SQNR ¡can ¡ be ¡simply ¡expressed: ¡ (6.3) ¡

  • ¡Notes: ¡

(a) We ¡ map ¡ the ¡ maximum ¡ signal ¡ to ¡ 2N−1 ¡ − ¡ 1 ¡ (≃ ¡ 2N−1) ¡ and ¡ the ¡ most ¡ nega5ve ¡signal ¡to ¡−2N−1. ¡ (b) ¡Eq. ¡(6.3) ¡is ¡the ¡Peak ¡signal-­‑to-­‑noise ¡ra5o, ¡PSQNR: ¡peak ¡signal ¡and ¡ peak ¡noise. ¡

47 ¡ Li ¡& ¡Drew ¡

slide-48
SLIDE 48

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

¡(c) ¡For ¡a ¡quan5za5on ¡accuracy ¡of ¡N ¡bits ¡per ¡sample, ¡the ¡SQNR ¡can ¡ be ¡simply ¡expressed: ¡ (6.3) ¡

  • ¡Notes: ¡

(a) We ¡ map ¡ the ¡ maximum ¡ signal ¡ to ¡ 2N−1 ¡ − ¡ 1 ¡ (≃ ¡ 2N−1) ¡ and ¡ the ¡ most ¡ nega5ve ¡signal ¡to ¡−2N−1. ¡ (b) ¡Eq. ¡(6.3) ¡is ¡the ¡Peak ¡signal-­‑to-­‑noise ¡ra5o, ¡PSQNR: ¡peak ¡signal ¡and ¡ peak ¡noise. ¡

48 ¡ Li ¡& ¡Drew ¡

In ¡the ¡worst ¡case ¡

slide-49
SLIDE 49

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Linear ¡and ¡Non-­‑linear ¡Quan/za/on ¡

  • ¡ Linear ¡ format: ¡ samples ¡ are ¡ typically ¡ stored ¡ as ¡ uniformly ¡

quan5zed ¡values. ¡

  • ¡Non-­‑uniform ¡quan/za/on: ¡set ¡up ¡more ¡finely-­‑spaced ¡levels ¡

where ¡humans ¡hear ¡with ¡the ¡most ¡acuity. ¡ ¡ Nonlinear ¡quan5za5on ¡works ¡by ¡first ¡transforming ¡an ¡analog ¡ signal ¡from ¡the ¡raw ¡s ¡space ¡into ¡the ¡theore5cal ¡r ¡space, ¡and ¡ then ¡uniformly ¡quan5zing ¡the ¡resul5ng ¡values. ¡

  • ¡Such ¡a ¡law ¡for ¡audio ¡is ¡called ¡μ-­‑law ¡encoding. ¡A ¡very ¡similar ¡

rule, ¡called ¡A-­‑law, ¡is ¡used ¡in ¡telephony ¡in ¡Europe. ¡

Li ¡& ¡Drew ¡ 49 ¡

slide-50
SLIDE 50

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

Linear ¡and ¡Non-­‑linear ¡Quan/za/on ¡

  • ¡ Linear ¡ format: ¡ samples ¡ are ¡ typically ¡ stored ¡ as ¡ uniformly ¡

quan5zed ¡values. ¡

  • ¡Non-­‑uniform ¡quan/za/on: ¡set ¡up ¡more ¡finely-­‑spaced ¡levels ¡

where ¡humans ¡hear ¡with ¡the ¡most ¡acuity. ¡ ¡ Nonlinear ¡quan5za5on ¡works ¡by ¡first ¡transforming ¡an ¡analog ¡ signal ¡from ¡the ¡raw ¡s ¡space ¡into ¡the ¡theore5cal ¡r ¡space, ¡and ¡ then ¡uniformly ¡quan5zing ¡the ¡resul5ng ¡values. ¡

  • ¡Such ¡a ¡law ¡for ¡audio ¡is ¡called ¡μ-­‑law ¡encoding. ¡A ¡very ¡similar ¡

rule, ¡called ¡A-­‑law, ¡is ¡used ¡in ¡telephony ¡in ¡Europe. ¡

Li ¡& ¡Drew ¡ 50 ¡

slide-51
SLIDE 51

Fundamentals ¡of ¡Mul/media, ¡Chapter ¡6 ¡

  • Fig. ¡6.6: ¡Nonlinear ¡transform ¡for ¡audio ¡signals ¡
  • ¡The ¡μ-­‑law ¡in ¡audio ¡is ¡used ¡to ¡develop ¡a ¡nonuniform ¡quan5za5on ¡rule ¡

for ¡sound: ¡uniform ¡quan5za5on ¡of ¡r ¡gives ¡finer ¡resolu5on ¡in ¡s ¡at ¡ the ¡quiet ¡end ¡(s/sp ¡near ¡0). ¡

51 ¡ Li ¡& ¡Drew ¡

Current ¡signal ¡value ¡/ ¡peak ¡signal ¡value ¡

Transformed ¡signal ¡ ¡

Values ¡in ¡s ¡get ¡mapped ¡to ¡ values ¡in ¡r ¡non-­‑uniformly. ¡ “Perceptual ¡coder” ¡– ¡ allocates ¡more ¡bits ¡to ¡ intervals ¡for ¡which ¡a ¡small ¡ change ¡produces ¡a ¡large ¡ change ¡in ¡percep5on. ¡