pitch
Tracks the pitch of a signal.
Using the same techniques as spectrum and specptrk, pitch tracks the pitch of the signal in octave point decimal form, and amplitude in dB.
Syntax
koct, kamp pitch asig, iupdte, ilo, ihi, idbthresh [, ifrqs] [, iconf] \
[, istrt] [, iocts] [, iq] [, inptls] [, irolloff] [, iskip]
Initialization
iupdte -- length of period, in seconds, that outputs are updated
ilo, ihi -- range in which pitch is detected, expressed in octave point decimal
idbthresh -- amplitude, expressed in decibels, necessary for the pitch to be detected. Once started it continues until it is 6 dB down.
ifrqs (optional) -- number of divisons of an octave. Default is 12 and is limited to 120.
iconf (optional) -- the number of conformations needed for an octave jump. Default is 10.
istrt (optional) -- starting pitch for tracker. Default value is (ilo + ihi)/2.
iocts (optional) -- number of octave decimations in spectrum. Default is 6.
iq (optional) -- Q of analysis filters. Default is 10.
inptls (optional) -- number of harmonics, used in matching. Computation time increases with the number of harmonics. Default is 4.
irolloff (optional) -- amplitude rolloff for the set of filters expressed as fraction per octave. Values must be positive. Default is 0.6.
iskip (optional) -- if non-zero, skips initialization. Default is 0.
Performance
koct -- The pitch output, given in the octave point decimal format.
kamp -- The amplitude output.
pitch analyzes the input signal, asig, to give a pitch/amplitude pair of outputs, for the strongest frequency in the signal. The value is updated every iupdte seconds.
The number of partials and rolloff fraction can effect the pitch tracking, so some experimentation may be necessary. Suggested values are 4 or 5 harmonics, with rolloff 0.6, up to 10 or 12 harmonics with rolloff 0.75 for complex timbres, with a weak fundamental.
Examples
Here is an example of the pitch opcode. It uses the file pitch.csd.
See also
Sensing and Control: Tempo and Pitch estimation
Credits
Author: John ffitch
University of Bath, Codemist Ltd.
Bath, UK
April 1999
New in Csound version 3.54