A peak detection UGen, useful for implementing the auto-correlation based pitch detection
method of Paul Boersma (1993).
Taking an already calculated auto-correlation of size size
, the UGen looks
for local maxima within a given range.
The UGen has two outputs. The first output gives the
lag times or periods of the n
strongest peaks per window (to obtain a frequency, divide the sampling
rate by these lag times). The second output gives the intensities of these n
candidates. If there
are less than n
candidates, the empty slots are output as zeroes.
- Value parameters:
- in
the auto-correlation windows
- maxLag
the maximum lag time in sample frames, corresponding to the minimum frequency accepted
- minLag
the minimum lag time in sample frames, corresponding to the maximum frequency accepted
- num
number of candidate periods output. This is clipped to be at least 1. see PitchesToViterbi see Viterbi
- octaveCost
a factor for favouring higher frequencies. use zero to turn off this feature.
- size
the size of the auto-correlation windows. must be at least 2.
- thresh
the "voicing" threshold for considered for local maxima within
minLag
maxLag
.
- Companion:
- object