Session 18 The physics of sound and the manipulation of digital sounds.

Slides:



Advertisements
Similar presentations
Chp 13 Sound and Music.
Advertisements

Introduction to Digital Audio
MULTIMEDIA TUTORIAL PART - III SHASHI BHUSHAN SOCIS, IGNOU.
Georgia Institute of Technology Introduction to Processing Digital Sounds.
Digital Signal Processing
A Media Computation Cookbook Manipulating Images and Sounds for Use in Alice Part 1: Image Manipulations Part 2: Advanced Image Manipulations, e.g., changing.
The frequency spectrum
Digital Audio.
Image and Sound Editing Raed S. Rasheed Sound What is sound? How is sound recorded? How is sound recorded digitally ? How does audio get digitized.
Sound and Hearing. Sound Waves Sound waves are mechanical and longitudinal waves What does this tell you about sound waves? Sound waves need a material.
Computer Science 101 Introduction to Programming with Sounds.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 6: Modifying Sounds Using Loops.
The Human Ear fancy sub-heading. Parts of the ear Three main parts: The outer ear consists of the pinna, ear canal and eardrum The middle ear consists.
Digital audio. In digital audio, the purpose of binary numbers is to express the values of samples that represent analog sound. (contrasted to MIDI binary.
Digital Audio Watermarking: Properties, characteristics of audio signals, and measuring the performance of a watermarking system نيما خادمي کلانتري
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
Lecture # 22 Audition, Audacity & Sound Editing Sound Representation.
DTC 354 Digital Storytelling Rebecca Goodrich. Wave made up of changes in air pressure by an object vibrating in a medium—water or air.
CompSci Today’s topics Sound Upcoming ä Intellectual property ä Network analysis ä Security Reading.
Computing with Digital Media: A Study of Humans and Technology Mark Guzdial, School of Interactive Computing.
COMP Representing Sound in a ComputerSound Course book - pages
Art 321 Sound, Audio, Acoustics Dr. J. Parker. Sound What we hear as sound is caused by rapid changes in air pressure! It is thought of as a wave, but.
CSC361/661 Digital Media Spring 2002
Computer Some basic concepts. Binary number Why binary? Look at a decimal number: 3511 Look at a binary number: 1011 counting decimal binary
CompSci Today’s topics Sound Upcoming ä Sound splicing ä Intellectual property ä Network analysis Reading Introduction to Computing & Programming.
Sound and audio. Table of Content 1.Introduction 2.Properties of sound 3.Characteristics of digital sound 4.Calculate audio data size 5.Benefits of using.
COSC 1P02 Introduction to Computer Science 4.1 Cosc 1P02 Week 4 Lecture slides “Programs are meant to be read by humans and only incidentally for computers.
Overview of Multimedia A multimedia presentation might contain: –Text –Animation –Digital Sound Effects –Voices –Video Clips –Photographic Stills –Music.
Introduction to SOUND.
Sound and Waves.
Hearing Sound – Travels through the air in waves – Caused by changes in air pressure that result from vibration of air molecules – Anything that makes.
More Meaningful Jargon Or, All You Need to Know to Speak Like a Geek Sound.
Physics Acoustics for Musicians
Sound Waves Physic 11 · Chapter 9.
SOUND SOUND IS A FORM OF ENERGY SOUND IS A WAVE SOUND WAVES REQUIRE A MEDIUM SOUND HAS PROPERTIES: –AMPLITUDE –FREQUENCY SOUND VOLUME IS MEASURED IN DECIBELS.
Georgia Institute of Technology Introduction to Processing Digital Sounds part 1 Barb Ericson Georgia Institute of Technology Sept 2005.
The Physics Of Sound Why do we hear what we hear?
Sound
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
Properties of Sound Making Waves. Sound Waves ■Sound is created by vibrations.
Encoding and Simple Manipulation
CS 102 Computers In Context (Multimedia)‏ 03 / 30 / 2009 Instructor: Michael Eckmann.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 6: Modifying Sounds Using Loops.
Chapter 2 Basic Science: Analog and Digital Audio.
Intro-Sound-part1 Introduction to Processing Digital Sounds part 1 Barb Ericson Georgia Institute of Technology Oct 2009.
CS1315: Introduction to Media Computation Sound Encoding and Manipulation.
Sound “A sound man…”. Frequency The frequency of a sound wave is perceived as the pitch (note) –High frequency → high pitch → high note –“Middle C” has.
The Physics Of Sound Why do we hear what we hear? (Turn on your speakers)
Recording Arts…Audio Sound Waves Fall What does this all mean to you in this class? You are always working with sound waves – it is important to.
Multimedia Sound. What is Sound? Sound, sound wave, acoustics Sound is a continuous wave that travels through a medium Sound wave: energy causes disturbance.
Digital Audio I. Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul.
1 CS 177 Week 7 Recitation Slides Modifying Sounds using Loops + Discussion of some Exam Questions.
Sound The Facts Sound … 1. is a form of energy produced & transmitted by vibrating matter. 2. travels in longitudinal waves. 3. travels more quickly.
SOUND S4P2: Students will demonstrate how sound is produced by vibrating objects and how sound can be varied by changing the rate of vibration.
Working with Sounds Barb Ericson College of Computing Georgia Institute of Technology
The Physics of Sound.
Multimedia Systems and Applications
Sound and Waves.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
17.4 Sound and Hearing.
Sound and Waves.
Chapter 6: Modifying Sounds Using Loops
Hearing and Mechanoreceptors
How sound works: Acoustics, the physics of sound
Introduction to Processing Digital Sounds
Sound and Waves.
Sound.
Sound and Waves.
Human Hearing.
CS1315: Introduction to Media Computation
Presentation transcript:

Session 18 The physics of sound and the manipulation of digital sounds

Pictures vs. Sounds Get in groups of 2 or 3 students. Create a list (to be turned in) of all the modifications that we made to pictures. Which of these modifications do you think have similar techniques with sound?

How does Hearing Work? The outer ear “catches” sounds The eardrum vibrates The inner ear translates the vibrations to nerve impulses for the brain to interpret

Acoustics, the physics of sound Sounds are waves of air pressure –Sound comes in cycles –The frequency of a wave is the number of cycles per second (cps), or Hertz (Complex sounds have more than one frequency in them.) –The amplitude is the maximum height of the wave

Volume and Pitch We perceive volume as changes in amplitude –If the amplitude doubles, it’s about a 3 decibel (dB) change. –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 We perceive pitch as changes in frequency –Higher frequencies are perceived as higher pitches –We can hear between 5 Hz and 20,000 Hz (20 kHz)

Logarithmic Scales Human hearing works with ratios not differences: –The A above middle C is 440 Hz –The A above that has twice the frequency (880 Hz) –The A above that has twice the frequency of that (1760 Hz)

Digitizing Sound We can estimate a curve by creating rectangles We’ll do the same to estimate the sound curve –Analog-to-digital conversion (ADC) will give us the amplitude at an instant as a number: a sample –How many samples do we need?

Nyquist Theorem We need twice as many samples as the maximum frequency in order to represent (and recreate, later) the original sound. The number of samples recorded per second is the sampling rate –If we capture 8000 samples per second, the highest frequency we can capture is 4000 Hz (where human voices max out) That’s how phones work –If we capture more than 44,000 samples per second, we capture everything that we can hear (max 22,000 Hz) CD quality is 44,100 samples per second

Encoding a Sound

Given this information How much memory is necessary to store 1 minute of CD quality stereo sound?

Sound Basics makeSound(fileName) –Will create a new Sound object from the data in the file with the passed file name play(soundObj) –Will start the sound playing. Let’s you repeat immediately blockingPlay(soundObj) –Will play the complete sound before continuing openSoundTool(soundObj) –Will open a sound tool on the object (can do this from the menu too)

The Sound Tool Not all of the sound is shown when you explore a sound –Skips values to fit in the window You can zoom in –To see all sample values You can zoom out –To fit the sound in the window again

Increase volume def increaseVolume(sound): for sample in getSamples(sound): value = getSampleValue(sample) setSampleValue(sample,value*2)

More General Code def changeVolume(sound, factor): """ Changes the sound volume by a given factor with factor 1 increasing the volume """ for sampleNum in range(0, getLength(sound)): sample = getSampleObjectAt(sound, sampleNum) value = getSampleValue(sample) setSampleValue(sample, value * factor)

Main Program """ Select a sound and repeatedly adjust its volume. """ def main(): print "Select the Media Folder" setMediaFolder() print "Select the sound (.wav) file to play repeatedly" fileName = pickAFile() sound = makeSound(fileName) volumeAdjustment = requestNumber("Enter factor to increase (>1) “ + \ “or decrease (<1) the volume.") for counter in range(10): blockingPlay(sound) changeVolume(sound, volumeAdjustment) print "Open Sound Tool to 'view' sound" openSoundTool(sound)

But… What happens if we increaseVolume() too many times? –Clipping