def changeVolume(sound):
len = getLength(sound)
for sampleIndex in range(0,len):
value = getSampleValueAt(sound,sampleIndex)
setSampleValueAt(sound,sampleIndex,value * 1.1)
>>> filename = pickAFile() >>> sound = makeSound(filename) >>> decreaseVolume(sound) >>> play(sound)
import randomat the very top of your program, before the defintion of the function(s). Then use random.uniform(....) with appropriate arguments to generate a random noise value for each point in time. Simply add the result of the random generator to each sample to generate the desired effect.
submit 1710 lab08 lab08.py
Note: You must do all the above steps correctly for receiving
full credit for this lab.