########### Gregory Anderson form Directories and Parameters sentence Subject S sentence Sound_file_extension .wav endform ########### Create a variable name for picture ########### Here, you make a listing of all the sound files in a directory. sound_directory$ = "/Volumes/SpeechData/Dissertation/RobotSpeech/AudioFiles/" + subject$ + "/" Create Strings as file list... list 'sound_directory$'*'sound_file_extension$' numberOfFiles = Get number of strings ########### Go through all the sound files, one by one: for ifile to numberOfFiles filename$ = Get string... ifile Read from file... 'sound_directory$''filename$' ########### Get Duration and Intensity Values soundname$ = selected$ ("Sound", 1) resultfile$ = "/Volumes/SpeechData/Dissertation/RobotSpeech/PictureFiles/" + soundname$ + "Picture.eps" select Sound 'soundname$' To Pitch (ac)... 0 70 15 no 0.1 0.45 0.01 0.35 0.3 400 Draw... 0 0 0 500 yes Write to EPS file... 'resultfile$' Erase all ########### Remove the temporary objects from the object list select Sound 'soundname$' plus Pitch 'soundname$' Remove select Strings list ########### and go on with the next sound file! endfor select Strings list Remove exit