###################################################################### ## Search tones in TextGrid and extract the syllable invterval where those ## tones are located, with matching sound file. ## ##In this script, tier 1 is an interval tier marking syllable boundaries ## Tier 5 is a point tier marking the tones ## ## November 3, 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 int1 = Get interval at time... 1 sp5 sp1 = Get starting point... 1 int1 ep1 = Get end point... 1 int1 select TextGrid 'grid$' Extract part... sp1 ep1 yes select Sound 'sound$' Extract part... sp1 ep1 Hanning 1 yes endif endfor select all soundName$ = selected$ (Sound, 1) select Sound 'soundname$' Remove select all gridName$ = selected$ (TextGrid, 1) select TextGrid 'gridName$' Remove textName$