fzero~
Fundamental frequency estimation
Description
The fzero~ object estimates the fundamental frequency of an an incoming, monophonic audio signal. It performs multiple layers of wavelet transforms on an incoming vector, comparing the spacing between the peaks in each.
Inlets
input [signal]
The signal to be analyzedOutlets
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: period1024)
This attribute sets the minimum number of samples between reporting any offsets.
Possible values:
0 = 'period16'
1 = 'period32'
2 = 'period64'
3 = 'period128'
4 = 'period256'
5 = 'period512'
6 = 'period1024'
7 = 'period2048'
8 = 'period4096'
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: period256)
Sets the time period between analyses in samples.
Possible values:
0 = 'period16'
1 = 'period32'
2 = 'period64'
3 = 'period128'
4 = 'period256'
5 = 'period512'
6 = 'period1024'
7 = 'period2048'
8 = 'period4096'
size [enum] (default: size2048)
Sets the buffer size to specify how many samples are analyzed each time.
Possible values:
0 = 'size128'
1 = 'size256'
2 = 'size512'
3 = 'size1024'
4 = 'size2048'
5 = 'size4096'
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~ | |
| retune~ |