notes {voice} | R Documentation |
Assign notes to frequencies
Description
Returns a vector of notes for equal-tempered scale, A4 = 440 Hz.
Usage
notes(x, method = "spn", moving.average = FALSE, k = 11)
Arguments
x |
Numeric vector of frequencies in Hz. |
method |
Method of specifying musical pitch. (Default: |
moving.average |
Logical. Must apply moving average? (Default: |
k |
Integer width of the rolling window used if moving.average is TRUE. (Default: |
Details
The symbol '#' is being used to represent a sharp note, the higher in pitch by one semitone on Scientific Pitch Notation (SPN).
Value
A vector containing the notes for equal-tempered scale, A4 = 440 Hz. When ‘method = ’spn'‘ the vector is of class ’ordered factor'. When ‘method = ’octave'‘ the vector is of class ’factor'. When ‘method = ’midi'‘ the vector is of class ’integer'.
References
https://pages.mtu.edu/~suits/notefreqs.html
See Also
notes_freq
Examples
library(voice)
notes(c(220,440,880))
notes(c(220,440,880), method = 'octave')
notes(c(220,440,880), method = 'midi')