Skip to content

Commit

Permalink
update 9th scirpt, ignore blank interval
Browse files Browse the repository at this point in the history
  • Loading branch information
feelins committed Apr 4, 2024
1 parent 3aeaaf8 commit 7e87e1c
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions 09-get_duration_and_pitch/Get_Duration_and_Pitch.Praat
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,20 @@ for iFile from 1 to numberOfFiles
duration = eTime-sTime

labelOfInterval$ = Get label of interval: reference_tier, iInterval
output$ = fileName$ + tab$ + labelOfInterval$ + tab$ + fixed$(duration, 3) + tab$
stepTime = duration / 9
for i from 1 to 10
selectObject: "PitchTier " + objectName$
tmpTime = sTime + stepTime * (i - 1)
pitchValue = Get value at time: tmpTime
output$ = output$ + fixed$(pitchValue, 0)
if i <> 10
output$ = output$ + tab$
endif
endfor
appendFileLine: save_result$, output$
if labelOfInterval$ <> ""
output$ = fileName$ + tab$ + labelOfInterval$ + tab$ + fixed$(duration, 3) + tab$
stepTime = duration / 9
for i from 1 to 10
selectObject: "PitchTier " + objectName$
tmpTime = sTime + stepTime * (i - 1)
pitchValue = Get value at time: tmpTime
output$ = output$ + fixed$(pitchValue, 0)
if i <> 10
output$ = output$ + tab$
endif
endfor
appendFileLine: save_result$, output$
endif
endfor

selectObject: "TextGrid " + objectName$
Expand Down

0 comments on commit 7e87e1c

Please sign in to comment.