{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS 100 M Lecture 22

CS 100 M Lecture 22 - 22 Working with Sound Files wavread...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
22. Working with Sound Files wavread sound wavwrite
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Reading and Playing [y,rate,nBits] = wavread(‘noCry.wav’) sound(y,rate) We will work with .wav files How is audio information encoded?
Image of page 2
Discrete vs Continuous Sound is continuous. Capture its essence by sampling. Digitized sound = 1-dim array of numbers
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Quality Issue: Sampling Rate If sampling not frequent enough, then the discretized sound will not capture the essence of the continuous sound… Too slow OK
Image of page 4
Given human perception, about 20000 samples/second is pretty good. i.e., 20000 Hertz i.e., 20kHZ Sampling Rate (Cont’d)
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Sampling Rate (Cont’d) 8,000 Hz required for speech over the telephone 44,100 Hz required for audio CD, MP3 files 192,400 Hz required for HD-DVD audio tracks
Image of page 6
Quality Issue: Resolution Each sampled value is encoded as an eight-bit integer in the .wav file. Possible values: -128, -127,…,-1,0,1,…,127 Loud: -120, 90, 122, etc Quiet: 3, 10, -5 8-bits usually enough. Sometimes 16-bits
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Back to wavread [y,rate,nBits] = wavread('noCry.wav'); n = length(y) n = 77804 rate = 11025 nBits = 8 noCry.wav encoded the sound with 77,804 8-bit numbers which were gathered over a span of about 77804/11025 secs
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern