Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm Exam 2 Review Summer 2006: Sound Timing

Questions?


a) In recitation you said getSamplingRate() 2...

would this also work??—->(getLength(snd)/3)2

b)def mommapappa(sourceSound, targetSound):
while i = getSamplingRate(targetSound) 1.5
for i in sourceSound:
grab = getSampleValueAt(sourceSound, i + getSamplingRate(sourceSound)2)
copy = setSampleValueAt(targetSound, i + getSamplingRate(targetSound))

For a: No, you don't know how long the sound is so that would not work. For b: That while loop would not work at all. - Brittany Duncan

b)
def secondSwitch (src, tar):
  begin = int(getSamplingRate(src))
  end = (3* begin)/2
  for i in range (begin, end):
    v = getSampleValueAt (src, i)
    setSampleValueAt (tar, i+begin, v)


c)
def mfer(sound):
  sr = int(getSamplingRate(sound))
  begin = sr*3
  end = sr*4
  for i in range (begin, end):
    v = getSampleValueAt(s, i)
    setSampleValueAt(sound, i-sr*2, v)


these right?

a) getSamplingRate(sound)2+1



Link to this Page