###################################################################### #### Robert Felty #### 2005 #### This script comes with no warranty. Use at your own risk ## This script is to be used for measuring vowels. It takes a highlighted ## section of a sound object (which should be the vowel, as determined by the ## pitch tracker), and takes the following measurements: ## duration ## F1, F2, F3 in a 30ms window centered on the midpoint of the vowel ## Peak and average intensity ## Initial, Final, Peak, and average pitch ## It uses whatever pitch and formant settings the user currently has set ###################################################################### ###uses selected sound. A portion must be highlighted use_sound$ = selected$ ("Sound") ##get start, end and midpoint editor Sound 'use_sound$' begin = Get begin of selection end = Get end of selection duration = end-begin midpoint = begin + (duration/2) duration = duration*1000 mid_start = midpoint-0.025 mid_end = midpoint+0.025 Select... mid_start mid_end f1 = Get first formant f2 = Get second formant f3 = Get third formant avg_pitch = Get pitch Select... begin end Extract selection endeditor use_sound2$ = selected$("Sound") To Intensity... 75 0.0 avg_intensity= Get mean... 0 0 peak_intensity= Get maximum... 0 0 Parabolic use_intensity$ = selected$("Intensity") select Sound 'use_sound2$' Remove select Intensity 'use_intensity$' Remove select Sound 'use_sound$' ###print info for debuggin printline 'use_sound$' 'tab$' 'begin:4' 'tab$' 'midpoint:4' 'tab$' 'end:4' 'tab$' 'duration:1' 'tab$' 'f1:0' 'tab$' 'f2:0' 'tab$' 'f3:0' 'tab$' 'avg_pitch:1' 'tab$' 'avg_intensity:1' 'tab$' 'peak_intensity:1'