Make a spectrogram of a sound.

spectrogram(
  sound,
  maxformant = 5000,
  windowlength = 0.005,
  timestep = 0.001,
  dynamicrange = 60,
  resolution = 50,
  plot = TRUE,
  ...
)

Arguments

sound

a numeric vector representing the sound to be analyzed.

maxformant

the maximum analysis frequency (i.e., the Nyquist/2).

windowlength

the windowlength specified in seconds.

timestep

the analysis time step specified in seconds.

dynamicrange

the dynamic range desired for the spectrogram, in decibels.

resolution

the spectral resolution in Hertz.

plot

if TRUE, a plot is created.

...

Additional arguments are passed to the internal call of 'image'.

Value

A matrix representing a spectrogram.

Examples

if (FALSE) { sound = readWave2("yoursound.wav") spect = spectrogram (sound, maxformant = 5000) ffs = analyze (sound, timestep = 2) plotffs (ffs[[2]], spect = spect) }