Write a new version of Program 104 to copy “We the” into a new sound and then copy in “united” and finally copy in “people.” Be sure to add 2250 samples with a value of 0 in between the words. Return the new sound.

What will be an ideal response?


```
def splicePreamble2():
source = makeSound("preamble10.wav")
# This will be the newly spliced sound
target = makeEmptySoundBySeconds (5)

targetIndex =0

# Where the word "We The" is in the sound
for sourceIndex in range (8864 , 18235):
value = getSampleValueAt(source , sourceIndex)
setSampleValueAt(target , targetIndex , value)
targetIndex = targetIndex +1

#Silence Second
for silence in range(0, 2250):
setSampleValueAt(target , targetIndex , 0)
targetIndex = targetIndex +1

# Where the word "United" is in the sound
for sourceIndex in range (33414 , 40052):
value = getSampleValueAt(source , sourceIndex)
setSampleValueAt(target , targetIndex , value)
targetIndex = targetIndex +1

#Silence Second
for silence in range(0, 2250):
setSampleValueAt(target , targetIndex , 0)
targetIndex = targetIndex +1

# Where the word "People" is in for source
for sourceIndex in range(17408, 26726):
value = getSampleValueAt(source , sourceIndex)
setSampleValueAt(target , targetIndex , value)
targetIndex = targetIndex + 1

play(target)
return target
```

Note: The location of the “we the” start/end points can be found by making use of the explore() function in the terminal.

Computer Science & Information Technology

You might also like to view...

In the preceding figure, the item number _____ displays the shortcut property.

A. 1 B. 2 C. 3 D. 4

Computer Science & Information Technology

How many times is the following code invoked by the call recursive(4)?

``` void recursive( int i ) { using namespace std; if (i < 8) { cout << i << " "; recursive(i); } } ``` a) 2 b) 4 c) 8 d) 32 e) This is an infinite recursion.

Computer Science & Information Technology

If a library item is deleted from a specific page, it will also be deleted from the library.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A(n) _______________ is any switch that you can access and configure.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology