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
```

Computer Science & Information Technology

You might also like to view...

Another way to write the value 3452211903 is

a. 3.452211903e09 b. 3.452211903e-09 c. 3.452211903x09 d. 3452211903e09

Computer Science & Information Technology

Which of the following is true?

a. Pseudocode is used to describe an algorithm. b. Pseudocode is not an actual computer programming language. c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above.

Computer Science & Information Technology

The purpose of the ____ policy is to prevent malicious scripts from modifying the content of other windows, tabs, and frames and prevent the theft of private browser information and information displayed on secure web pages.

A. privacy B. proxy C. delegation D. same-origin

Computer Science & Information Technology

Before users can be given access to a computer and its data, they must in some way prove that they are who they claim to be.This process of providing proof is known as ____.

A. authorization B. encryption C. cryptography D. authentication

Computer Science & Information Technology