cmpt 365 multimedia systems media representations audio
play

CMPT 365 Multimedia Systems Media Representations - Audio Spring - PowerPoint PPT Presentation

CMPT 365 Multimedia Systems Media Representations - Audio Spring 2017 CMPT365 Multimedia Systems 1 Outline Audio Signals Sampling Quantization Audio file format WAV/MIDI Human auditory system CMPT365 Multimedia


  1. CMPT 365 Multimedia Systems Media Representations - Audio Spring 2017 CMPT365 Multimedia Systems 1

  2. Outline ❒ Audio Signals ❍ Sampling ❍ Quantization ❒ Audio file format ❍ WAV/MIDI ❒ Human auditory system CMPT365 Multimedia Systems 2

  3. What is Sound ? ❒ Sound is a wave phenomenon, involving molecules of air being compressed and expanded under the action of some physical device. ❍ A speaker (or other sound generator) vibrates back and forth and produces a longitudinal pressure wave that perceived as sound. ❍ Since sound is a pressure wave, it takes on continuous values, as opposed to digitized ones. • If we wish to use a digital version of sound waves, we must form digitized representations of audio information. • Link to physical description of sound waves CMPT365 Multimedia Systems 3

  4. Sound Recording and Reproducing ❒ Thomas Edison's Phonograph 1877 ❍ first device to record and reproduce sound ❍ Medium: a tinfoil sheet phonograph cylinder. ❒ Alexander Graham Bell's improvement in 1880s CMPT365 Multimedia Systems 4

  5. Sound Recording and Reproducing Thomas Edison's Phonograph 1877 ❒ first device to record and reproduce sound ❍ Medium: a tinfoil sheet phonograph cylinder. ❍ Alexander Graham Bell's improvement in 1880s ❒ Emile Berliner’s gramophone ❒ double-sided discs ❍ Audio tapes, and later Compact Disc (CD) ❒ CMPT365 Multimedia Systems 5

  6. Physical World is often Analog ! CMPT365 Multimedia Systems 6

  7. Digitization ❒ 1-dimensional nature of sound: amplitude (sound pressure/level) depend on a 1D variable, the time . ❍ Input from microphone is analog signal ❒ Digitization : conversion to a stream of numbers, and preferably these numbers should be integers for efficiency. CMPT365 Multimedia Systems 7

  8. Digitization cont’d ❒ Digitization must be in both time and amplitude ❍ Sampling: measuring the quantity we are interested in, usually at evenly-spaced intervals ❒ First kind of sampling, using measurements only at evenly spaced time intervals, is simply called sampling . ❍ The rate is called the sampling frequency ❍ For audio, typically from 8 kHz (8,000 samples per second) to 48 kHz (determined by Nyquist theorem discussed later). ❒ Sampling in the amplitude or voltage dimension is called quantization CMPT365 Multimedia Systems 8

  9. Sampling and Quantization CMPT365 Multimedia Systems 9

  10. Audio Digitization (PCM) PCM: Pulse coded modulation CMPT365 Multimedia Systems 10

  11. Parameters in Digitizing ❒ To decide how to digitize audio data we need to answer the following questions: 1. What is the sampling rate? 2. How finely is the data to be quantized, and is quantization uniform? 3. How is audio data formatted? (file format) CMPT365 Multimedia Systems 11

  12. Outline ❒ Audio Signals ❍ Sampling ❍ Quantization ❒ Audio file format ❍ WAV/MIDI ❒ Human auditory system CMPT365 Multimedia Systems 12

  13. Sampling Rate ❒ Signals can be decomposed into a sum of sinusoids. -- weighted sinusoids can build up quite a complex signals (recall Calculus and linear algebra) CMPT365 Multimedia Systems 13

  14. Sampling Rate cont’d ❒ If sampling rate just equals the actual frequency ❍ a false signal (constant ) is detected ❒ If sample at 1.5 times the actual frequency ❍ an incorrect ( alias ) frequency that is lower than the correct one • it is half the correct one -- the wavelength, from peak to peak, is double that of the actual signal CMPT365 Multimedia Systems 14

  15. Sampling Rate cont’d ❒ For correct sampling we must use a sampling rate equal to at least twice the maximum frequency content in the signal. This rate is called the Nyquist rate . ❒ The relationship among the Sampling Frequency, True Frequency, and the Alias Frequency is as follows: ❍ CMPT365 Multimedia Systems 15

  16. Sampling Rate cont’d ❒ Fig. 6.5 shows the relationship of the apparent frequency to the input frequency. CMPT365 Multimedia Systems 16

  17. Sampling Rate cont’d ❒ Nyquist frequency : half of the Sampling rate ❍ Since it would be impossible to recover frequencies higher than Nyquist frequency in any event, most systems have an antialiasing filter that restricts the frequency content in the input to the sampler to a range at or below Nyquist frequency. CMPT365 Multimedia Systems 17

  18. Nyquist Theorem ❒ Sampling theory – Nyquist theorem ❍ If a signal is band-limited , i.e., there is a lower limit f 1 and an upper limit f2 of frequency components in the signal, then the sampling rate should be at least 2( f 2 − f 1). Proof and more math: https://en.wikipedia.org/wiki/Nyquist-Shannon_sampling_theorem https://en.wikipedia.org/wiki/Undersampling CMPT365 Multimedia Systems 18

  19. Outline ❒ Audio Signals ❍ Sampling ❍ Quantization ❒ Audio file format ❍ WAV/MIDI ❒ Human auditory system CMPT365 Multimedia Systems 19

  20. Quantization (Pulse Code Modulation) ❒ At every time interval the sound is converted to a digital equivalent ❒ Using 2 bits the following sound can be digitized ❍ Tel: 8 bits ❍ CD: 16 bits CMPT365 Multimedia Systems 20

  21. Digitize audio ❒ Each sample quantized, ❒ Example: 8,000 i.e., rounded samples/sec, 256 quantized values --> ❍ e.g., 2 8 =256 possible 64,000 bps quantized values ❒ Each quantized value ❒ Receiver converts it represented by bits back to analog signal: ❍ 8 bits for 256 values ❍ some quality reduction Example rates ❒ CD: 1.411 Mbps ❒ MP3: 96, 128, 160 kbps (with compression) ❒ Internet telephony: 5.3 - 13 kbps (with compression) CMPT365 Multimedia Systems 21

  22. Audio Quality vs. Data Rate CMPT365 Multimedia Systems 22

  23. More on Quantization ❒ Quantization is lossy ! ❒ Roundoff errors => quantization noise/error CMPT365 Multimedia Systems 23

  24. Quantization Noise ❒ Quantization noise : the difference between the actual value of the analog signal, for the particular sampling time, and the nearest quantization interval value. ❍ At most, this error can be as much as half of the interval. ❒ The quality of the quantization is characterized by the Signal to Quantization Noise Ratio ( SQNR ). ❍ A special case of SNR (Signal to Noise Ratio) CMPT365 Multimedia Systems 24

  25. Signal to Noise Ratio (SNR) ❒ Signal to Noise Ratio ( SNR ): the ratio of the power of the correct signal and the noise ❍ A common measure of the quality of the signal ❍ The ratio can be huge and often non-linear ❒ So practically, SNR is usually measured in log- scale: decibels ( dB ), where 1 dB is 1/10 Bel . The SNR value, in units of dB, is defined in terms of base-10 logarithms of squared voltages, as follows: CMPT365 Multimedia Systems 25

  26. Signal to Noise Ratio (SNR) cont’d ❒ The actual power in a signal is proportional to the square of the voltage. For example, if the signal voltage V signal is 10 times the noise, then the SNR is 20 log 10 (10)=20dB. ❍ if the power from ten violins is ten times that from one violin playing, then the ratio of power is 10dB, or 1B. CMPT365 Multimedia Systems 26

  27. Common sound levels CMPT365 Multimedia Systems 27

  28. Quantization Noise Ratio ❒ Aside from any noise that may have been present in the original analog signal, there is also an additional error that results from quantization. ❍ (a) If voltages are actually in 0 to 1 but we have only 8 bits in which to store values, then effectively we force all continuous values of voltage into only 256 different values. ❍ (b) This introduces a roundoff error. It is not really “noise”. Nevertheless it is called quantization noise (or quantization error). CMPT365 Multimedia Systems 28

  29. Signal-to-Quantization Noise Ratio (SQNR) ❒ The quality of the quantization is characterized by the Signal to Quantization Noise Ratio ( SQNR ). Quantization noise : the difference between the actual (a) value of the analog signal, for the particular sampling time, and the nearest quantization interval value. ❍ (b) At most, this error can be as much as half of the interval. CMPT365 Multimedia Systems 29

  30. Signal-to-Quantization Noise Ratio (SQNR) cont’d ❒ For a quantization accuracy of N bits per sample, the peak SQNR can be simply expressed: ❒ 6 . 02 N is the worst case. Note: We map the maximum signal to 2 N − 1 − 1 ( ≃ 2 N − 1 ) and the most negative signal to − 2 N − 1 . Dynamic range : the ratio of maximum to minimum absolute values of the signal: V max /V min . The max abs. value V max gets mapped to 2 N − 1 − 1; the min abs. value V min gets mapped to 1. V min is the smallest positive voltage that is not masked by noise. The most negative signal, − V max , is mapped to − 2 N − 1 . CMPT365 Multimedia Systems 30

  31. Linear and Non-linear Quantization q Linear format : samples are typically stored as uniformly quantized values. ❒ Non-uniform quantization : set up more finely-spaced levels where humans hear with the most acuity. ❍ Weber’s Law stated formally says that equally perceived differences have values proportional to absolute levels: (6.5) Δ Response ∝ Δ Stimulus/Stimulus ❍ Inserting a constant of proportionality k , we have a differential equation that states: (6.6) dr = k (1/ s ) ds with response r and stimulus s . CMPT365 Multimedia Systems 31

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