Speed Up Sound
def faster(source,targetSpeed):
sampleIndex=1
n=1
for targetIndex in range (1, getLength(source)):
value = getSampleValueAt(source, int(sampleIndex))
setSampleValueAt(source, targetIndex, value)
sampleIndex = sampleIndex+n
sampleIndexN = int(sampleIndex)
n=1+(sampleIndex/(getLength(source)/(float(targetSpeed))))
if sampleIndex > getLength(source):
for targetIndex in range (targetIndex, getLength(source)):
setSampleValueAt(source,targetIndex,0)
return(source)
speedup.wav
Links to this Page