clearinfo sound$ = selected$ ("Sound") textgrid$ = selected$ ("TextGrid") select TextGrid 'textgrid$' # To get the duration of whole QV sequence: qvbeg = Get starting point... 1 2 qvend = Get end point... 1 2 qvdur = qvend - qvbeg qvdurms = qvdur *1000 # To get the duration of Q-release: qrelbeg = Get starting point... 2 2 qrelend = Get end point... 2 2 qreldur = qrelend - qrelbeg qreldurms = qreldur * 1000 # To get the duration of V, and of points for measuring formants: vbeg = Get starting point... 3 2 vend = Get end point... 3 2 vdur = vend - vbeg vdurms = vdur * 1000 v5 = vbeg + vdur*5/100 v50 = vbeg + vdur*50/100 v95 = vbeg + vdur*95/100 # To get qualititative judgment on whether or not the vowel is transitional: select TextGrid 'textgrid$' transV$ = Get label of interval... 3 2 # To quantify vowel movement: select Sound 'sound$' To Formant (burg)... 0.00 5 5000 0.025 50 f1a = Get value at time... 1 v5 Hertz Linear f2a = Get value at time... 2 v5 Hertz Linear f3a = Get value at time... 3 v5 Hertz Linear f1b = Get value at time... 1 v50 Hertz Linear f2b = Get value at time... 2 v50 Hertz Linear f3b = Get value at time... 3 v50 Hertz Linear f1c = Get value at time... 1 v95 Hertz Linear f2c = Get value at time... 2 v95 Hertz Linear f3c = Get value at time... 3 v95 hertz Linear # To see if there is a transitional F: select TextGrid 'textgrid$' transF$ = Get label of interval... 4 2 # If there is NO transitional F, we're done taking measurements and can export all the information to the spreadsheet: select TextGrid 'textgrid$' if transF$ = "notransF" printline 'sound$' 'tab$' Alldone! fileappend tokeninfo.xls 'sound$' 'tab$' 'qvdurms:0$' 'tab$' 'qreldurms:0$' 'tab$' 'vdurms:0' 'tab$' 'transV$' 'tab$' 'f1a:0' 'tab$' 'f2a:0' 'tab$' 'f3a:0' 'tab$' 'f1b:0' 'tab$' 'f2b:0' 'tab$' 'f3b:0' 'tab$' 'f1c:0' 'tab$' 'f2c:0' 'tab$' 'f3c:0' 'tab$' 'transF$' 'tab$' fileappend tokeninfo.xls 'newline$' # If there is a transitional fricative, we'll measure its duration before exporting all the information the spreadsheet: else transFbeg = Get starting point... 4 2 transFend = Get end point... 4 2 transFdur = transFend - transFbeg transFdurms = transFdur * 1000 printline 'sound$' 'tab$' Alldone! fileappend tokeninfo.xls 'sound$' 'tab$' 'qvdurms:0$' 'tab$' 'qreldurms:0$' 'tab$' 'vdurms:0' 'tab$' 'transV$' 'tab$' 'f1a:0' 'tab$' 'f2a:0' 'tab$' 'f3a:0' 'tab$' 'f1b:0' 'tab$' 'f2b:0' 'tab$' 'f3b:0' 'tab$' 'f1c:0' 'tab$' 'f2c:0' 'tab$' 'f3c:0' 'tab$' 'transF$' 'tab$' 'transFdurms:0' 'tab$' fileappend tokeninfo.xls 'newline$' endif