When using seewave::fund, it always seems to over-estimate the fundamental frequency, while tuneR:FF provides more accurate estimates. I would really like to use the seewave::fund version, because it provides a time series of fundamental frequency values, while tuneR::FF does not. Is this a known bias in seewave::fund?
A comparison of the two approaches is shown below.
# Simulate a 440Hz tuning fork
synth_440 <- seewave::synth(f = 44100,
d = 1,
cf = 440,
output = "Wave")
# Look at the frequency spectrum
f_spec <- seewave::fpeaks(spec = seewave::spec(wave = synth_440),
nmax = 2,
xlim = c(0, 1),
ylim = c(0, 1.1),
digits = 3)
# Use seewave::fund to calculate fundamental frequency
synth_fund <- seewave::fund(wave = synth_440,
plot = FALSE,
fmax = 500)
# Look at mean and median of fundamental frequency values
mean(synth_fund[, 2])
# [1] 0.4445222
median(synth_fund[, 2])
# [1] 0.4454545
# Compare with fundamental frequency calculation from tuneR::FF
synth_period <- tuneR::periodogram(object = synth_440)
synth_ff <- tuneR::FF(object = synth_period)
synth_ff
# [1] 439.9125