media audio pptx - niagara...

42
Media Devices: Audio CTEC1465/2018S Computer System Support

Upload: others

Post on 17-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Media Devices: Audio

CTEC1465/2018SComputer System Support

Page 2: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Learning Objective• Describe how to implement sound in a PC

Page 3: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Introduction• The process by which sounds are stored in

electronic format on your PC is called sampling.

• Sampling means capturing the state or quality of a particular sound wave a set number of times each second.

Page 4: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Introduction (2)• All the characteristics of a particular sound wave—

amplitude, frequency, timbre—need to be recorded and translated into ones and zeros to reproduce that sound accurately within the computer and out to your speakers.

• Sounds are sampled thousands of times per second. • The amount of information stored at each sampling

is called the bit depth, and the higher the bit depth, the better the recording.

Page 5: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

COMMUNICATIONS AND SAMPLING THEORY

Media: Audio

Page 6: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Baseband Communication Systems

• Information can be defined in two forms:

– analog

– digital

• Information is represented as a signal.

Page 7: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Baseband Communication Systems

• Analog signals:

– are considered continuous

– have an amplitude with any number of values between the signal maximum and minimum (the “dynamic range”)

Page 8: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Baseband Communication Systems

• Digital signals are represented by bits(zeroes and ones) and binary numbers– digital signals are considered discrete

• Digital devices convert analog signals to digital signals using sampling and quantization.

Page 9: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Capacity of a Communications Channel

• Capacity (C), also known as throughput, is the measurement of a communications channel to carry information and is measured in Bits Per Second or bps

Page 10: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Capacity of a Communications Channel (with no noise present)

C = 2�BW�log2Nwhere:

– BW is the bandwidth of the channel in Hertz

– N is the number of coding levels used when transmitting the message. For example, if binary transmission is being used, N=2.

Page 11: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Capacity of a Communications Channel (with no noise present) - 2

• Example: If a channel has a 100 kHz bandwidth and 8-level coding is being used, the capacity of the channel is:

C = 2(100 kHz)log28 = 2(100kHz)(3 bits) = 600 kbps

Page 12: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Capacity of a Communications Channel (with noise present)

• From the above equation, to increase the capacity of a channel we simply increase the number of possible coding levels.

• Sounds too good to be true?

• Well, in reality it is too good to be true…

Page 13: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

• This is because, in real-life, no channel is “noiseless”. All channels are affected by noise and there is no way to completely eliminate.

• Claude Shannon, a communications engineer in the 1940’s came up with a formula that included the effects of noise on the capacity of a channel.

Capacity of a Communications Channel (with noise present) - 2

Page 14: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

• The formula calculates the maximum capacity of a channel before errors in transmission start to occur:

C = BW�log2(1+S/N)where

S = signal power (in watts) used in the channelN = noise power (in watts) present in the channel

Capacity of a Communications Channel (with noise present) - 3

Page 15: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

• Notice that as the noise level (N) increases, the capacity of the channel decreases. Just what you would expect.

• To increase the capacity of a channel with a fixed amount of noise, either increase its bandwidth (BW) or increase the signal power (S).

Capacity of a Communications Channel (with noise present) - 4

Page 16: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Nyquist determined that the number of independent pulses that could be put through a channel per unit time is limited to twice the bandwidth of the channel:

where fp is the pulse frequency (in pulses per second) and B is the

bandwidth (in hertz). The quantity 2B later came to be called the Nyquist rate, and transmitting at the limiting pulse rate of 2B pulses per second as signalling at the Nyquist rate.

Nyquist

Page 17: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

NOISE AND COMMUNICATIONS• Where does noise originate in a

communication system?1. Channel2. Equipment

• DEFINE:-undesired random variations that interfere with the desired

signal and inhibit communication.

Page 18: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Signal-to-Noise Ratio• Signal-to-noise ratio is defined as the power ratio

between a signal (meaningful information) and the background noise (unwanted signal)

• In decibels the formula can be rewritten as:

where A is root mean square (RMS) amplitude (for example, RMS voltage).

Page 19: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Signal-to-Noise Ratio (2)• Dynamic range measures the ratio between the

strongest un-distorted signal on a channel and the minimum discernable signal, which for most purposes is the noise level.

• SNR measures the ratio between an arbitrary signal level (not necessarily the most powerful signal possible) and noise.

Page 20: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Signal-to-Noise Ratio (3)• Measuring signal-to-noise ratios requires the

selection of a representative or reference signal.

• In audio engineering, the reference signal is usually a sine wave at a standardized nominal or alignment level, such as 1 kHz at +4 dBu (1.228 VRMS).

Page 21: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Signal-to-Noise Ratio (4)• For digital signals, the number of bits used to

represent the measurement determines the maximum possible signal-to-noise ratio.

• This is because the minimum possible noise level is the error caused by the quantization noise.

Page 22: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Signal-to-Noise Ratio (5)• For n-bit integers (i.e., fixed point Digital Signal

Processing [DSP]) with equal distance between quantization levels the dynamic range (DR) is also determined.

• The quantization noise is a uniformly-distributed random signal with a peak-to-peak amplitude of one quantization level, making the amplitude ratio 2n/1.

Page 23: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Signal-to-Noise Ratio (6)

• This relationship is the origin of statements like "16-bit audio has a dynamic range of 96 dB".

• Each extra bit increases the dynamic range by roughly 6 dB.

Page 24: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

References• Greg Swick, “ELNC545 Course Notes” (Winter 2003).

• John Clark, "CTEC1463 Course Notes" (Winter 2000).

