# by michael becker (2006) # take a list of sound files, each with three labels in it, and imposed a reversed v pitch contour on them # you will need to label your files before you use this script # path to the sound files path$ = "C:\Inetpub\wwwroot\experiment\sounds\" Create Strings as file list... list 'path$'*.wav numberOfFiles = Get number of strings for ifile to numberOfFiles # Select the stringlist and find a file name in it; read that file and its textgrid select Strings list fileName$ = Get string... ifile object_name$ = "'fileName$'" - ".wav" Read from file... 'path$''object_name$'.wav Read from file... 'path$''object_name$'.TextGrid select TextGrid 'object_name$' soundDuration = Get total duration soundPoints = Get number of points... 1 # make sure the file has three labels in it if soundPoints = 3 point1 = Get time of point... 1 1 point2 = Get time of point... 1 2 point3 = Get time of point... 1 3 # create a new pitch object with 110, 170 and 70Hz as the values Create PitchTier... current 0 'soundDuration' Add point... 'point1' 110 Add point... 'point2' 170 Add point... 'point3' 70 # adjusts the intensity select Sound 'object_name$' Scale peak... 0.6 To Manipulation... 0.01 65 600 # replace the original pitch track with the manufactured one, save select PitchTier current plus Manipulation 'object_name$' Replace pitch tier select Manipulation 'object_name$' Get resynthesis (PSOLA) Write to WAV file... 'path$''object_name$'.wav else echo 'object_name$' doesn't have three points in it endif # remove all the related files, keep the list select all minus Strings list Remove endfor select all Remove