|
"I want a list of pitch and intensity values at the same times."
Since Sound: To Pitch... and Sound: To Intensity... do not give values at the same times, you create separate pitch and intensity contours with high time resolution, then interpolate. In the following example, you get pitch and intensity values at steps of 0.01 seconds by interpolating curves that have a time resolution of 0.001 seconds.
sound = selected ("Sound")
tmin = Get start time
tmax = Get end time
To Pitch... 0.001 75 300
Rename... pitch
select sound
To Intensity... 75 0.001
Rename... intensity
echo Here are the results:
for i to (tmax-tmin)/0.01
time = tmin + i * 0.01
select Pitch pitch
pitch = Get value at time... time Hertz Linear
select Intensity intensity
intensity = Get value at time... time Cubic
printline 'time:2' 'pitch:3' 'intensity:3'
endfor
© ppgb, July 14, 2006