plltrack — Tracks the pitch of a signal.
plltrack, a pitch tracker based on a phase-locked loop algorithm, described in Zolzer, U, Sankarababu, S.V. and Moller, S, "PLL-based Pitch Detection and Tracking for Audio Signals. Proc. of IIH-MSP 2012".
acps -- estimated pitch in Hz.
alock -- phase lock indicator, a phase error indicating the quality of the tracking, with values between 0 and 1. Higher values indicate good tracking
kd -- PLL feedback gain, controls frequency range of PLL (between 0 and 1). Higher values increase the range of the tracking.
kloopf -- PLL LP filter cf, controls frequency range of PLL (opt, defaults to 20Hz).
kloopq -- PLL LP filter Q, controls rise time of FO step (opt, defaults to 1/3)
klf -- lowest tracking freq (opt, defaults to 20Hz)
khf -- highest tracking freq (opt, defaults to 1500Hz)
kthresh -- tracking signal level threshold (optional, defaults to 0.001, equiv to -60dBfs)
plltrack analyzes the input signal, asig, estimating the fundamental of a monophonic signal. Its output is updated every sample.
Here is an example of the plltrack operator. It uses the file plltrack.csd.
Example 767. Example of the plltrack operator.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform -odac ;;;realtime audio out ;-iadc ;;;uncomment -iadc if realtime audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o plltrack.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 kd = p4 a1 diskin2 "fox.wav", 1,0,1 apitch, aloc plltrack a1, kd krms rms a1 krms port krms, 0.01 asig buzz krms, apitch, 10, 1 outs asig, asig ;mix in some dry signal as well endin </CsInstruments> <CsScore> f1 0 65536 10 1 ;sine wave i 1 0 6 0.1 i 1 7 6 0.3 ;more feedback e </CsScore> </CsoundSynthesizer>