| ama {seewave} | R Documentation |
This function computes the Fourier analysis of a time wave envelope. This allows to detect periodicity, in particular those generated by amplitude modulations.
ama(wave, f, wl = 512, plot = TRUE, ...)
wave |
data describing the time wave
or a Sample object created loading a wav file
with loadSample (package Sound). |
f |
sampling frequency of wave (in Hz). |
wl |
length of the window for the analysis (even number of points). |
plot |
logical, if TRUE the spectrum of the envelope
(by default TRUE). |
... |
other meanspec parameters. |
This function is based on oscillo and meanspec.
The envelope of wave is first computed and the spectrum of this envelope
is then processed. All spec and meanspec arguments can be
set up. Be sure to set up wl large enough if you want to detect low amplitude
modulation periodicity.
If plot is FALSE, ama returns a vector of numeric
data corresponding to the computed spectrum.
If peaks is TRUE, spec returns a list with
two elements:
spec |
the spectrum computed |
peaks |
the peaks values (in kHz). |
Jérôme Sueur jerome.sueur@univ-tours.fr
data(orni) # detection of 2 main amplitude modulations in a cicada song: # one with a 0.020 kHz frequency (due to signal/silence periodicity) # one with a 0.258 kHz frequency (due to pulses in the echemes) # one with a 2.369 kHz frequency (fundamental frequency) ama(orni,f=22050,wl=1024,type="l") # these amplitude modulations can be identify with a cursor: ama(orni,f=22050,wl=1024,type="l",identify=TRUE)