[R] Computing fundamental harmonics from a periodogram

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Apr 11 11:42:15 CEST 2007



hadley wickham wrote:
> Dear all,
> 
> I'm trying to finding the fundamental harmonics (ie. peaks in a
> periodogram) from a time series (extracted from an mp3).  For example,
> if I look at
> 
> spectrum(fdeaths, spans = c(3,3))


A heuristical procedure for finding fundamentals of a monophonic sound 
can be found in package tuneR. For a short example how to use it, type:

install.packages("tuneR")
library(tuneR)
?tuneR


For polyphonic sound, I do not know any method that is both sufficiently 
fast (i.e. calculates results for a 1 minute sound in less than a day) 
and accurate.

Uwe Ligges



> I'd say the fundamental harmonics are about 1, 2, 3.5 and 4.5 - but
> how can I extract these automatically?  (preferably with some
> heuristic for choosing the smoothing spans too)
> 
> I'm aware of heuristic methods for finding peaks for general sequences
> (as found by searching for peaks on R-help) but I have a feeling
> there's something with some theoretical justification for the case of
> periodograms.  Could anyone point me in the right direction in terms
> of theory or an R package that implements an approach?
> 
> Thanks,
> 
> Hadley
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list