View source: R/spectralDescr.R
harmHeight | R Documentation |
Internal soundgen function
harmHeight(
frame,
pitch,
bin,
freqs,
harmThres = 3,
harmTol = 0.25,
harmPerSel = 5
)
frame |
the abs spectrum of a frame, as returned by
|
pitch |
the final pitch estimate for the current frame |
bin |
spectrogram bin width, Hz |
freqs |
frequency per bin of spectrogram |
harmThres |
minimum height of spectral peak, dB |
harmTol |
maximum tolerated deviation of peak frequency from multiples of f0, proportion of f0 |
harmPerSel |
the number of harmonics per sliding selection |
Attempts to estimate how high harmonics reach in the spectrum - that is, at what frequency we can still discern peaks at multiples of f0 or, for low-pitched sounds, regularly spaced peaks separated by ~f0.
Returns the frequency (Hz) up to which we find harmonics
s = soundgen(sylLen = 400, addSilence = 0, pitch = 400, noise = -10,
rolloff = -15, jitterDep = .1, shimmerDep = 5, temperature = .001)
sp = spectrogram(s, samplingRate = 16000)
hh = soundgen:::harmHeight(sp[, 5], pitch = 400,
freqs = as.numeric(rownames(sp)) * 1000, bin = 16000 / 2 / nrow(sp))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.