• No results found

CTP 431 Music and Audio Computing. Digital Audio. Graduate School of Culture Technology (GSCT) Juhan Nam

N/A
N/A
Protected

Academic year: 2021

Share "CTP 431 Music and Audio Computing. Digital Audio. Graduate School of Culture Technology (GSCT) Juhan Nam"

Copied!
20
0
0

Loading.... (view fulltext now)

Full text

(1)

Digital Audio

CTP 431 Music and Audio Computing

Graduate School of Culture Technology (GSCT)

Juhan Nam

(2)

Outlines

§

Introduction

–  Digital audio chain

–  Transducers

§

Sampling

–  Sampling theorem

–  Aliasing and reconstruction

§

Quantization

–  Quantization error: SNR

(3)

Digital Audio Chain

(4)

Why Digital?

Helmholtz  Resonators   Op-­‐amp  and  amplifier  

(5)

Transducers

§

Convert one form of energy to another form

–  The forms are different but the information remains (almost) the same

§

Microphones

–  Sound wave to electrical signal

–  Dynamic / condenser microphones

§

Speakers

–  Electrical signal to sound wave

–  Generate distortion (by diaphragm)

(6)

Analog to Digital

(7)

Sampling

Convert continuous-time signal to discrete-time signal by

periodically picking up the instantaneous values

–  Represented as a sequence of numbers; pulse code modulation

(PCM)

–  Sampling period (Ts): the amount of time between samples

–  Sampling rate ( fs =1/Ts )

Ts  

x

(

t

)

x

(

nT

s

)

(8)

Sampling Theorem

§

What is an appropriate sampling rate?

–  Too high: increase data rate

–  Too low: become hard to reconstruct the original signal

§

Sampling Theorem

–  In order for a band-limited signal to be reconstructed fully, the sampling rate must be greater than twice the maximum

frequency in the signal

–  Half the sampling rate is called Nyquist frequency ( ) fs

2

(9)

Aliasing

§

If the sampling rate is less than twice the maximum

frequency, the high-frequency content is folded over to

lower frequency range

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 104 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

(10)

Sampling in Frequency Domain

§

Sampling in time corresponds to replicating the original

signal at every

f

s

frequency

§

Why ?

x

(

t

)

=

A

sin(

ω

t

)

=

A

sin(2

π

f

n

/

f

)

f

2

=

f

1

±

mf

s

fm  

-fm   -fs   -fm   fm   fs-fm   fs   fs+fm  

(11)

Aliasing in Frequency Domain

§

The high-frequency content is folded over to lower

frequency range from the replicated images

§

A low-pass filter is applied before sampling to avoid the

aliasing noise

fm  

-fm   fs-fm   fs   fs+fm   -fs  

(12)

Example of Aliasing

1.5 2

x 104

Bandlimited  sawtooth  wave  spectrum  

5 10 15 20 −60 −40 −20 0 Frequency (kHz) Magnitude (dB) 5 10 15 20 −60 −40 −20 0 Frequency (kHz) Magnitude (dB)

(13)

Example of Aliasing

§

Aliasing in Video

–  https://www.youtube.com/watch?v=QOqtdl2sJk0

–  https://www.youtube.com/watch?v=jHS9JGkEOmA (  Note  that  video  frame  rate  corresponds  to  the  sampling  rate  )  

(14)

Sampling Rates

§

Determined by the bandwidth of signals or hearing limits

–  Consumer audio product: 44.1 kHz (CD)

–  Professional audio gears: 48/96/192 kHz

(15)

Digital to Analog

(16)

Reconstruction in Frequency Domain

§

In the view of frequency domain, the signal before

sampling (continuous-time) signals can be reconstructed

by applying a low-pass filter

§

Conceptually, this is the operation in digital-to-analog

converters.

fm  

-fm   -fs   -fm   fm   fs   fs/2  

(17)

Reconstruction in Time Domain

§

In time domain, the reconstruction corresponds to

interpolation with the sinc function

–  The ideal low-pass corresponds to sinc function

–  The interpolation is actually convolution with the sinc function

sinc(x)= sin(πx) πx Before  sampling   AOer  sampling   Time  domain   Frequency  domain  

(18)

Quantization

§

Discretizing the amplitude of real-valued signals

–  Round the amplitude to the nearest discrete steps

–  The discrete steps are determined by the number of bit bits

(19)

Quantization Error

§

Quantization

causes noise

–  Average power of quantization noise: obtained from the probability density function (PDF) of the error

§

Signal to Noise Ratio (SNR)

–  Based on average power

–  Based on the max levels

20 log10 Srms Nrms =20 log10 2B−1 / 2 1 12 =6.02B+1.76 dB 1/2   -1/2   P(e) 1   x2p(e)dx −1/2 1/2

= 112

Root  mean  square  (RMS)  of  noise    

(With  16bits,  SNR  =  98.08dB)  

(20)

•  Dynamic  range    

–  The  raBo  between  the  loudest  and  soOest  levels  

•  Clipping  

–  Non-­‐linear  distorBon  that  occurs  when  a  signal  is  above  the  max  level  

•  Headroom  

–  Different  between  the  signal  level  and  the  max  level  

Dynamic Range, Clipping and Headroom

0  dB   Max  level   Head  room   Clipping   B  =  16  bits   20 log10 Srms,max Srms,min =20 log10 2B−1 / 2 1 / 2 =6.02B−6 (With  16bits,  DR  =  90.31  dB)  

In  digital  audio,  0dB  is  regarded   as  the  maximum  level    (dBFS)   Again,  RMS  of  full-­‐scale  sine  wave   for    both  loudest  and  soOest  

References

Related documents

The second major configuration problem is to set the char- acteristics of the communication in such a way as to meet the freshness constraints of the signals and to minimize the

The  development  of  soil  screening  values  to  protect  human  health  via  direct  exposures  routes  and  indirect  exposure  routes  is  the  key 

Debris or dirt in the Flush Valve clog up the piston or the orifice. The piston

Keywords: place branding, place stakeholders, stakeholder engagement, decentralized communication, distributed communication.. Stakeholders and

gummifera possess a significant inhibitory activity of the alpha amylase and alpha glucosidase and beta-galactosidase enzymes, in particular the macerate of methanol followed by

This study was hospital based and addressed a common problem of our community Majority of study population as not being delivered under care of trained professionals primarily

You are invited to participate in a study of the student experience of the accelerated entry (TAFE pathway) program into the Bachelor of Social Work (BSW) degree at the University

Comparatively high income in Arap is mainly due to large number of full time employed persons in government and non-government organizations whereas the least per capita