def mystery1(filename): #reversing source = makeSound(filename) dest = makeSound(filename) srcIndex = getLength(source) for destIndex in range(1, getLength(dest) + 1): srcSample = getSampleValueAt(source, srcIndex) #(source sound, location) setSampleValueAt(dest, destIndex, srcSample) #(place to put sound, location to put it, sample) srcIndex = srcIndex - 1 return dest def mystery2(sound): #Normalizing largest = 0 for s in getSamples(sound): largest = max(largest, getSample(s) ) amplification = 32767.0 / largest print "Largest sample value in original sound was", largest print ”Amplification multiplier is", amplification for s in getSamples(sound): louder = amplification * getSample(s) setSample(s, louder) def mystery3(sound1, sound2): #blend 1 for sampleNmr in range(1, getLength(sound1)+1): sample1 = getSampleValueAt(sound1, sampleNmr) sample2 = getSampleValueAt(sound2, sampleNmr) setSampleValueAt(sound2, sampleNmr, (sample1 + sample2)/2) def mystery4(sound1, sound2): #blend 2 for index in range(1, getLength(sound1) ,2) setSampleValueAt(sound1, index, sound2) return sound1 How is sound represented to a computer? Sample amplitude- as a number Nyquist Theorem 2x as many samples as max frequency(rate) HTML #says the file is html #says you are talking about the title bar My Title #puts "My Title" in the tile bar #what will actually be in the document This is my picture # #row
column column2 in row1