#serbian pitch accent info retrieval script NEW (with peak duration percentage in syllable, vowel duration,etc) #4/26/13 #select all the textgrid and sound pairs in the praat object window and run the script n=numberOfSelected ("Sound") echo n='n' m=numberOfSelected ("TextGrid") printline m='m' if n!=m exit ERROR!PLEASE MAKE SURE YOU SELECTED THE SAME NUMBER OF SOUND AND TEXTGRID FILES. endif printline printline List of Sound Files for i to n sound'i' = selected ("Sound", i) printline sound'i' endfor printline printline List of TextGrid Files for i to m textgrid'i'=selected("TextGrid",i) printline textgrid'i' endfor printline printline NOTE: Pt=Peak point printline NOTE: OSn=Onset of Syllable n (where n=1 or 2 or3) printline [FILE] 'tab$' [WORD] 'tab$' [ Pt-OS1] 'tab$' [ Pt-OS2] 'tab$' [Pt-OS3] 'tab$' [Peak in Syllable] for i to n select sound'i' label$=selected$ ("Sound") select textgrid'i' #decide where the peak is. nop5=Get number of points... 5 j=1 lp$=Get label of point... 5 j lp3$=left$(lp$,3) while ((lp3$!="P-t") and (lp3$!="p-t") and (j1 percent=1 endif endproc