dynspectro | R Documentation |
This function plots dynamically a sliding spectrogram along a time wave.
dynspectro(wave, f, channel = 1, slidframe = 10,
wl = 512, wn = "hanning", zp = 0, ovlp = 75,
fftw = FALSE, dB = TRUE, plot = TRUE,
title = TRUE, osc = FALSE,
tlab = "Time (s)", flab = "Frequency (kHz)", alab = "Amplitude",
from = NULL, to = NULL,
collevels = NULL, palette = spectro.colors,
envt = NULL, msmooth = NULL, ksmooth = NULL,
coltitle = "black", colbg = "white", colline = "black",
colaxis = "black", collab = "black", cexlab = 1,
fontlab = 1, colwave = "black",
coly0 = "lightgrey", colcursor = "red", bty = "l")
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
slidframe |
size of the sliding frame (in percent of the wave duration). |
wl |
if |
wn |
window name, see |
zp |
zero-padding (even number of points), see |
ovlp |
overlap between two successive windows (in % ). |
fftw |
if |
dB |
a logical, if |
plot |
logical, if |
title |
logical, if |
osc |
logical, if |
tlab |
title of the time axis. |
flab |
title of the frequency axis. |
alab |
title of the amplitude axis. |
from |
start mark where to compute the sliding spectrogram (in s). |
to |
end mark where to compute the sliding spectrogram (in s). |
collevels |
a set of levels which are used to partition the amplitude range of the spectrogram. |
palette |
a color palette function to be used to assign colors in the plot. |
envt |
the type of envelope to be plooted:
either "abs" for absolute amplitude envelope or "hil" for Hilbert amplitude envelope.
See |
msmooth |
when |
ksmooth |
when |
coltitle |
if |
colbg |
background colour. |
colline |
colour of axes line. |
colaxis |
colour of the axes. |
collab |
colour of axes title. |
cexlab |
character size for axes title. |
fontlab |
font for axes title. |
colwave |
colour of the oscillogram or of the envelope (only when |
coly0 |
colour of the y=0 line (only when |
colcursor |
colour of oscillogram cursor (only when |
bty |
the type of box to be drawn around the oscillogram (only
when |
Use the slider panel to move along the time wave.
The function requires the package rpanel that is based on the
package tcltk.
The function is mainly written for inspecting long sounds.
The function is based on image
for fast display when
spectro
is based on filled.contour
.
Displaying the amplitude envelope with the argument envt
can
slow down significantly the display.
This function returns a list of three items:
time |
a numeric vector corresponding to the time axis. |
freq |
a numeric vector corresponding to the frequency axis. |
amp |
a numeric matrix corresponding to the amplitude values.
Each column is a Fourier transform of length |
This function is very similar to a spectrogram. See the Details
of
spectro
for some information regarding the short term Fourier
transform.
David Pinaud and Jerome Sueur
spectro
, spectro3D
,
wf
, spec
, dynspec
,
fft
, oscillo
, env
.
## Not run:
data(sheep)
require(rpanel)
dynspectro(sheep, ovlp=95, osc=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.