Instrument Control: Sensing and Control

## pitch

koct, **pitch** asig, iupdte, ilo, ihi, idbthresh[, ifrqs, iconf, istrt, iocts, iq, inptls, irolloff, iskip]
kamp

### Description

Using the same techniques as **spectrum** and **specptrk**, pitch tracks the pitch of the signal in octave point decimal form, and amplitude in dB.

### 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* – number of divisons of an octave. Default is 12 and is limited to 120.

*iconf* – the number of conformations needed for an octave jump. Default is 10.

*istrt* – starting pitch for tracker. Default value is (*ilo* + *ihi*)/2.

*iocts* – number of octave decimations in spectrum. Default is 6.

*iq* – Q of analysis filters. Default is 10.

*inptls* – number of harmonics, used in matching. Computation time increases with the number of harmonics. Default is 4.

*irolloff* – amplitude rolloff for the set of filters expressed as fraction per octave. Values must be positive. Default is 0.6.

*iskip* – if non-zero, skips initialization

### Performance

**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.

### Author

John ffitch

University of Bath, Codemist Ltd.

Bath, UK

April, 1999

New in Csound version 3.54

Instrument Control: Sensing and Control