getPitchSpec: BaNa pitch tracker

Description Usage Arguments Details Value

View source: R/utilities_analyze.R

Description

Internal soundgen function.

Usage

1
2
3
getPitchSpec(frame, specSmooth, specHNRslope, bin, HNR = NULL, specThres,
  specPeak, specSinglePeakCert, pitchFloor, pitchCeiling, specMerge,
  nCands)

Arguments

frame

the real part of the spectrum of a frame, as returned by fft

specSmooth

the width of window for detecting peaks in the spectrum, Hz

specHNRslope

when looking for putative harmonics in the spectrum, the threshold for peak detection is calculated as specPeak * (1 - HNR * specHNRslope)

bin

the width of spectral bin in frame, Hz

HNR

harmonics-to-noise ratio returned by getPitchAutocor

specThres

(0 to 1) separate voicing thresholds for detecting pitch candidates with three different methods: autocorrelation, cepstrum, and BaNa algorithm (see Details). Note that HNR is calculated even for unvoiced frames.

specPeak

when looking for putative harmonics in the spectrum, the threshold for peak detection is calculated as specPeak * (1 - HNR * specHNRslope)

specSinglePeakCert

(0 to 1) if F0 is calculated based on a single harmonic ratio (as opposed to several ratios converging on the same candidate), its certainty is taken to be specSinglePeakCert

pitchFloor

absolute bounds for pitch candidates (Hz)

pitchCeiling

absolute bounds for pitch candidates (Hz)

specMerge

pitch candidates within specMerge semitones are merged with boosted certainty

nCands

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

Details

Attempts to find F0 of a frame by calculating ratios of putative harmonics (frequency domain analysis, ~ modified BaNa algorithm). See Ba et al. (2012) "BaNa: A hybrid approach for noise resilient pitch detection." Statistical Signal Processing Workshop (SSP), 2012 IEEE.

Value

Returns either NULL or a dataframe of pitch candidates.


soundgen documentation built on Oct. 4, 2018, 9:04 a.m.