#This script retrieves the starting times and end times #of each interval in specified tiers, and does a simple #subtraction to obtain the difference between those points, #a result corresponding to the duration of each interval. #The info window lists the durations of each IP first (tier 6), #followed by the word ÒendÓ, followed by the list of the durations #of each AP (tier 5). # #You must have a TextGrid available in the object window #prior to running this script. # #Created by Jessica Sertling Miller - sertling@uiuc.edu #June 6, 2006 ######################################################################## select all grid$ = selected$ ("TextGrid") select TextGrid 'grid$' clearinfo np6 = Get number of intervals... 6 for i to np6 spip = Get starting point... 6 i seip = Get end point... 6 i durip = seip - spip duripms = durip * 1000 printline 'duripms' endfor printline end select all grid$ = selected$ ("TextGrid") select TextGrid 'grid$' np5 = Get number of intervals... 5 for i to np5 spap = Get starting point... 5 i seap = Get end point... 5 i durap = seap - spap durapms = durap * 1000 printline 'durapms' endfor select all Remove