# Formants.praat # (c) 2011 Daniel Miles, Ohio State University Create Strings as file list... fileList /Users/buckeye/Desktop/*.wav numfiles=Get number of strings numrows=2*'numfiles' for j from 1 to 'numfiles' soundfile$=Get string... j # Create a table to hold formant values Create Table with column names... Formants 'numrows' word F1 F2 Read from file... /Volumes/MXC/Field Project Report 3/Minimal Pairs/'soundfile$'.wav To TextGrid... marks select Sound 'soundfile$' plus TextGrid 'soundfile$' View & Edit for i from 1 to 'numrows' editor TextGrid 'soundfile$' pause select an interval # dollar sign indicates variable is a string label$=Get label of interval f1=Get first formant f2=Get second formant endeditor select Table Formants Set string value... i word 'label$' #Use single quotes to indicate variable value, not name Set numeric value... i F1 'f1' Set numeric value... i F2 'f2' endfor endfor