StrongestLocalMaxima

final case class StrongestLocalMaxima(in: D, size: I, minLag: I, maxLag: I, thresh: D, octaveCost: D, num: I) extends MultiOut[Double]

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
trait Serializable
trait MultiOut[Double]
trait Lazy[Double]
trait GE[Double]
trait UGenSource[UGenInLike[Double], IndexedSeq[StreamOut]]
trait Expander[UGenInLike[Double]]
trait Lazy
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def lags: D

Inherited methods

final def name: String
Inherited from:
UGenSource
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product