View all files | ||||
For pitch estimation, there are many related algorithms, mainly based on frequency domain processing or autocorrelation processing. We have conducted numerous evaluations and comparisons using the following algorithms:
The online experience for instrument pitch track based on web audio and wasm, See the site here
The library is cross-platform and currently supports Linux, macOS, Windows, iOS, Android and WebAssembly.
For macOS example, enter project scripts directory and switch to the current directory, run the following script to build and compile:
Before building, make sure the required compilation environment for the current system is available, such as Xcode for iOS/macOS, NDK for Android, emcc for WebAssembly, etc.
Quickstart, the python command line tools:
-p, --pitch, select pitch detection algorithm, include pef|ncf|hps|lhs|cep|yin
-r, --samplate, select samplerate
-h, --help, all parameter information
Considering the characteristics of the above algorithms, for low-frequency pitch estimation of musical instruments (below 55Hz), most algorithms, except HPS/LHS, are ineffective. However, HPS/LHS performs relatively poorly in high-frequency pitch estimation (above 1000Hz). All algorithms face challenges of strong resonant peak interference and misjudgments. PEF shows better performance in handling pitch-related resonant peaks. In scenarios with slightly stronger background noise, the latency of all algorithms rapidly increases.
[1] Gonzalez, Sira, and Mike Brookes. "A Pitch Estimation Filter robust to high levels of noise (PEFAC)." 19th European Signal Processing Conference. Barcelona, 2011, pp. 451–455.
[2] Atal, B.S. "Automatic Speaker Recognition Based on Pitch Contours." The Journal of the Acoustical Society of America. Vol. 52, No. 6B, 1972, pp. 1687–1697.
[3] Tamara Smyth. "Music270a: Signal Analysis." 2019, Department of Music, University of California.
[4] Hermes, Dik J. "Measurement of Pitch by Subharmonic Summation." The Journal of the Acoustical Society of America. Vol. 83, No. 1, 1988, pp. 257–264.
[5] Noll, Michael A. "Cepstrum Pitch Determination." The Journal of the Acoustical Society of America. Vol. 31, No. 2, 1967, pp. 293–309.
[6] Alain de Cheveigne, Hideki Kawahara. "YIN, a fundamental frequency estimator for speech and music." 2002 Acoustical Societyof America.