###################################################################### ## Search tones in TextGrid and extract the IP invterval where those ## tones are located, with matching sound file. ## ##In this script, tier 4 is an interval tier marking IP boundaries ## Tier 5 is a point tier marking the tones ## ## November 2, 2005 ## Jessica Sertling Miller ## sertling@uiuc.edu ## ## Adapted from a script by Francisco Torreira - ftorrei2@uiuc.edu ###################################################################### form Search sentence Search_tone endform select all sound$ = selected$ ("Sound", 1) grid$ = selected$ ("TextGrid", 1) select TextGrid 'grid$' ni5 = Get number of points... 5 for i to ni5 select all select TextGrid 'grid$' label$ = Get label of point... 5 i if label$ = search_tone$ sp5 = Get time of point... 5 i int4 = Get interval at time... 4 sp5 sp4 = Get starting point... 4 int4 ep4 = Get end point... 4 int4 select TextGrid 'grid$' Extract part... sp4 ep4 yes select Sound 'sound$' Extract part... sp4 ep4 Hanning 1 yes endif endfor