diff --git a/paulstretch_stereo.py b/paulstretch_stereo.py index df7797c..860a7a5 100755 --- a/paulstretch_stereo.py +++ b/paulstretch_stereo.py @@ -120,7 +120,10 @@ def paulstretch(samplerate,smp,stretch,windowsize_seconds,outfilename): output[output<-1.0]=-1.0 #write the output to wav file - outfile.writeframes(int16(output.ravel(1)*32767.0).tostring()) + if sys.version_info.major == 2: + outfile.writeframes(int16(output.ravel('F')*32767.0).tostring()) + else: + outfile.writeframes(int16(output.ravel('F')*32767.0).tobytes()) start_pos+=displace_pos if start_pos>=nsamples: