Write a function that splices together words and music.
Note: This question does not specify how to splice together the words and music. However, a simple way that emulates a “techno” song would be to repeatedly splice a phrase into a piece of music. The function below accomplishes this, however one could also make use of a less general approach.
```
#music is the base, sound is the phrase to copy into it
#interval is the interval in seconds to copy it
def addStartSilence(sound, music, interval):
target = makeEmptySound(getLength(music))
targetSamples = getSamples(target)
soundSamples = getSamples(sound)
musicSamples = getSamples(music)
#First copy the music to the target
for index in range(0, getLength(music)):
sourceValue = getSampleValue(musicSamples[index])
setSampleValue(targetSamples[index] ,sourceValue)
#Then copy the phrase into the musical at the regular interval
for musicIndex in range(0, getLength(music), getSamplingRate(music)*interval):
for index in range(0, getLength(sound)):
sourceValue = getSampleValue(soundSamples[index])
setSampleValue(targetSamples[musicIndex+index] ,sourceValue)
return target
```