We think that if we’re going to say “We the united people” in the splice (Program 104), “united” should be really emphasized—really loud. Change the program so that the word “united” is maximally loud (normalized) in the phrase “united people.”
What will be an ideal response?
```
def splicePreamble3():
source = makeSound("preamble10.wav")
# This will be the newly spliced sound
target = makeEmptySoundBySeconds (5)
samples = getSamples(target)
sourceSamples = getSamples(source)
targetIndex =0
# Where the word "We The" is in the sound
for sourceIndex in range (8864 , 18235):
value = getSampleValue(sourceSamples[sourceIndex])
setSampleValue(samples[targetIndex] , value)
targetIndex = targetIndex +1
#Silence Second
for silence in range(0, 2250):
setSampleValue(samples[targetIndex] , 0)
targetIndex = targetIndex +1
#Normalize the "United" word
largest = -1
for sourceIndex in range (33414 , 40052):
largest = max(largest, getSampleValue(sourceSamples[sourceIndex]))
multiplier = 32767.0 / largest
# Where the word "United" is in the sound
for sourceIndex in range (33414 , 40052):
value = multiplier*getSampleValue(sourceSamples[sourceIndex])
setSampleValue(samples[targetIndex] , value)
targetIndex = targetIndex +1
#Silence Second
for silence in range(0, 2250):
setSampleValue(samples[targetIndex] , 0)
targetIndex = targetIndex +1
# Where the word "People" is in for source
for sourceIndex in range(17408, 26726):
value = getSampleValue(sourceSamples[sourceIndex])
setSampleValue(samples[targetIndex] , value)
targetIndex = targetIndex + 1
play(target)
return target
```
You might also like to view...
A VoIP phone will not turn on when plugged into a jack on the wall. However, when the PC attaches to the same jack, it works on the network. What is the issue?
A) No IP address. B) Phone firewall is blocking. C) No PoE. D) VoIP is not enabled on the network.
You are preparing to upgrade Windows 7 to Windows 10 but you are going to be cautious and make a backup of your system before proceeding with the installation. Which of the following should NOT be a consideration for performing your backup.
A. close all files to ensure all files are backed up B. be certain you can restore the backup in both the old and new OS C. select only the data files for backup since the OS files and applications will not be affected by the upgrade D. make sure you have suitable media to store the backup on