Learn R Programming

seewave (version 1.7.6)

cepstro: 2D-cepstrogram of a time wave

Description

This function returns a two-dimension cepstrographic representation of a time wave. The function corresponds to a short-term cepstral transform. An amplitude contour plot can be overlaid.

Usage

cepstro(wave, f, wl = 512, ovlp = 0, plot = TRUE, grid = TRUE,
scale = TRUE, cont = FALSE, collevels = seq(0, 1, 0.01),
palette = rev.heat.colors, contlevels = seq(0, 1, 0.01),
colcont = "black", colbg="white", colgrid = "black",
colaxis = "black", collab = "black",
xlab = "Time (s)", ylab = "Quefrency (ms)",
scalelab = "Amplitude", main = NULL, scalefontlab = 1, scalecexlab = 0.75,
axisX = TRUE, axisY = TRUE, ...)

Arguments

wave
an R object.
f
sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.
wl
if at is not null, length of the window for the analysis (even number of points, by defaults = 512).
ovlp
overlap between two successive windows (in %).
plot
logical, if TRUE plots the cepstrogram (by default TRUE).
grid
logical, if TRUE plots a y-axis grid (by default TRUE).
scale
logical, if TRUE plots a dB colour scale on the right side of the cesptrogram (by default TRUE).
cont
logical, if TRUE overplots contour lines on the cepstrogram (by default FALSE).
collevels
a set of levels which are used to partition the amplitude range of the cepstrogram (in dB).
palette
a color palette function to be used to assign colors in the plot, see Details.
contlevels
a set of levels which are used to partition the amplitude range for contour overplot (in dB).
colcont
colour for cont plotting.
colbg
background colour.
colgrid
colour for grid plotting.
colaxis
color of the axes.
collab
color of the labels.
xlab
label of the time axis.
ylab
label of the quefrency axis.
main
label of the main title.
scalelab
amplitude scale label.
scalefontlab
font of the amplitude scale label.
scalecexlab
cex of the amplitude scale label.
axisX
if TRUE plots time X-axis (by default TRUE).
axisY
if TRUE plots frequency Y-axis (by default TRUE).
...
other contour graphical parameters.

Value

  • This function returns a list of three items:
  • timea numeric vector corresponding to the time axis.
  • freqa numeric vector corresponding to the quefrency axis.
  • ampa numeric matrix corresponding to the the successive cepstral profiles computed along time.

Details

It is unfortunately not possible to turn the y-axis to a frequency scale. See spectro for the use of the graphical arguments.

References

Oppenheim, A.V. and Schafer, R.W. 2004. From frequency to quefrency: a history of the cepstrum. Signal Processing Magazine IEEE, 21: 95-106.

See Also

ceps, fund, autoc

Examples

Run this code
data(sheep)
sheepc <- cutw(sheep, f=8000, from = 0.19, to = 2.3)
cepstro(sheepc,f=8000)

Run the code above in your browser using DataLab