Rewrite increase volume (Program 93) so that it takes two inputs: a sound to increase in volume

Question:

Rewrite increase volume (Program 93) so that it takes two inputs: a sound to increase in volume and a multiplier. Use the multiplier as how much to increase the amplitude of the sound samples. Can we use the same function to both increase and decrease the volume? Demonstrate commands that you would execute to do each.


Data from Program 93

def increaseVolume (sound): for sample in getSamples(sound): getSampleValue(sample) * 2) value setSampleValue(sample,value

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: