continuous sequence of vibrations of air (why no sound in space? contrary to star wars etc.) ...
TRANSCRIPT
SOUND
Sound?
Continuous sequence of vibrations of air (Why no sound in space? Contrary to Star
Wars etc.) Abstraction of an audio wave:
Ear translates vibrations into sound The slightest air-pressure fluctuations will
move ear drum back and forth
Speakers
If you create a sound that vibrates 200 times/second
Send to a speaker, head phone… Speaker vibrates 200 times in/out in a second
Frequency
The number of vibrations (waves), usually per second
Measure: Hertz Example:
Assume 2 second interval Vibration of 1,000 times Cycles/second in Hz? i.e. how many vibrations in one second?
Cycles: Example of Two Hz
Assume 1 second
Hz?
What is the frequency in Hz?
Wave to Digital
Pulse Code Modulation… (DVDs outputs it)
Sample the wave at a specified rate (samples per second) Sample Rate
Determine the associated amplitude at each sample Sample value
Store the binary value of the amplitude (sample value)
Example
Assume one second, one Hz
Made up Sample Data: Assume
Sample Rate = 72 ( measure amplitude 72 times/second)
Sample Size: 4 bits (2^4 = 16 possible values)
So: Every 1/72 of a second, determine amplitude using 4 bits and save as binary
PCM Example…
Sample Values: 7,9,11,12,13,14,14,15 etc.Binary nibbles: 0111, 1001, 1011,1100 etc.
Common Ranges
Humans Hearing: 20Hz to 20k Hz Dogs hearing: 40 Hz to 40k Hz Voice range 80 Hz to about 4 kHz ( 4,000
Hz)
Frequency and sampling
Nyquist’s theorem (revisited): For best pcm result
Sample at 2 x highest frequency What did we say was the highest
frequency of human hearing? So, what should be the sample rate? Actually we add 4,100 cycles…thanks to
Sony So final sample rate?
CDs
Sample rate: 44,100/second Sample size: 16 bits
What is the highest possible sample value? Sample size for DVDs is usually 24 bits
And we have 5 channels, not two (L,C,R,S1, S2) Sample rate 96,000 Hz, not the 44,100 as for CD
Storage of 1 minute stereo music on a CD
Sample rate: 44,100 Hz Bit depth ( sample size) 16 bits/sample
Allows for 2^16 sample values Stereo : two channels
Total number of Samples (for 60 seconds)
60 seconds x 44,100 samples/second = 2,646,000 samples
Number of bits to store 2,646,000 samples x 16 bits/sample = 42,336,000 bits
That’s for one channel For two channels:
42,336,000 x 2 = 84,672,000 bits perminute
Size…continued
How many bytes? 84,672,000 bits/(8 bits/byte)= 10,584,000 bytes
Kilobytes (KB)? 10,584,000 bytes (1024 bytes/KB)= 10,336 KB
MB? 10,336/(1024 KB/MB) = 10 MB for 1 minute
Compression
Save space Are Lossless and lossy compression Some uncompressed audio formats:
WAV, FLAC ( Use wav as master, use mp3 for deployment )
Phone (iphone and Android) format is compressed, lossless (.m4a)
Lossy compressed: mp3 Eliminates sounds we supposedly can’t hear
or don’t want to hear
More audio formats
aiff : non-compressed, pcm au: compressed, lossy, used by sun, unix,
java wma Windows Media Audio: lossy,
compressed
PowerPoint support
Audio and the Web
Html 4 supported formats Used embed, object, plug-ins, etc. Very messy
Html 5: Wav Mp3 Ogg (vorbis … professional, compressed
format)
Web Streaming versus downloading (Video and Audio) Three ways to listen to sounds:
Download and play Stream Progressive download
Methods 2 and 3 above yield same results, different technologies
YouTube streams File usually saved in a Temp folder
iTunes uses progressive The video file is not stored on the viewer’s
computer – the data is played and then discarded by the media player. This lets you maintain more control over your content. Better choice
Streaming
If you listen to a radio station online, you will stream the music, since you're listening live and couldn't download all the songs that they play.
Instead, your computer connects to the radio station and receives an ongoing audio feed, or stream, with the radio station's programming.
It begins to play when a sufficient amount is playable. While you listen, more audio is being streamed.
When you stream a file, you will get to listen to or watch it, but won't have the file on your computer to do things with later