Learn R Programming

tidynorm (version 0.4.0)

hz_to_bark: Hz to Bark

Description

Converts Hz to Bark

Usage

hz_to_bark(hz)

Value

A vector of bark scaled values

Arguments

hz

Frequency in Hz

Details

$$ \hat{b} = \frac{26.81 hz}{1960 + hz} - 0.53 $$ $$ b = \begin{cases} \hat{b} + 0.15(2-\hat{b}) & \text{if}~\hat{b} < 2\\ \hat{b} + 0.22(\hat{b} - 20.1) & \text{if}~\hat{b} > 20.1\\ \hat{b} & \text{otherwise} \end{cases} $$

References

Traunmüller, H. (1990). Analytical expressions for the tonotopic sensory scale. The Journal of the Acoustical Society of America, 88(1), 97–100. tools:::Rd_expr_doi("10.1121/1.399849")

Examples

Run this code
hz <- seq(150, 2000, length = 100)
bark <- hz_to_bark(hz)
plot(hz, bark)

Run the code above in your browser using DataLab