spectro3D(wave, f, wl = 512, wn = "hanning", zp = 0,
ovlp = 0, norm = TRUE, fftw = FALSE, dB = "max0", dBref = NULL, plot = TRUE,
magt = 10, magf = 10, maga = 2,
palette = rev.terrain.colors)
wave
(in Hz). Does not need to be specified if embedded in wave
.ftwindow
(by default "hanning"
).Details
.TRUE
the STFT is normalised (i. e. scaled) by its maximum.TRUE
calls the function FFT
of the
library fftw
. See Notes of the spectro
.dB
is TRUE
. NULL
by default
but should be set to 2*10e-5 for a 20 microPa reference.TRUE
plots the spectrogram
(by default TRUE
).Details
.wl
/2.wl
value.
Choosing a high wl
value will increase the frequency resolution but
reduce the temporal one, and vice versa. The frequency precision is
obtained by calculating the ratio f
/wl
,
and the temporal precision is obtained by calculating the reverse ratio
wl
/f
. This problem can be reduced in some way with zp
that
adds 0 values on both sides of the analysis window. This increases frequency
resolution without altering time resolution.
Any colour palette can be used. In particular, it is possible to use other palettes coming with
rev.gray.colors.1
, rev.gray.colors.2
,
spectro.colors
, temp.colors
, rev.heat.colors
,
rev.cm.colors
, rev.topo.colors
, corresponding to the reverse
of heat.colors
,topo.colors
,
cm.colors
.
Use magt
, magf
and maga
to resize the plot.spectro
, dynspec
,
wf
, fft
.require(rgl)
data(tico)
spectro3D(tico,f=22050,wl=512,ovlp=75,zp=16,maga=4,palette=rev.terrain.colors)
# linear amplitude scale without a normisation of the STFT matrix
# time and frequency scales need to be dramatically amplified
spectro3D(tico, norm=FALSE, dB=NULL, magt=100000, magf=100000)
Run the code above in your browser using DataLab