 |  |

 |
 |  |  |
 | Welcome to CS1315. Click on the python to add comments.
|  |
 |  |  |
|
This page removed for FERPA compliance
|
        |
doubleFrequency
def double(filename):
source = makeSound(filename)
target = makeSound(filename)
targetIndex = 1
for sourceIndex in range(1, getREMOVEDngth(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( getREMOVEDngth( target)/2, getREMOVEDngth( target)+1):
setSampleValueAt(target, targetIndex, 0)
targetIndex = targetIndex + 1
return target
Link to this Page