Try rewriting Program 100 so that you have a linear increase in volume to halfway through the sound, then linearly decrease the volume down to zero in the second half.
What will be an ideal response?
```
def increaseAndDecrease5(sound):
for sampleIndex in range(0,getLength(sound)*0.5):
value = getSampleValueAt(sound ,sampleIndex)
setSampleValueAt(sound ,sampleIndex ,value *
(2*sampleIndex/(getLength(sound)*0.5)))
for sampleIndex in range(getLength(sound)*0.5,getLength(sound)):
value = getSampleValueAt(sound , sampleIndex)
setSampleValueAt(sound ,sampleIndex ,value * (1.0-(sampleIndex
getLength(sound)*0.5)/(getLength(sound)*0.5)))
```
You might also like to view...
A binary number used by the operating system to identify a location is a(n):
A. address B. binary locator C. pointer D. operating system identifier
If your program recovers from an exception, you can use the ____ statement to repeat the execution of an entire begin/end code block
A. retry B. rescue C. end D. begin