#include <F0Estimate.h>
Public Member Functions | |
F0Estimate (const std::vector< double > &s, const std::vector< double > &freqs, double fmin, double fmax, double resolution) | |
double | frequency (void) const |
Return the F0 frequency estimate, in Hz, for this estimate. | |
double | confidence (void) const |
Represents a configuration of an iterative alrogithm for computing an estimate of fundamental frequency from a sequence of sinusoidal frequencies and amplitudes using a likelihood estimator adapted from Quatieri's Speech Signal Processing text. This algorithm takes advantage of the fact that spectral peaks have already been identified and extracted in the analysis/modeling process.
The algorithm consists of the following steps: 1) Identify candidate F0s as the integer divisors of the sinusoidal frequencies provided, within the specified range (this algorithm relies on the reasonable assumption that for any frequency recognized as a likely F0, at least one of the sinusoidal frequencies must represent a harmonic, the likelihood function makes this same assumption) 2) Select the highest frequency candidate (within range) that maximizes the likelihood function (because all subharmonics of the true F0 will be equal in likelihood to the true F0, but no higher frequency can be as likely). 2a) Check the likelihood of integer multiples of the best candidate, choose the highest multiple (within the specified range) that as likely as the best candidate frequency to be the new best candidate. 3) Refine the best candidate using the secant method for refining the root of the derivative of the likelihood function in the neighborhood of the best candidate (because a peak in the likelihood function is a root of the derivative of that function).
Loris::F0Estimate::F0Estimate | ( | const std::vector< double > & | amps, | |
const std::vector< double > & | freqs, | |||
double | fmin, | |||
double | fmax, | |||
double | resolution | |||
) |
normalized confidence for this estimate, equal to 1.0 when all frequencies are perfect harmonics of this estimate's frequency Construct from parameters of the iterative F0 estimation algorithm. Find candidate F0 estimates as integer divisors of the peak frequencies, pick the highest frequency of the most likely candidates, and refine that estiamte using the secant method.
Store the frequency and the normalized value of the likelihood function at that frequency (1.0 indicates that all the peaks are perfect harmonics of the estimated frequency).
double Loris::F0Estimate::confidence | ( | void | ) | const [inline] |
Return the normalized confidence for this estimate, equal to 1.0 when all frequencies are perfect harmonics of this estimate's frequency.