.TH PITCH 1carl CARL
.SH NAME
pitch \- program for estimating time-varying pitch
.SH SYNOPSIS
.B pitch
.SH DESCRIPTION
.B pitch
[
.B flags
] < floatsams > floatsams
.sp
.nf
flags:	(defaults in parenthesis)
	-RN	input sample rate set to N (usually read from stdin)
	-rN	output sample rate set to N (default is 256 samples/sec)
	-lN	lower pitch boundary set to N (50)
	-uN	upper pitch boundary set to N (200)
.fi
.PP
This program expects a single-channel, single-pitch input stream such as
from a recording of a voice or of a solo instrument.  It's output is a
time-varying estimate of the pitch at an output sample rate which is
typically 256 estimates per second.  The algorithm is the parallel
processing scheme of Rabiner (see
.I Digital Processing of Speech Signals,
Rabiner & Schafer, pp. 135-141, 1978).  Six simple peak detectors operate
in parallel, and a decision matrix is used to determine the current best
estimate of the pitch.
.PP
Because this algorithm is very fast and simple, it is also very prone to
error.  Three things can be done to help it:
.IP
1) Filter the input file to eliminate frequencies below 50 Hz and above
1000 Hz (if appropriate).  This can be done by using
.I fastfir
to design a bandpass filter (typically with -n511) and then using
.I convolve
to do the filtering.
.IP
2) Use the -l and -u flags to specify the lower and upper limits on the
estimated pitch.
.IP
3) Use a post-processor such as
.I median
to smooth the pitch estimates and eliminate gross errors.
.SH FILES
.SH AUTHOR
Mark Dolson
.SH SEE ALSO
.SH BUGS

