View source: R/rendeeR_psychoacoustics.R
st | R Documentation |
This function takes a vector of frequencies (in Hz) and convert them to semitones. By default, the frequency of the note C$_0$ is used as the reference for the conversion, so that the output is compatible with the defined base of a Phonogram \insertCiteSchutte.1983.10.1159/000265703reindeer.
st(x, ref = 16.3516)
x |
A vector of frequency values (in Hz) |
ref |
The reference frequency. By default 16.35160 Hz (C$_0$) which is the base frequency setting of a Phonogram. |
For Praat-compatible output please use one of 1, 100, 200, or 440 Hz as the reference frequency.
Returns a vector of semitone scaled frequency values.
Fredrik Karlsson
h <- seq(100,5000,100)
# Praat has 100 Hz as one of the reference frequency options for semitone calculations
s100 <- st(h,ref=100)
# Semitone distance from C_0
sC0 <- st(h)
#The differ between semitones relative to C0 and a 100 Hz frequency
st(h,ref=100) - st(h)
# phonogram (C0-C4) range in Semitones
strange <- st(261.6256)
strange
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.