Sound: Introduction Encoding and Simple Manipulation.
-
Upload
hilary-warner -
Category
Documents
-
view
223 -
download
2
Transcript of Sound: Introduction Encoding and Simple Manipulation.
![Page 1: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/1.jpg)
Sound: Introduction
Encoding and Simple Manipulation
![Page 2: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/2.jpg)
Sound is made when something vibrates
Air molecules oscillate back and forth from their equilibrium position, affecting their neighbors
![Page 3: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/3.jpg)
Sound waves are pressure waves• As molecules oscillate back and forth, areas of high and low
pressure occur• Called compressions and rarefactions, respectively
![Page 4: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/4.jpg)
Sound waves are longitudinal• Motion is parallel to
direction of energy transport
• Representation of sound by a sine wave is merely an attempt to illustrate the sinusoidal nature of the pressure-time fluctuations
![Page 5: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/5.jpg)
Sound waves are longitudinal
• Plot pressure fluctuations over time encountered by a fixed detector
![Page 6: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/6.jpg)
Properties of sound waves
• Frequency: cycles per second (Hz)
• Amplitude: distance from 0
![Page 7: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/7.jpg)
Psychoacoustics: Human Perception of Sound
• Ear serves as transducer: coverts sound energy to mechanical energy to nerve impulse transmitted to brain
![Page 8: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/8.jpg)
Psychoacoustics: Human Perception of Sound
• Pitch• Loudness• Timbre
![Page 9: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/9.jpg)
Psychoacoustics: Human Perception of Sound
• Pitch – frequency• Loudness – amplitude• Timbre – combination of various frequencies
![Page 10: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/10.jpg)
Pitch
• Humans hear frequencies between 20 Hz and 20,000 Hz • frequency = pitch
![Page 11: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/11.jpg)
Pitch
• Humans hear frequencies between 20 Hz and 20,000 Hz • frequency = pitch
Hearing works on ratios for pitch…
We hear difference between 200 Hz and 400 Hz, the same as 500 Hz and 1000 Hz
![Page 12: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/12.jpg)
Loudness• Perception of volume is related logarithmically to
changes in amplitude• amplitude = pitch
![Page 13: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/13.jpg)
Loudness
If one sound is 10x times more intense than another sound, then it has a sound level which is 10*x more decibels than the less intense sound.
Intensity is very objective quantity; can be measured with sensitive instrumentation
Loudness is more subjective response; will vary with a number of factors (e.g. age, frequency)
![Page 14: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/14.jpg)
Decibel is a logarithmic measure
• A decibel is a ratio between two intensities: 10 * log10(I1/I2)– As an absolute measure, it’s in comparison to
threshold of audibility– 0 dB can’t be heard. – Normal speech is 60 dB. – A shout is about 80 dB
![Page 15: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/15.jpg)
Digitizing Sound• Analog-to-digital conversion: measure amplitude at an
instant as a number• Instantaneous measure is called a sample
![Page 16: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/16.jpg)
Understanding how computers represent sound
• Consider how a film represents motion…– Movie is made by taking still photos in rapid
sequence at a constant rate, usually twenty-four frames per second
– When the photos are displayed in sequence at that same rate, it fools us into thinking we are seeing continuous motion, even though we are actually seeing twenty-four discrete images per second
http://music.arts.uci.edu/dobrian/digitalaudio.htm
![Page 17: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/17.jpg)
http://en.wikipedia.org/wiki/Animation
A collection of still frames
![Page 18: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/18.jpg)
![Page 19: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/19.jpg)
![Page 20: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/20.jpg)
![Page 21: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/21.jpg)
![Page 22: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/22.jpg)
![Page 23: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/23.jpg)
![Page 24: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/24.jpg)
![Page 25: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/25.jpg)
![Page 26: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/26.jpg)
![Page 27: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/27.jpg)
![Page 28: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/28.jpg)
![Page 29: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/29.jpg)
![Page 30: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/30.jpg)
How computers represent sound
• Digital recording of sound works on the same principle– We take many discrete samples of the sound
wave's instantaneous amplitude, store that information, then later reproduce those amplitudes at the same rate to create the illusion of a continuous wave
http://music.arts.uci.edu/dobrian/digitalaudio.htm
![Page 31: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/31.jpg)
How often should we take samples?
• sampling rate: number of samples taken per second
• Nyquist Theorem: need to take twice as many samples as the highest frequency we wish to record– Sampling rate = 2 * max sound wave frequency
![Page 32: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/32.jpg)
How often should we take samples?
• sampling rate: number of samples taken per second
• Nyquist Theorem: need to take twice as many samples as the highest frequency we wish to record– Sampling rate = 2 * max sound wave frequency
• CD quality is 44,100 samples per second– what is the max frequency a CD can represent?
![Page 33: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/33.jpg)
Nyquist Theorem
• Consider a graph of a 4,000 Hz cosine wave, being sampled at a rate of 22,050 Hz
• Sample is taken every 0. 045 milliseconds
http://music.arts.uci.edu/dobrian/digitalaudio.htm
![Page 34: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/34.jpg)
Nyquist Theorem
• Consider same 4,000 Hz cosine wave sampled at 6,000 Hz
• Sample is taken every 0. 167 milliseconds • Wave completes more than 1/2 cycle per sample
http://music.arts.uci.edu/dobrian/digitalaudio.htm
![Page 35: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/35.jpg)
Digitizing sound with the computer: bit depth
• The range of possible sample values depends on the number of bits used to store each sample
• Common bit-depths: 8 and 16
http://music.arts.uci.edu/dobrian/digitalaudio.htm
![Page 36: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/36.jpg)
16 bits per sample: +/- 32K
• Each sample can be between -32,768 and 32,767
Compare this to 0..255 for light intensity
(i.e. 8 bits or 1 byte giving us 256 different values)
Why such a bizarre number?
Because 32,768 + 32,767 + 1 = 216
i.e. 16 bits, or 2 bytes< 0 > 0 0
![Page 37: Sound: Introduction Encoding and Simple Manipulation.](https://reader036.fdocuments.us/reader036/viewer/2022062803/56649f4e5503460f94c6ed9b/html5/thumbnails/37.jpg)
Properties of sound
Sound wave• Frequency• Amplitude• Wavelength• Period
Digitized sound• Sampling rate• Bit depth• Playback rate