Blend in some words over some music. Start with the music at 75% and the words at 25% and gradually make the words 75% and the music 25%.
Note: If the function assumes the words and music are of the same length, then it can look like the below. Otherwise, the answer would need to specifically check for the current length as in the answer to question 10.
```
def blendMusic(sound,music):
maxL = max(getLength(sound), getLength(music))
canvas=makeEmptySound(maxL)
#Blend sound1 and sound2
for index in range (0 ,maxL):
#This value will range from 0 to 1
multiple = index/maxL
soundSample = getSampleValueAt(sound,index)*(0.25+0.5*multiple)
musicSample=getSampleValueAt(music,index)*(0.75-0.5*multiple)
newSample = soundSample + musicSample
setSampleValueAt(canvas ,index,newSample)
play(canvas)
return canvas
```
You might also like to view...
To change the font weight of a Font object,________.
a) modify its Bold property b) modify its Weight property c) modify its FontWeight property d) modify its Boldness property e) None of the above. Font objects are immutable.
Methods are sometimes called ____.
A. segments B. modules C. classes D. routines
Where would you setup the two substitution values in a two-variable data table?
A. In the first row and first column in the table B. In the Series dialog box C. In the bottom row and last column D. Excel does this for you.
Which of the following remote access types requires a certificate for connectivity?
A. SSH B. PPP C. HTTPS D. WEP