1 / 23

Sound

Sound. Sound?. Continuous sequence of vibrations (waves, cycles) of air (Why no sound in space?) E.g. Piano key causes a vibration in the air, which we interpret as sound Abstraction of an audio wave: Ear translates into sound Speaker/ ear drum: out: crest/in :trough. Speakers.

avon
Download Presentation

Sound

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sound

  2. Sound? • Continuous sequence of vibrations (waves, cycles) of air • (Why no sound in space?) • E.g. Piano key causes a vibration in the air, which we interpret as sound • Abstraction of an audio wave: • Ear translates into sound • Speaker/ ear drum: out: • crest/in :trough

  3. Speakers • If you create a sound that vibrates 200 times/second • Send to a speaker • Speaker vibrates 200 times (in/out)

  4. 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?

  5. Cycles: Example of Two Hz Assume 1 second

  6. Hz? • What is the frequency in Hz?

  7. Wave to Digital • Pulse Code Modulation…pcm • Sample the wave at a specified rate • Sample Rate • Determine the associated amplitude at each sample • Sample value • Store the binary value of the amplitude (sample value)

  8. Example • Assume one second, one Hz

  9. Sample Data • Sample Rate = 72 ( 72 x-axis tick marks) • 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

  10. PCM Example… Sample Values: 7,9,11,12,13,14,14,15 etc. Binary nibbles: 0111, 1001, 1011,1100 etc.

  11. 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) • Note: I believe land line phones can only carry up to 4 kHz…any sounds above are not sent

  12. 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 • So final sample rate?

  13. 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 5 channels, not two • Sample rate 96,000 Hz, not the 44,100 as for CD

  14. 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

  15. 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

  16. 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

  17. 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 • High quality

  18. More audio formats • aiff : non-compressed, pcm • au: compressed, lossy, used by sun, unix, java • wma Windows Media Audio: lossy, compressed

  19. PowerPoint support

  20. Audio and Web • Html 4 • Used embed, object, plug-ins, etc. Very messy • Html 5: • Wav • Mp3 • Ogg (vorbis … professional, compressed format)

  21. Web Streaming versus downloading • Three ways to listen to sounds: • Download and play • Stream • Progressive download • Methods 2 and 3 above yield same results, different technologies • With progressive you end up with a (temp) file • YouTube streams • iTunes uses progressive

  22. 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

  23. In Class quiz

More Related