This function computes the Fourier analysis of the instantaneous frequency of a time wave. This allows to detect periodicity in frequency modulation.
fma(wave, f, threshold = NULL, plot = TRUE, ...)
an R object.
sampling frequency of wave
(in Hz). Does not need to be specified if embedded in wave
.
amplitude threshold for signal detection (in % ).
logical, if TRUE
the spectrum of the instantaneous frequency
(by default TRUE
).
other spec
parameters.
If plot
is FALSE
, fma
returns a numeric vector
corresponding to the computed spectrum.
If peaks
is not NULL
, fma
returns a list with
two elements:
the spectrum computed
the peaks values (in kHz).
This function is based on ifreq
and spec
.
The instantaneous frequency of wave
is first computed and the spectrum of this
frequency modulation is then processed. All env
and spec
arguments can be
set up.
# NOT RUN {
# a sound with a 1 kHz sinusoid FM
a<-synth(d=1, f=8000, cf=1500, fm=c(1000,1000,0,0,0), output="Wave")
fma(a)
# }
Run the code above in your browser using DataLab