Question: 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.

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.


Data from Program 104

# Splicing # Using the preamble sound, make

# Splicing # Using the preamble sound, make "We the united people"

# Splicing # Using the preamble sound, make "We the united people" #3 def splicePreamble(): makeSound ("preamble10.wav") source # This will be the newly spliced sound target = makeEmptySoundBySeconds (10) # targetIndex starts at just after # "We the" in the new sound targetIndex=17408 # 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 # Where the word "People" is in the sound for sourceIndex in range (17408, 26726): value getSampleValueAt(source, sourceIndex) setSampleValueAt (target, targetIndex, value) targetIndex = targetIndex + 1

Step by Step Solution

3.36 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

def splicePreamble2 source makeSoundpreamble 10wav This will be the newly spliced sound target ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Computing and Programming in Pytho Questions!