Sounds

 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization sounds can be thought of as waves whose amplitude varies over time; in order to digitize a sound, we take measurements of its amplitude at regular intervals and store a sequence of numbers

Control bar


















































 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization
bullet Converting from digital to analog once we hae a sound in digital form, we can store it, manipulate it, etc., but to re-play it, we must convert the discrete measurements back into a smooth curve. The fidelity of the recording will be affected by the degree to which we can accurately reconstruct the smooth curve from a discrete sequence of "stair-steps"

Control bar


















































 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization
bullet Converting from digital to analog
bullet Sampling rates (samples per second) the greater the frequency at which we take measurements, the more accurate our representation will be over time. CD quality sounds are sampled at a frequency of 44.1 KHz (thousands of times per second); in general, we should sample at about twice the greatest frequency we wish to be able to hear

Control bar


















































 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization
bullet Converting from digital to analog
bullet Sampling rates (samples per second)
bullet Sampling resolution (bits per sample) another parameter which affects the quality of sampled sound is the number of bits we use to represent the magnitude of each sample: more bits give us greater resolution, in the sense of a larger number of possible values

Control bar


















































 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization
bullet Converting from digital to analog
bullet Sampling rates (samples per second)
bullet Sampling resolution (bits per sample)
bullet Synthesized sound if we are producing sounds directly on a computer (as opposed to recording them from an outside source), we can describe the shapes of the sound waves precisely, using mathematical formula; then the fidelity of the final output is affected only by our ability to convert a mathematical curve in analog form

Control bar


















































 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization
bullet Converting from digital to analog
bullet Sampling rates (samples per second)
bullet Sampling resolution (bits per sample)
bullet Synthesized sound
bullet Applications of speech synthesis in addition to musical notes and tones, we can use sound synthesis techniques to create human-sounding speech from a computer, for example to read textual material for people with visual disabilities

Control bar


















































 

CS 231: Introduction to Programming
Lecture #3: Data representation

Sounds
bullet Sound wave structure and digitization
bullet Converting from digital to analog
bullet Sampling rates (samples per second)
bullet Sampling resolution (bits per sample)
bullet Synthesized sound
bullet Applications of speech synthesis
bullet Voice recognition we can also combine sampling techniques with other sound analysis techniques to attempt to recognize words and phrases of spoken language (i.e., translate spoken sound into text)

Control bar