CS 102 Computers In Context (Multimedia)‏ 04 / 01 / 2009 Instructor: Michael Eckmann.

Slides:



Advertisements
Similar presentations
CS 102 Computers In Context (Multimedia)‏ 04 / 13 / 2009 Instructor: Michael Eckmann.
Advertisements

CS 376 Introduction to Computer Graphics 02 / 02 / 2007 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 27 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 21 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 10 / 22 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 03 / 02 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 04 / 28 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 06 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 03 / 20 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 12 / 09 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 04 / 08 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 18 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 04 / 20 / 2009 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 11 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 11 / 19 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 06 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 26 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 02 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 02 / 12 / 2007 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 09 / 17 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 02 / 11 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 18 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 03 / 16 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 01 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 18 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 09 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 09 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 03 / 25 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 25 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 01 / 28 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 12 / 08 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 09 / 28 / 2007 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 09 / 19 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 17 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 07 / 2010 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 02 / 2008 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 7: Modifying Samples in a Range.
CS 102 Computers In Context (Multimedia)‏ 01 / 28 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 29 / 2008 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 12 / 2007 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 01 / 23 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 22 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 01 / 26 / 2009 Instructor: Michael Eckmann.
Chapter 7: Modifying Samples in a Range. Chapter Objectives.
CS 376b Introduction to Computer Vision 03 / 21 / 2008 Instructor: Michael Eckmann.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 7: Modifying Samples in a Range.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 03 / 30 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 09 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 18 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 01 / 30 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 02 / 2007 Instructor: Michael Eckmann.
Chapter 8: Modifying Samples in a Range. Chapter Objectives.
CS 376b Introduction to Computer Vision 02 / 15 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 10 / 10 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 12 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 31 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
1 CS 177 Week 8 Recitation Slides JES Sound functions and Modifying Sounds Increasing/Decreasing Volume Maximizing (Normalizing) Splicing Reversing Mirroring.
CS 102 Computers In Context (Multimedia)‏ 04 / 27 / 2009 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 03 / 10 / 2010 Instructor: Michael Eckmann.
Chapter 7: Modifying Samples in a Range
Presentation transcript:

CS 102 Computers In Context (Multimedia)‏ 04 / 01 / 2009 Instructor: Michael Eckmann

Michael Eckmann - Skidmore College - CS Spring 2009 Today’s Topics Questions/comments? Chapters 6 & 7 –Sound How to read/manipulate sound w/ JES –Normalizing –Clipping –Processing only some range of the samples –Splicing sounds

Michael Eckmann - Skidmore College - CS Spring 2009 Normalizing sound To normalize sound, we want to alter the samples by the same factor while making the largest sample be the maximum value (32767.)‏ To do this, we need to find the value of the largest sample in the sound. Then figure out what factor could we use to multiply that sample's value by to get Then use that same factor to multiply by all the other samples.

Michael Eckmann - Skidmore College - CS Spring 2009 Clipping sound We experienced clipping last class when some of the louder sounds got doubled and the result would have been over so we clipped them at If we made every sample either or then that would be extreme clipping --- every sample would be clipped. Any suggestions on how we could do this? Any guesses on how it will sound?

Michael Eckmann - Skidmore College - CS Spring 2009 Processing a range of samples Similar to how we processed image pixels we were able to go through the entire image with a loop like this: for pixel in getPixels(pic): or go through say just the left half of the image like this: for col in range(1, getWidth(pic)+1): for row in range(1, (getHeight(pic)+1)/2): pixel = getPixelAt(pic, col, row)‏

Michael Eckmann - Skidmore College - CS Spring 2009 Processing a range of samples We can also process all the samples in a sound using: for sample in getSamples(sound): value = getSample(sample)‏ or go through say just the left half of the sound like this: for i in range(1, (getLength(sound)+1)/2): value = getSampleValueAt(sample, i)‏

Michael Eckmann - Skidmore College - CS Spring 2009 Processing a range of samples Let's use this kind of processing to make the first half of the sound be louder and the second half be quieter. Any ideas? for i in range(1, (getLength(sound)+1)/2): value = getSampleValueAt(sample, i)‏

Michael Eckmann - Skidmore College - CS Spring 2009 Splicing sounds We can copy certain samples from different sounds and place them next to each other in a new sound. Let's look at page 172.