Learn R Programming

seewave (version 1.7.0)

dynspec: Dynamic sliding spectrum

Description

This function plots dynamically a sliding spectrum along a time wave. This basically corresponds to a short-term Fourier transform.

Usage

dynspec(wave, f, wl = 512, wn = "hanning", zp = 0,
ovlp = 0, fftw = FALSE, norm = FALSE, dB = NULL,  dBref = NULL, plot = TRUE,
title = TRUE, osc = FALSE, flab = "Frequency (kHz)",
alab = "Amplitude", alim = NULL, flim = c(0, f/2000),
type = "l", from = NULL, to = NULL, envt = NULL,
msmooth = NULL, ksmooth = NULL, colspec = "black",
coltitle = "black", colbg = "white", colline = "black",
colaxis = "black", collab = "black", cexlab = 1,
fontlab = 1, colwave = "black",
coly0 = "lightgrey", colcursor = "red", bty = "l")

Arguments

Value

  • This function returns a list of three items:
  • timea numeric vector corresponding to the time axis.
  • freqa numeric vector corresponding to the frequency axis.
  • ampa numeric matrix corresponding to the amplitude values. Each column is a Fourier transform of length wl/2.

Details

Use the slider panel to move along the time wave. Use the argument norm if you wish to have each spectrum normalised, i.e. with values between 0 and 1 or maximised to 0 dB when dB is TRUE. The function requires the package rpanel that is based on the package tcltk.

See Also

spectro, spectro3D, wf, spec, fft, oscillo.

Examples

Run this code
data(sheep)
require(rpanel)
dynspec(sheep,f=8000,wl=1024,ovlp=50,osc=TRUE)

Run the code above in your browser using DataLab