f2st | R Documentation |

Convert between frequency in Hz and in semitones, relative to baseline frequency in Hz.

f2st( hz, base=50 ) st2f( st, base=50 )

`hz` |
a frequency in Hertz (cycles per second). |

`st` |
a frequency in semitones relative to the base frequency. |

`base` |
the baseline frequency (in Hertz units) relative to which semitones are expressed. |

These functions convert between the linear Hertz and logarithmic semitone scales. A doubling of the frequency in Hz equals 12 semitones or 1 octave.

Function `f2st`

was based on function `h2st`

by Mark Liberman

(last seen at http://ldc.upenn.edu/myl/llog/semitones.R but no longer available online).

Function `st2f`

was based on a conversion script by Jan Roelof de Pijper

(last seen at http://users.abo.fi/jtuomain/speech/semitone.html but no longer available online).

For frequencies in Hz of musical notes, see e.g. http://www.phy.mtu.edu/~suits/notefreqs.html.

Transformed value(s) in semitones or in Hertz (cycles per second).

`f2bark, bark2f, f2mel, mel2f.`

# distance in semitones between target and baseline frequencies in Hz. f2st( 440, base=110 ) # frequency in Hz of a tone that is +24 semitones distant # from the baseline, i.e. a distance of +two octaves. st2f( 24 )

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.