bark: Convert Hz to the Bark scale (A copy of the emuR function)

barkR Documentation

Convert Hz to the Bark scale (A copy of the emuR function)

Description

The calculation is done using the formulae Traunmueller (1990)

Usage

bark(f, inv = FALSE, ...)

Arguments

f

A vector or matrix of data or a spectral object.

inv

A single element logical vector. If F, data are converted from Hertz to Bark, if T, data are converted from Bark to Hertz. (Does not apply if 'data' is an oject of class 'spectral'.

...

for generic only

Details

If 'data' is a spectral object, then

the frequencies are changed so that they are proportional

to the Bark scale and such that the Bark intervals

between frequencies are con stant between the lowest

and highest frequencies. More specifically,

suppose that a spectral object has frequencies

at 0, 1000, 2000, 3000, 4000 Hz. Then the corresponding

frequencies extend in Bark between 0 and 17.46329 Bark

in four equal intervals, and linear interpolation

is used with the 'approx' function to obtain

the dB values at those frequencies. Negative frequencies

which are obtained for values of about less than 40 Hz

are removed in the case of spectral objects.

Value

A vector or matrix or spectral object of the same length and dimensions as data.

References

Traunmueller, H. (1990) "Analytical expressions for the tonotopic sensory scale" J. Acoust. Soc. Am. 88: 97-100.

See Also

emuR::bark


humlab-speech/reindeer documentation built on May 21, 2023, 4:43 p.m.