Options for estimate_pitch. More...
#include <pitch_track.hpp>
Public Attributes | |
| int | fft_length = 16384 |
| FFT length for the coarse peak (power of two). | |
| double | min_hz = 20.0 |
| Search band. | |
| double | max_hz = 0.0 |
| Window | window = Window::blackman |
| Window for the coarse peak. | |
| double | kaiser_beta = kDefaultKaiserBeta |
| double | min_confidence = 0.5 |
| Voicing gate: confidence below this refuses the estimate. | |
| int | harmonic_count = 0 |
| Harmonics (including the fundamental) summed for the confidence measure. | |
| double | silence_rms = 1.0e-4 |
| RMS below this (linear, ~−80 dBFS) is treated as silence and refused before any spectral work — a dead processor must not measure a pitch. | |
| int | channel = 0 |
| Channel analyzed, and an offset/length window into it. | |
| int | analysis_offset = 0 |
| int | analysis_length = 0 |
Options for estimate_pitch.
| int pulp::test::audio::PitchOptions::analysis_length = 0 |
| int pulp::test::audio::PitchOptions::analysis_offset = 0 |
| int pulp::test::audio::PitchOptions::channel = 0 |
Channel analyzed, and an offset/length window into it.
analysis_length = 0 means "from `analysis_offset` to the end of the buffer".
| int pulp::test::audio::PitchOptions::fft_length = 16384 |
FFT length for the coarse peak (power of two).
Automatically reduced to the largest power of two that fits the analysis segment when the segment is shorter — a short per-frame window does not need a huge transform, and the projection refinement (not the FFT) sets the final accuracy.
| int pulp::test::audio::PitchOptions::harmonic_count = 0 |
Harmonics (including the fundamental) summed for the confidence measure.
0 (the default) means "every harmonic below Nyquist" — required so a bright comb (BLIT/buzz, narrow pulse) whose energy is spread across hundreds of partials is not wrongly refused. A positive value caps the sum (and its cost) for a signal known to be spectrally compact.
| double pulp::test::audio::PitchOptions::kaiser_beta = kDefaultKaiserBeta |
| double pulp::test::audio::PitchOptions::max_hz = 0.0 |
| double pulp::test::audio::PitchOptions::min_confidence = 0.5 |
Voicing gate: confidence below this refuses the estimate.
0.5 accepts tones and saws (harmonic ratio ~1) while rejecting noise.
| double pulp::test::audio::PitchOptions::min_hz = 20.0 |
| double pulp::test::audio::PitchOptions::silence_rms = 1.0e-4 |
RMS below this (linear, ~−80 dBFS) is treated as silence and refused before any spectral work — a dead processor must not measure a pitch.
| Window pulp::test::audio::PitchOptions::window = Window::blackman |
Window for the coarse peak.
Blackman by default: its −57 dB side lobes keep a strong harmonic from masking the fundamental peak on a dense signal, while its wide main lobe is irrelevant here because sub-bin accuracy comes from the projection stage, not the FFT.