Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

powspec

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)

References

See Also

Examples

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

tuneR

Analysis of Music and Speech

v1.3.3
GPL-2 | GPL-3
Authors
Uwe Ligges <ligges@statistik.tu-dortmund.de> with contributions from Sebastian Krey, Olaf Mersmann, Sarah Schnackenberg, Guillaume Guenard, Andrea Preusser, Anita Thieler, Johanna Mielke and Claus Weihs, as well as code fragments and ideas from the former package 'sound' by Matthias Heymann and functions from 'rastamat' by Daniel P. W. Ellis. The included parts of the libmad MPEG audio decoder library are authored by Underbit Technologies.
Initial release
2018-07-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.