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

mel

Hertz / Mel conversion


Description

This function converts Hertz data in Mel data.

Usage

mel(x, inverse = FALSE)

Arguments

x

a value in Hertz (or in Mel if inverse is TRUE)

inverse

logical, if TRUE converts the Mel data in Hertz data.

Details

Hertz to mel conversion is computed according to:

m = 1127.01048*log(1+(f/700))

with m in Mel and f in Hertz.

Mel to Hertz conversion (when inverse is TRUE) is therefore computed according to:

f = 700*(exp(m/1127.01048)-1)

with f in Hertz and m in Mel.

Value

A corresponding R object is returned.

Note

The Mel scale is a perceptual scale of pitches judged by listeners to be equal in distance from one another. The name Mel comes from the word melody to indicate that the scale is based on pitch comparisons. The reference point between this scale and normal frequency measurement is defined by equating a 1000 Hz tone, 40 dB above the listener's threshold, with a pitch of 1000 mels.

Author(s)

Jerome Sueur sueur@mnhn.fr

References

Stevens, S. S., Volkman, J. and Newman, E. B. 1937. A scale for the measurement of psychological magnitude pitch. Journal of the Acoustical Society of America, 8: 185-190.

See Also

Examples

x<-seq(0,10000,by=50)
y<-mel(x)
plot(x,y,type="l",xlab = "f (hertz)", ylab = "f (mel)",
  main = "Mel scale", col="red")

seewave

Sound Analysis and Synthesis

v2.1.6
GPL (>= 2)
Authors
Jerome Sueur <sueur@mnhn.fr> [cre, au], Thierry Aubin [au], Caroline Simonis [au], Laurent Lellouch [main ctrb], Ethan C. Brown [ctrb], Marion Depraetere [ctrb], Camille Desjonqueres [ctrb], Francois Fabianek [ctrb], Amandine Gasc [ctrb], Eric Kasten [ctrb], Stefanie LaZerte [ctrb], Jonathan Lees [ctrb], Jean Marchal [ctrb], Andre Mikulec [ctrb], Sandrine Pavoine [ctrb], David Pinaud [ctrb], Alicia Stotz [ctrb], Luis J. Villanueva-Rivera [ctrb], Zev Ross [ctrb], Carl G. Witthoft [ctrb], Hristo Zhivomirov [ctrb].
Initial release
2020-06-28

We don't support your browser anymore

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