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

doubleFrequency

def double(filename):
  source = makeSound(filename)
  target = makeSound(filename)
  targetIndex = 1
  for sourceIndex in range(1, getLength(source) + 1, 2):
       value = getSampleValueAt(source, sourceIndex)
       setSampleValueAt( target, targetIndex, value)
       targetIndex = targetIndex + 1
  #Zero out the rest of the target sound -- it's only half full!
  # Zeros are silent.
  for targetIndex in range( getLength( target)/2, getLength( target)+1):
       setSampleValueAt(target, targetIndex, 0)
       targetIndex = targetIndex + 1

  return target


Link to this Page