# Recipe 71: Adding two sounds together

def addSoundInto(sound1, sound2):

  for sampleNmr in range(1, getLength(sound1)+1):
    sample1 = getSampleValueAt(sound1, sampleNmr)
    sample2 = getSampleValueAt(sound2, sampleNmr)
    setSampleValueAt(sound2, sampleNmr, sample1 + sample2)