• Charan Langton, “All About Modulation - Part I”, Intuitive Guide to Principles of Communications, 2002. www.complextoreal.com Retrieved from http://people.seas.harvard.edu/~jones/cscie129/papers/modulation_1.pdf on May 22, 2014.

Page 25: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

References (2)• http://en.wikipedia.org/wiki/Signal-to-noise_ratio

• http://en.wikipedia.org/wiki/Shannon-Hartley_theorem

• http://en.wikipedia.org/wiki/Decibel

• http://www.electronicshub.org/modulation-and-different-types-of-modulation/

• https://en.wikibooks.org/wiki/Communication_Systems/

Page 26: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

ANALOG-TO-DIGITAL CONVERTER (ADC)&DIGITAL-TO-ANALOG CONVERTER (DAC)

Media: Audio

Page 27: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Analog-to-Digital Conversion

Steven W. Smith, "The Scientist and Engineer's Guide to Digital Signal Processing", 2nd ed. Retrieved from http://www.dspguide.com

Page 28: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Digital-to-Analog Conversion

Steven W. Smith, "The Scientist and Engineer's Guide to Digital Signal Processing", 2nd ed. Retrieved from http://www.dspguide.com

Page 29: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Digital Signal Processing (DSP) System

Steven W. Smith, "The Scientist and Engineer's Guide to Digital Signal Processing", 2nd ed. Retrieved from http://www.dspguide.com

Page 30: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

DSP System• The block diagram of a DSP system, as the

sampling theorem dictates it should be.

• Before encountering the analog-to-digital converter, the input signal is processed with an electronic low-pass filter to remove all frequencies above the Nyquist frequency(one-half the sampling rate).

Steven W. Smith, "The Scientist and Engineer's Guide to Digital Signal Processing", 2nd ed. Retrieved from http://www.dspguide.com

Page 31: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

DSP System (2)• This is done to prevent aliasing during

sampling, and is correspondingly called an antialias filter.

• On the other end, the digitized signal is passed through a digital-to-analog converter and another low-pass filter set to the Nyquistfrequency.

• This output filter is called a reconstruction filter.

Steven W. Smith, "The Scientist and Engineer's Guide to Digital Signal Processing", 2nd ed. Retrieved from http://www.dspguide.com

Page 32: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Human Hearing & Sampling Rate• The commonly stated range of human hearing

is 20 Hz to 20 kHz. https://en.wikipedia.org/wiki/Hearing_range• An audio CD can represent frequencies up to

22.05 kHz, the Nyquist frequency of the 44.1 kHz sample rate. https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio

• https://en.wikipedia.org/wiki/44,100_Hz

Page 33: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

https://commons.wikimedia.org/wiki/File:Perceived_Human_Hearing.png

Page 34: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

PC AUDIO HARDWARE & SOFTWARE

Media: Audio

Page 35: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

AC ‘97• https://en.wikipedia.org/wiki/AC%2797• Audio codec standard developed by Intel in

1997.• Up to 6 channels of audio• 48/96 kHz sample rate• 16 or 20 bit• surround sound

Page 36: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Intel High Definition Audio• https://en.wikipedia.org/wiki/Intel_High_Definition_

Audio• http://www.intel.com/content/www/us/en/chipsets

/high-definition-audio.html• Audio codec standard developed by Intel in 2004 to

replace AC ‘97.• 15 streams of 16 audio channels• 8 to 32 bits• 6 to 192 kHz sample rates

Page 37: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Sound Cards• Every sound card supports two speakers or a pair

of headphones, but many better sound cards support five or more speakers in discrete channels.

• These multiple speakers provide surround sound and bass through a subwoofer.

• Better sound cards have a lower signal-to-noise ratio and support for multiple audio connections, such as a microphone, line in, and S/PDIF.

Page 38: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Sound Files• The popular WAV file format (as well as most other

recorded sound formats) is based on PCM (Pulse Code Modulation – uncompressed audio.)

• WAV files can be huge, especially when sampled at high frequency and depth, so compression is a popular way to reduce the file size of recorded sounds.

• The most popular compressed file type is MP3.http://www.mp3-history.com/

• A large number of other sound file formats are available, such as AAC and WMA.

Page 39: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Player Software• To play sounds, you must have some form of

player software, such as Windows Media Player.

• Not all players can play all types of sound files. • Some file formats, such as RealMedia, require

their own proprietary players.• https://www.videolan.org/vlc/index.html

Page 40: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Links• http://www.tomshardware.com/reviews/high-

end-pc-audio,3733.htmlWhat Does It Take To Turn The PC Into A Hi-Fi Audio Platform?

• http://www.dspguide.com/pdfbook.htmThe Scientist and Engineer's Guide to Digital Signal Processing

Page 41: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Links• http://www.pcadvisor.co.uk/how-

to/audio/3491386/how-get-better-quality-audio-from-your-pc/How to get better quality audio and music from your PC: everything you need to know about FLAC and DACs

• http://manual.audacityteam.org/man/digital_audio.htmlDigital Audio Fundamentals

Page 42: Media Audio pptx - Niagara Collegetechnology.niagarac.on.ca/courses/ctec1465/images/week4/Audio.pdf · Signal-to-Noise Ratio (2) • Dynamic range measures the ratio between the strongest

Links• https://en.wikipedia.org/wiki/Audio_signal_processing• https://en.wikipedia.org/wiki/Digital_recording• https://en.wikipedia.org/wiki/Codec• https://en.wikipedia.org/wiki/Comparison_of_audio_coding_f

ormats• https://en.wikipedia.org/wiki/List_of_codecs• https://en.wikipedia.org/wiki/Comparison_of_container_for

mats• https://en.wikipedia.org/wiki/Pulse-code_modulation• https://en.wikipedia.org/wiki/MP3