
February 11th, 2012, 01:10 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 4
Time spent in forums: 1 h 7 m 52 sec
Reputation Power: 0
|
|
|
Adding an echo to a sound file(in JES)
I have to write a Python function, echo(thisFile), that creates an echo of a file, thisFile (thisFile is NOT a sound file), that first creates two sound files from thisFile, and in the 2nd sound file, add a copy of samples in the 1st file whose values are reduced by 60% and inserted into 16000-sample locations of the 1st file.
heres what i have so far but im not sure whats wrong with it at the moment. i am new to python, only about 2 weeks into the course.
def echo(delay):
f = pickAFile()
s1 = makeSound(f)
s2 = makeSound(f)
for p in range(delay+1, getLength(s1)):
setSampleValueAt(s1, p, getSampleValueAt( s1,p) +. 6*getSampleValueAt( s2, p-delay) )
return s1
if everything is good programing wise, how am i supposed to execute it in jes?
|