digital audio
play

Digital Audio Graduate School of Culture Technology (GSCT) Juhan - PowerPoint PPT Presentation

CTP 431 Music and Audio Computing Digital Audio Graduate School of Culture Technology (GSCT) Juhan Nam 1 Outlines Introduction Digital audio chain Transducers Sampling Sampling theorem Aliasing and reconstruction


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

  2. Outlines § Introduction – Digital audio chain – Transducers § Sampling – Sampling theorem – Aliasing and reconstruction § Quantization – Quantization error: SNR – Dynamic range 2

  3. Digital Audio Chain …0 ¡0 ¡1 ¡0 ¡1 ¡0 ¡… ¡ 3

  4. Why Digital? Helmholtz ¡Resonators ¡ Op-­‑amp ¡and ¡amplifier ¡ y[n] ¡= ¡g ¡* ¡x[n] ¡ On ¡computer ¡ 4

  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) – Crossover networks: woofer / tweeter 5

  6. Analog to Digital …0 ¡0 ¡1 ¡0 ¡1 ¡0 ¡… ¡ 6

  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 ( T s ): the amount of time between samples – Sampling rate ( f s = 1/ T s ) Signal ¡notaBon ¡ T s ¡ x ( t ) → x ( nT s ) 7

  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 f s > 2 ⋅ f m f s – Half the sampling rate is called Nyquist frequency ( ) 2 8

  9. Aliasing § If the sampling rate is less than twice the maximum frequency, the high-frequency content is folded over to lower frequency range 1 0.8 0.6 0.4 0.2 0 − 0.2 − 0.4 − 0.6 − 0.8 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 4 x 10 9

  10. Sampling in Frequency Domain § Sampling in time corresponds to replicating the original signal at every f s frequency -f m ¡ f m ¡ f s -f m ¡ f s ¡ -f s ¡ -f m ¡ f m ¡ f s +f m ¡ f m < f s − f m § Why ? f 2 = f 1 ± mf s x 1 ( t ) = A sin( ω 1 t ) = A sin(2 π f 1 n / f s ) x 2 ( t ) = A sin( ω 2 t ) = A sin(2 π f 2 n / f s ) = A sin(2 π ( f 1 ± mf s ) n / f s ) = A sin(2 π f 1 n / f s ± 2 π mn ) = A sin(2 π f 1 n / f s ) = x 1 ( t ) 10

  11. Aliasing in Frequency Domain § The high-frequency content is folded over to lower frequency range from the replicated images -f m ¡ f s ¡ -f s ¡ f s -f m ¡ f m ¡ f s +f m ¡ § A low-pass filter is applied before sampling to avoid the aliasing noise -f s ¡ -f s /2 ¡ f s /2 ¡ f s ¡ 11

  12. Example of Aliasing 0 0 Magnitude (dB) Magnitude (dB) − 20 − 20 − 40 − 40 − 60 − 60 5 10 15 20 5 10 15 20 Frequency (kHz) Frequency (kHz) Bandlimited ¡sawtooth ¡wave ¡spectrum ¡ Trivial ¡sawtooth ¡wave ¡spectrum ¡ 4 x 10 2 1.5 Frequency (Hz) 1 Frequency ¡sweep ¡of ¡the ¡trivial ¡sawtooth ¡wave ¡ 0.5 0 1 1.5 2 2.5 3 3.5 4 4.5 12 Time (s)

  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 ¡) ¡ 13

  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 – Speech communication: 8/16 kHz 14

  15. Digital to Analog …0 ¡0 ¡1 ¡0 ¡1 ¡0 ¡… ¡ 15

  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 f s /2 ¡ -f m ¡ f m ¡ f m ¡ f s ¡ -f s ¡ -f m ¡ § Conceptually, this is the operation in digital-to-analog converters. – In practice, DACs are composed of sample-and-hold and low- pass filtering circuitry 16

  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 Frequency ¡domain ¡ sinc( x ) = sin( π x ) Before ¡sampling ¡ π x AOer ¡sampling ¡ Time ¡domain ¡ ReconstrucBon ¡ sinc ¡funcBons! ¡ ¡ 17

  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 • Audio CD: 16 bits (-2 15 ~ 2 15 -1) 18

  19. Quantization Error § Quantization causes noise – Average power of quantization noise: obtained from the probability density function (PDF) of the error P ( e ) Root ¡mean ¡square ¡(RMS) ¡of ¡noise ¡ ¡ 1 ¡ 1/2 112 ∫ x 2 p ( e ) dx = − 1/2 -1/2 ¡ 1/2 ¡ § Signal to Noise Ratio (SNR) RMS ¡of ¡full-­‑scale ¡sine ¡wave ¡ – Based on average power 2 B − 1 / S rms 2 (With ¡16bits, ¡SNR ¡= ¡98.08dB) ¡ 20log 10 = 20log 10 = 6.02 B + 1.76 dB N rms 112 – Based on the max levels 2 B − 1 S max (With ¡16bits, ¡SNR ¡= ¡96.32 ¡dB) ¡ 20log 10 = 20log 10 = 6.02 B dB 12 N max 19

  20. Dynamic Range, Clipping and Headroom Dynamic ¡range ¡ ¡ • Again, ¡RMS ¡of ¡full-­‑scale ¡sine ¡wave ¡ – The ¡raBo ¡between ¡the ¡loudest ¡and ¡soOest ¡levels ¡ for ¡ ¡both ¡loudest ¡and ¡soOest ¡ 2 B − 1 / S rms,max 2 (With ¡16bits, ¡DR ¡= ¡90.31 ¡dB) ¡ 20log 10 = 20log 10 = 6.02 B − 6 S rms,min 1/ 2 Clipping ¡ • – Non-­‑linear ¡distorBon ¡that ¡occurs ¡when ¡a ¡signal ¡is ¡above ¡the ¡max ¡level ¡ In ¡digital ¡audio, ¡0dB ¡is ¡regarded ¡ Headroom ¡ • as ¡the ¡maximum ¡level ¡ ¡(dBFS) ¡ – Different ¡between ¡the ¡signal ¡level ¡and ¡the ¡max ¡level ¡ Clipping ¡ 0 ¡dB ¡ Max ¡level ¡ Head ¡room ¡ B ¡= ¡16 ¡bits ¡ -­‑90.31 ¡dB ¡ Min ¡level ¡ -­‑98.08 ¡dB ¡ Noise ¡floor ¡ (By ¡quanBzaBon) ¡ 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend