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

audspec

Frequency band conversion


Description

Perform critical band analysis (see PLP), which means the reduction of the fourier frequencies of a signal's powerspectrum to a reduced number of frequency bands in an auditory frequency scale.

Usage

audspec(pspectrum, sr = 16000, nfilts = ceiling(hz2bark(sr/2)) + 1, 
    fbtype = c("bark", "mel", "htkmel", "fcmel"), minfreq = 0, 
    maxfreq = sr/2, sumpower = TRUE, bwidth = 1)

Arguments

pspectrum

Output of powspec, matrix with the powerspectrum of each time frame in its columns.

sr

Sample rate of the original recording.

nfilts

Number of filters/frequency bins in the auditory frequency scale.

fbtype

Used auditory frequency scale.

minfreq

Lowest frequency.

maxfreq

Highest frequency.

sumpower

If sumpower = TRUE, the frequency scale transformation is based on the powerspectrum, if sumpower = FALSE, it is based on its squareroot (absolute value of the spectrum) and squared afterwards.

bwidth

Modify the width of the frequency bands.

Value

aspectrum

Matrix with the auditory spectrum of each time frame in its columns.

wts

Weight matrix for the frequency band conversion.

Author(s)

References

See Also

Examples

testsound <- normalize(sine(400) + sine(1000) + square(250), "16")
  pspectrum <- powspec(testsound@left, testsound@samp.rate)
  aspectrum <- audspec(pspectrum, 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.