table=do ("Read Table from tab-separated file...", "~/Desktop/pitch22.txt") select table nor=Get number of rows j=1 p1=0 ################# for i from 1 to nor select table if i0) and (nextPitch>0)) f1 = pitch # f2 = nextPitch t1 = start t2 = end dur=t2-t1 #a = (f2 - f1) / (t2 -t1) #b = f1 - a * t1 sound'j'=do ("Create Sound from formula..." , "sweep" , 1, 0 , dur , 44100,"0.5*sin(2*pi*f1*x +p1)") p1 = (2*pi*f1*dur + p1) mod (2*pi) j+=1 endif if ((pitch>0)and(nextPitch<0)) mySilence = Create Sound from formula... silence 1 0 0.2 44100 0 k=j-1 select sound'k' plus mySilence sound'j'=Concatenate j+=1 endif endfor ##################### select sound1 for i from 2 to j-1 plus sound'i' endfor newSound=Concatenate select newSound Save as WAV file... ~/Desktop/newSound.wav