Basics of Digital Audio Module (revised) MUSC 365 Basics of Digital Audio Module (revised)
Analog = continuous sound or audio waveform continuous time and amplitude infinite possibilities within a given range
Digital = discrete time and amplitude are discrete only certain values are allowed
Continuous vs. Discrete All numbers (including fractions) Only integers distance down my street number of houses on my street time it takes to cook an egg number of eggs a chicken lays volume of applesauce number of apples in a basket
Sampling the process of making discrete time Amplitude of a waveform is captured (sampled) at regularly spaced intervals the rate of repeat of this regularly spaced interval is called the sample rate (Pohlmann pg. 27) Proof in Couch pg. 90-91
Sampling Rate (ƒs) The sample rate determines the bandwidth of the system A signal of bandwidth BW may be LOSSLESSLY sampled if the sampling rate ƒs ≥ 2 • BW Input must be bandlimited to half the sampling rate High fs: Large guard band, Allows varispeedLow fs: Reduces transmission and storage BW Critical Sampling: When a signal is sampled at exactly twice its highest frequency. Never done in audio
Sampling Rate (ƒs) Common sample rates: 44.1kHz for audio only (CD, MP3, etc) 48kHz for video/film (DVD, etc) double (2x) and quadruple (4x) those rates
Nyquist Frequency half the sampling frequency (ƒs / 2) Highest frequency possible in a digital system 22.05kHz for ƒs = 44.1kHz
Sampling Process - Input Initial audio input frequencies above ƒs / 2 have been removed
Sampling Process waveform is periodically sampled A band limited waveform amplitude modulates an impulse train. The spectrum of an impulse train is sinewaves @ multiples of Fs. Modulated spectrum is waveform spectrum (bandlimited) repeated around multiples of Fs (with upper and lower sidebands). If impulses have some width, then the total spectrum is superimposed with the |Sin (x)/x| curve.
Sampling Process the sampled signal
Sampling Process - Reconstruction the sampled signal is reconstructed (made continuous) “connecting-the-dots”
Sampling Process There is only waveform that satisfies 2 conditions: it passes thru all the sample points, and it does not have frequencies above ƒs / 2
Aliasing Input signal must be bandlimited (frequencies above ƒs / 2 removed) If it is not, frequencies above ƒs / 2 are folded back into audio band This artifact is called aliasing
Aliasing a high frequency waveform is put into the sampler
Aliasing the waveform is periodically sampled
Aliasing the sampled signal
Aliasing after the signal is reconstructed to a continuous waveform, but it is not what was input!
Aliasing Aliasing also happens in visual media... If you watch a film of a spinning wheel, it can seem to stop or go backwards http://www.youtube.com/watch?v=C8_6NRXfRVE
Quantization the process of making discrete Amplitude the amplitude range is broken up into a fixed number of level, also called quantization intervals amplitude is measured and assigned to the closest interval giving a ‘quantity’
Quantization Process sampled waveform any amplitude is possible
Quantization Process amplitude is rounded to the closest quantization interval
Quantization Process this close-up shows that there is some error in the quantization process
Quantization Process the smaller the intervals, the smaller the error will be since the range (maximum to minimum) is fixed, more levels will mean smaller levels
Quantization number of levels based on word length (number of bits per sample) # of levels = 2 # of bits Adding bit doubles the number of levels, which cuts the error in half reduces error by 6dB 6dB of dynamic range per bit
Dynamic Range Loudest to quietest 6dB of dynamic range per bit
Dynamic Range 8 bits = 28 = 256 = 48dB 12 bits = 212 = 4,096 = 72dB
Incredible accuracy Imagine a stack of paper 22 feet high. The thickness of a sheet of paper is the accuracy of a 16-bit quantization interval! Now imagine a stack of paper a mile high. The thickness of a sheet of paper is the accuracy of a 24-bit quantization interval!
Quantization Error Distortion power relative to number of intervals, independent of amplitude of signal Error changes perceptively with input level High level signal has un-correlated error (random noise) Low level signal has correlated error – distortion, not noise-like Error is +/- 1/2 Q with a rectangular PDF (equal chance)
Quantization Error Quantization noise is not random, but based on signal Distortion produces harmonics which can aliasMultiple input freq. can cause intermodulation distortionQuantization error can create Aliasing (frequencies not present in source) even though it occurs after the sample process
Dither Noise added to the signal to de-correlate the signal from the quantizer
Pros Randomizes granulation distortion, changing it to random noise encodes low-level signals via PWMear averages PWM signal to resolve signalWith dither, resolution is below least significant bit!
Con Raises noise floor slightly
Analog vs. Digital Deterioration In Analog, noise steadily deteriorates the signal-to-noise ratio In Digital, audio quality is independent of transmission/storage quality Until we reach a point of catastrophic failure, when the data can no longer be received correctly
Analog vs. Digital Deterioration