Learn R Programming

soundgen (version 2.7.4)

hz2mel: Convert Hz to mel

Description

Internal soundgen function: a temporary fix needed because tuneR::hz2mel doesn't accept NAs or vectors.

Usage

hz2mel(f, htk = TRUE)

Arguments

f

frequency, Hz

htk

if TRUE, uses an alternative formula 2595 * log10(1 + f/700)

Examples

Run this code
soundgen:::hz2mel(c(440, 220, NA))
freq = 1:10000
plot(freq, soundgen:::hz2mel(freq), type = 'l')

Run the code above in your browser using DataLab