getPitchAutocor: Autocorrelation pitch tracker

View source: R/pitchTrackers.R

getPitchAutocorR Documentation

Autocorrelation pitch tracker

Description

Internal soundgen function.

Usage

getPitchAutocor(
  autoCorrelation,
  samplingRate,
  nCands,
  autocorThres,
  autocorSmooth = NULL,
  autocorUpsample,
  autocorBestPeak,
  pitchFloor,
  pitchCeiling,
  interpol = "sinc",
  wn = "hanning"
)

Arguments

autoCorrelation

pre-calculated autocorrelation of the input frame (computationally more efficient than to do it here)

samplingRate

sampling rate (Hz)

nCands

maximum number of pitch candidates per method, normally 1...4 (except for dom, which returns at most one candidate per frame)

autocorThres

voicing threshold (unitless, ~0 to 1)

autocorSmooth

the width of smoothing interval (in bins) for finding peaks in the autocorrelation function. Defaults to 7 for sampling rate 44100 and smaller odd numbers for lower values of sampling rate

autocorUpsample

upsamples acf to this resolution (Hz) to improve accuracy in high frequencies

autocorBestPeak

amplitude of the lowest best candidate relative to the absolute max of the acf

pitchFloor, pitchCeiling

absolute bounds for pitch candidates (Hz)

interpol

a list of parameters (currently win, tol, cert) passed to soundgen:::pathfinder for interpolating missing pitch candidates (NULL = no interpolation)

wn

window type accepted by ftwindow, currently gaussian, hanning, hamming, bartlett, blackman, flattop, rectangle

Details

Attempts to find F0 of a frame by looking for peaks in the autocorrelation function (time domain analysis). Modified PRAAT's algorithm. See Boersma, P. (1993). Accurate short-term analysis of the fundamental frequency and the harmonics-to-noise ratio of a sampled sound. In Proceedings of the institute of phonetic sciences (Vol. 17, No. 1193, pp. 97-110).

Value

Returns a list of $HNR (NA or numeric) and $pitchAutocor_array (either NULL or a dataframe of pitch candidates).


soundgen documentation built on Sept. 12, 2024, 6:29 a.m.