Return a list of frequency values from a LPC (Linear Predictive Coding) analysis data file.
pchvals = lpcgetpitches(“lpc_analysis_filename”, npoles_guess, firstFrame, lastFrame [,error_threshold])
lpcgetpitches will retrieve a list (array) of frequency values from an LPC analysis file, most likely created by the MiXViews program. Any subset of the total frames may be retrieved as well as all of them.
“lpc_analysis_filename”
The path to the LPC analysis file. This may be an absolute or relative. If it is a relative pathname, it will be relative to the directory in which the CMIX command was invoked.
npoles_guess
The number of poles in the LPC data. Pass 0 unless you are reading from a “raw” (headerless) data file (very unlikely).
firstFrame
The index to the first desired frame (0 being the first).
lastFrame
The index to the last desired frame (anything larger than the file’s frame count will be truncated to count-1).
error_threshold
This allows you to effectively ignore LPC data frames whose error value exceeds this threshold (between 0.0 and 1.0, inclusive). Pitch frames for these frames will be set to zero. This parameter is optional.
pitcharray = lpcgetpitches("/some/LPC/analysis_file.lpc", 0, 0, 20)
for (i = 0; i < 20; ++i) {
printf("Pitch[%d] is %f CPS\n", i, pitcharray[i]);
}