DOC PREVIEW
UCSB ECE 160 - Multimedia

This preview shows page 1-2-3-4-5-35-36-37-38-39-70-71-72-73-74 out of 74 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 74 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE160Spring 2008Lecture 6Basics of Digital Audio1ECE160 / CMPS182MultimediaLecture 6: Spring 2008Basics of Digital AudioECE160Spring 2008Lecture 6Basics of Digital Audio2Digitization of SoundWhat is Sound?• Sound is a wave phenomenon like light, but is macroscopic andinvolves molecules of air being compressed and expanded underthe action of some physical device.(a) A speaker in an audio system moves back and forth andproduces a longitudinal pressure wave that we perceive as sound.(b) Since sound is a pressure wave, it takes on continuous analogvalues, as opposed to digitized ones.• (c) Even though pressure waves are longitudinal, they still haveordinary wave properties and behaviors, i.e. reflection (bouncing),refraction (change of direction on entering a medium with a differentdensity) and diffraction (bending around an obstacle).(d) If we wish to use a digital version of sound waves we must formdigitized representations of analog audio information.ECE160Spring 2008Lecture 6Basics of Digital Audio3Digitization of Sound• Digitization means conversion to a stream of numbers,and preferably these numbers should be integers forefficiency.• The figure shows the 1-dimensional nature of sound:amplitude values depend on a 1D variable, time.(Images depend instead on a 2D set of variables, x andy).ECE160Spring 2008Lecture 6Basics of Digital Audio4Digitization of Sound• The sound be made digital in both time and amplitude. To digitize,the signal is sampled in each dimension: in time, and in amplitude.(a) Sampling means measuring the quantity in one dimension,usually at evenly-spaced intervals in the other dimension.(b) The first kind of sampling, using measurements only at evenlyspaced time intervals, is simply called, sampling. The rate at which itis performed is called the sampling rate or frequency.(c) For audio, typical sampling rates are from 8 kHz (8,000 samplesper second) to 48 kHz. This rate is determined by Nyquist theorem.• (d) Sampling in the amplitude dimension is called quantization.ECE160Spring 2008Lecture 6Basics of Digital Audio5Digitization of Sound• Thus to decide how to digitize audio datawe need to answer the followingquestions: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)ECE160Spring 2008Lecture 6Basics of Digital Audio6Nyquist Theorem• Signalscan bedecomposedinto a sumof sinusoids.The figureshows howweightedsinusoidscan buildup quite acomplexsignal.ECE160Spring 2008Lecture 6Basics of Digital Audio7Nyquist TheoremThe Nyquist theorem states how frequently we must sample in time tobe able to recover the original sound.(a) The figure shows a single sinusoid: it is a single, pure, frequency(only electronic instruments can create such sounds).(b) If sampling rate just equals the actual frequency, the figure showsthat a false signal is detected: a constant, with zero frequency.ECE160Spring 2008Lecture 6Basics of Digital Audio8Nyquist Theorem(c) If we sample at 1.5 times the actual frequency, the figure shows thatwe obtain an incorrect (alias) frequency that is lower than thecorrect frequency - it is half the correct frequency.(d) For correct sampling we must use a sampling rate equal to at leasttwice the maximum frequency content in the signal. This rate iscalled the Nyquist rate.ECE160Spring 2008Lecture 6Basics of Digital Audio9Nyquist Theorem• Nyquist Theorem: If a signal is band-limited, i.e., thereis a lower limit f1 and an upper limit f2 of frequencycomponents in the signal, then the sampling rate shouldbe at least 2(f2 − f1).• Nyquist frequency: half of the Nyquist rate.- Since it would be impossible to recover frequencieshigher than Nyquist frequency in any event, mostsystems have an antialiasing filter that restricts thefrequency content in the input to the sampler to a rangeat or below Nyquist frequency.• The relationship among the Sampling Frequency, TrueFrequency, and the Alias Frequency isECE160Spring 2008Lecture 6Basics of Digital Audio10Pitch• Whereas frequency is an absolute measure, pitch is generallyrelative - a perceptual subjective quality of sound.(a) Pitch and frequency are linked by setting the note A abovemiddle C to exactly 440 Hz.(b) An octave above that note takes us to another A note.An octave corresponds to doubling the frequency. Thus withthe middle “A" on a piano (“A4" or “A440") set to 440 Hz,the next “A" up is at 880 Hz, or one octave above.(c) Harmonics: any series of musical tones whose frequencies areintegral multiples of the frequency of a fundamental tone.(d) If we allow non-integer multiples of the base frequency,we allow non-”A" notes and have a more complex resulting sound.ECE160Spring 2008Lecture 6Basics of Digital Audio11Pitch• In general, the apparent pitch of a sinusoid is the lowestfrequency of a sinusoid that has exactly the samesamples as the input sinusoid. The figure shows therelationship of the apparent pitch (frequency) to the inputfrequency, which is sampled at 8,000 Hz. The foldingfrequency, shown dashed, is 4,000 Hz.ECE160Spring 2008Lecture 6Basics of Digital Audio12Signal to Noise Ratio (SNR)• The ratio of the power of the correct signal andthe noise is called the signal to noise ratio (SNR)- a measure of the quality of the signal.• The SNR is usually measured in decibels (dB),where 1 dB is a tenth of a bel. The SNR value,in units of dB, is defined in terms of base-10logarithms of squared voltages:ECE160Spring 2008Lecture 6Basics of Digital Audio13Signal to Noise Ratio (SNR)a) The power in a signal is proportional to thesquare of the voltage. For example, if the signalvoltage Vsignal is 10 times the noise, then theSNR is 20 log10(10)=20dB.b) In terms of power, if the power from ten violins isten times that from one violin playing, then theratio of power is 10dB, or 1B.ECE160Spring 2008Lecture 6Basics of Digital Audio14Sound LevelsThe usual levelsof sound we heararound us aredescribed interms of decibels,as a ratio to thequietest soundwe are capableof hearing.The table showsapproximatelevels forthese sounds.ECE160Spring 2008Lecture 6Basics of Digital Audio15Signal to Quantization Noise Ratio (SQNR)• Aside from any noise present in the original analog signal,there is also an additional error that results from quantization.(a) If voltages are 0 to 1 but we have only 8 bits to storevalues, then we force all continuous values into only 256different values.(b) This introduces a


View Full Document

UCSB ECE 160 - Multimedia

Download Multimedia
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Multimedia and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Multimedia 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?