powspec: Powerspectrum

View source: R/powspec.R

powspecR Documentation

Powerspectrum

Description

Compute the powerspectrum of the input signal. Basically output a power spectrogram using a Hamming window.

Usage

powspec(x, sr = 8000, wintime = 0.025, steptime = 0.01, dither = FALSE)

Arguments

x

Vector of samples.

sr

Sampling rate of the signal.

wintime

Window length in sec.

steptime

Step between successive windows in sec.

dither

Add offset to spectrum as if dither noise.

Value

Matrix, where each column represents a power spectrum for a given frame and each row represents a frequency.

Author(s)

Sebastian Krey krey@statistik.tu-dortmund.de

References

Daniel P. W. Ellis: https://www.ee.columbia.edu/~dpwe/resources/matlab/rastamat/

See Also

specgram

Examples

  testsound <- normalize(sine(400) + sine(1000) + square(250), "16")
  pspectrum <- powspec(testsound@left, testsound@samp.rate)

tuneR documentation built on Nov. 27, 2023, 5:11 p.m.

Related to powspec in tuneR...