fzero~ Reference

Fundamental frequency estimation

fzero~

Examples

Inlets

input [signal]

The signal to be analyzed

Outlets

pitch [number]

Estimated fundamental frequency.

amplitude [number]

Peak amplitude in analysis vector.

onset [bang, list]

Onset detected.

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

autolength [int] (default: 128)

autolength

autolevel [int] (default: 1)

Sets the level at which to perform autocorrelation analysis.

bufmax [int] (default: 4096)

Sets the maximum buffer size.

freqmax [number] (default: 2500)

The maximum frequency, in Hertz, that the object will report.

freqmin [number] (default: 20)

The minimum frequency, in Hertz, that the object will report.

levels [int] (default: 5)

levels

onsetamp [number] (default: 0.1)

fzero~ gives a bang or list out the right outlet when a new event crosses this amplitude threshold.

onsetmode [enum] (default: bang)

Onset detector output: bang or list (pitch, amplitude). Possible values:

0 = 'bang'
1 = 'list'

onsetperiod [enum] (default: 1024)

This attribute sets the minimum number of samples between reporting any offsets. Possible values:

0 = '16'
1 = '32'
2 = '64'
3 = '128'
4 = '256'
5 = '512'
6 = '1024'
7 = '2048'
8 = '4096'

onsetpitch [number] (default: 0.8)

fzero~ gives a bang or list out the right outlet when the frequency changes by this amount, in in MIDI notes.

period [enum] (default: 256)

Sets the time period between analyses in samples. Possible values:

0 = '16'
1 = '32'
2 = '64'
3 = '128'
4 = '256'
5 = '512'
6 = '1024'
7 = '2048'
8 = '4096'

size [enum] (default: 2048)

Sets the buffer size to specify how many samples are analyzed each time. Possible values:

0 = '128'
1 = '256'
2 = '512'
3 = '1024'
4 = '2048'
5 = '4096'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

input [signal]

The signal to be analyzed

noisethresh [number] (default: 0.1)

Minimum amplitude for reporting pitches and onsets. If the peak amplitude of the buffer is below this threshold, then fzero~ will report nothing.

See Also

Name Description
fftstream~ Fast Fourier Transform
ftom Convert between frequencies and MIDI notes.
peakamp~ Report the maximum amplitude of a signal over a period of time in ms.
thresh~ Detect input above a certain level
fzero~ Fundamental frequency and pitch estimator
retune~ Ztx-based pitch detection and pitchshift